lexgui 0.6.2 → 0.6.4
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/components/nodegraph.js +4 -4
- package/build/components/timeline.js +1580 -2656
- package/build/components/videoeditor.js +72 -46
- package/build/lexgui.css +6 -5
- package/build/lexgui.js +7885 -7388
- package/build/lexgui.min.css +1 -1
- package/build/lexgui.min.js +1 -1
- package/build/lexgui.module.js +7862 -7366
- package/build/lexgui.module.min.js +1 -1
- package/changelog.md +31 -1
- package/demo.js +31 -16
- package/examples/all_widgets.html +30 -1
- package/examples/dialogs.html +1 -1
- package/examples/editor.html +1104 -0
- package/examples/index.html +1 -0
- package/examples/previews/editor.png +0 -0
- package/examples/timeline.html +54 -28
- package/package.json +7 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
var z={version:"0.6.2",ready:!1,components:[],signals:{},extraCommandbarEntries:[],activeDraggable:null};function g(e,t,s){return Math.min(Math.max(e,t),s)}function f(e,t){return 0==t?Math.floor(e):+e.toFixed(t??2).replace(/([0-9]+(\.[0-9]+[1-9])?)(\.?0+$)/,"$1")}function u(e,t,s,i,a){return(e-t)*(a-i)/(s-t)+i}z.MOUSE_LEFT_CLICK=0,z.MOUSE_MIDDLE_CLICK=1,z.MOUSE_RIGHT_CLICK=2,z.MOUSE_DOUBLE_CLICK=2,z.MOUSE_TRIPLE_CLICK=3,z.CURVE_MOVEOUT_CLAMP=0,z.CURVE_MOVEOUT_DELETE=1,z.DRAGGABLE_Z_INDEX=101,z.clamp=g,z.round=f,z.remapRange=u,"undefined"!=typeof performance?z.getTime=performance.now.bind(performance):"undefined"!=typeof Date&&Date.now?z.getTime=Date.now.bind(Date):"undefined"!=typeof process?z.getTime=function(){var e=process.hrtime();return.001*e[0]+1e-6*e[1]}:z.getTime=function(){return(new Date).getTime()};function N(e,t){setTimeout(e,t??0)}function d(e){console.assert("string"==typeof e,"getSupportedDOMName: Text is not a string!");let t=e.trim();return t=(t=t.replace(/@/g,"_at_").replace(/\+/g,"_plus_").replace(/\./g,"_dot_")).replace(/[^a-zA-Z0-9_-]/g,"_"),t=/^[0-9]/.test(t)?"_"+t:t}function c(e){return e.includes(".")?e.split(".").pop():null}function H(e){var t=document.createElement("div");return t.innerHTML=e,t.textContent||t.innerText||""}z.doAsync=N,z.getSupportedDOMName=d,z.has=function(e){return-1<z.components.indexOf(e)},z.getExtension=c,z.stripHTML=H;let C=(s,i)=>{if(s.constructor===Number)return s;if(s.constructor===String){var a,l,e=parseFloat(s);if(s.endsWith("px"))return e;if(s.endsWith("%"))return e/100*i;if(s.endsWith("rem")||s.endsWith("em"))return 16*e;if(s.endsWith("vw"))return e/100*window.innerWidth;if(s.endsWith("vh"))return e/100*window.innerHeight;if(s.startsWith("calc(")){let e=0,t="+";for(a of s.slice(5,-1).split(/([+\-])/))"+"===(a=a.trim())||"-"===a?t=a:(l=C(a,i),e="+"===t?e+l:e-l);return e}}throw"Bad size format!"};function y(e){return JSON.parse(JSON.stringify(e))}function e(e){e="light"==e?"light":"dark",document.documentElement.setAttribute("data-theme",e),z.emit("@on_new_color_scheme",e)}function B(){return document.documentElement.getAttribute("data-theme")??"dark"}function t(e){if(!/^#(?:[A-Fa-f0-9]{3,4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/.test(e))throw"Invalid Hex Color: "+e;3!==(e=e.replace(/^#/,"")).length&&4!==e.length||(e=e.split("").map(e=>e+e).join(""));var t=parseInt(e,16);return{r:(t>>(8===e.length?24:16)&255)/255,g:(t>>(8===e.length?16:8)&255)/255,b:(t>>(8===e.length?8:0)&255)/255,a:(8===e.length?255&t:4===e.length?parseInt(e.slice(-2),16):255)/255}}function s(e,t=255){var s=[e.r,e.g,e.b];return null!=e.a&&s.push(e.a),"#"+s.map(e=>{e=(e=Math.floor(e*t)).toString(16);return 1===e.length?"0"+e:e}).join("")}function i(e){return{r:Math.floor(255*e.r),g:Math.floor(255*e.g),b:Math.floor(255*e.b),a:e.a}}function a(e){var{r:e,g:t,b:s,a:i}=e,i=i??1,a=Math.max(e,t,s),l=a-Math.min(e,t,s);let n=0;return 0!=l&&(n=a===e?(t-s)/l%6:a===t?(s-e)/l+2:(e-t)/l+4,(n*=60)<0)&&(n+=360),{h:n,s:0===a?0:l/a,v:a,a:i}}function W(e){var{h:e,s:t,v:s,a:i}=e,t=s*t,a=t*(1-Math.abs(e/60%2-1)),s=s-t;let l=0,n=0,o=0;return o=e<60?(l=t,n=a,0):e<120?(l=a,n=t,0):e<180?(l=0,n=t,a):e<240?(l=0,n=a,t):e<300?(l=a,n=0,t):(l=t,n=0,a),{r:l+s,g:n+s,b:o+s,a:i}}function L(){function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return e()+"-"+e()+"-"+e()}function h(l,i={}){let n=0,o=0,a=null,t=i.targetClass,r=i.dragMargin??3,s=(e,t,s)=>{var i=l.parentElement?l.parentElement.getBoundingClientRect():{x:0,y:0,width:0,height:0},a="fixed"==l.style.position?new z.vec2(i.x,i.y):new z.vec2;s=s??e.clientX-n-i.x,t=t??e.clientY-o-i.y,l.style.left=g(s,r+a.x,a.x+i.width-l.offsetWidth-r)+"px",l.style.top=g(t,r+a.y,a.y+i.height-l.offsetHeight-r)+"px",l.style.translate="none"};i.autoAdjust&&s(null,parseInt(l.style.left),parseInt(l.style.top));var e=z.UTILS.uidGenerator();l["draggable-id"]=e;let c=i.onMove?e=>{a&&i.onMove&&i.onMove(a)}:e=>{a&&s(e)},d=i.onDragStart;l.setAttribute("draggable",!0),l.addEventListener("mousedown",function(e){a=e.target.classList.contains(t)||!t?e.target:null}),l.addEventListener("dragstart",function(e){var t,s;e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),a&&((t=new Image).src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=",e.dataTransfer.setDragImage(t,0,0),e.dataTransfer.effectAllowed="move",t=e.target.getBoundingClientRect(),s=a.parentElement.getBoundingClientRect(),s="fixed"==a.style.position?new z.vec2(s.x,s.y):new z.vec2,n=e.clientX-t.x-s.x,o=e.clientY-t.y-s.y,document.addEventListener("mousemove",c),a.eventCatched=!0,(i.updateLayers??!0)&&(z.activeDraggable&&(z.activeDraggable.style.zIndex=z.DRAGGABLE_Z_INDEX),z.activeDraggable=l,z.activeDraggable.style.zIndex=z.DRAGGABLE_Z_INDEX+1),d)&&d(a,e)},!1),document.addEventListener("mouseup",e=>{a&&(a=null,document.removeEventListener("mousemove",c))})}z.parsePixelSize=C,z.deepCopy=y,z.setTheme=e,z.getTheme=B,z.switchTheme=function(){e("dark"==B()?"light":"dark")},z.setThemeColor=function(e,t){document.querySelector(":root").style.setProperty("--"+e,t)},z.getThemeColor=function(e){var t=getComputedStyle(document.querySelector(":root"));return(e=t.getPropertyValue("--"+e)).includes("light-dark")?("light"==t.getPropertyValue("color-scheme")?e.substring(e.indexOf("(")+1,e.indexOf(",")):e.substring(e.indexOf(",")+1,e.indexOf(")"))).replace(/\s/g,""):e},z.getBase64Image=function(e){var t=document.createElement("canvas");return t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0),t.toDataURL("image/png")},z.hexToRgb=t,z.hexToHsv=function(e){return a(t(e))},z.rgbToHex=s,z.rgbToCss=i,z.rgbToHsv=a,z.hsvToRgb=W,z.measureRealWidth=function(e,t=8){var s=document.createElement("span"),e=(s.className="lexinputmeasure",s.innerHTML=e,document.body.appendChild(s),s.getBoundingClientRect());return z.UTILS.deleteElement(s),e.width+t},z.guidGenerator=L,z.buildTextPattern=function(e={}){var t=[],s=(e.lowercase&&t.push("(?=.*[a-z])"),e.uppercase&&t.push("(?=.*[A-Z])"),e.digit&&t.push("(?=.*\\d)"),e.specialChar&&t.push("(?=.*[@#$%^&+=!])"),e.noSpaces&&t.push("(?!.*\\s)"),e.minLength||0),i=e.maxLength||"",t=`^${t.join("")}.{${s},${i}}$`;return e.asRegExp?new RegExp(t):t},z.makeDraggable=h,z.makeCollapsible=function(e,t,s,i={}){e.classList.add("collapsible");var i=i.collapsed??!0,a=z.makeIcon("Right");a.classList.add("collapser"),a.dataset.collapsed=i,a.style.marginLeft="auto",a.style.marginRight="0.2rem",a.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),this.dataset.collapsed?(delete this.dataset.collapsed,t.style.display="block"):(this.dataset.collapsed=!0,t.style.display="none")}),e.appendChild(a),(s=s??e.parentElement).appendChild(t)},z.makeCodeSnippet=function(e,t,s={}){if(z.has("CodeEditor")){var i,a,l,n=document.createElement("div"),t=(n.className="lexcodesnippet "+(s.className??""),n.style.width=t?t[0]:"auto",n.style.height=t?t[1]:"auto",new x({noAppend:!0})),o=new z.CodeEditor(t,{skipInfo:!0,disableEdition:!0,allowAddScripts:!1,name:s.tabName});if(o.setText(e,s.language??"Plain Text"),s.linesAdded){let t=o.root.querySelector(".code");for(var r of s.linesAdded)if(r.constructor==Number)t.childNodes[r-1].classList.add("added");else if(r.constructor==Array)for(let e=r[0]-1;e<=r[1]-1;e++)t.childNodes[e].classList.add("added")}if(s.linesRemoved){let t=o.root.querySelector(".code");for(var c of s.linesRemoved)if(c.constructor==Number)t.childNodes[c-1].classList.add("removed");else if(c.constructor==Array)for(let e=c[0]-1;e<=c[1]-1;e++)t.childNodes[e].classList.add("removed")}return s.windowMode&&((e=document.createElement("div")).className="lexwindowbuttons",(i=document.createElement("span")).style.background="#ee4f50",(a=document.createElement("span")).style.background="#f5b720",(l=document.createElement("span")).style.background="#53ca29",e.appendChild(i),e.appendChild(a),e.appendChild(l),o.root.querySelector(".lexareatabs").prepend(e)),(s.lineNumbers??!0)||o.root.classList.add("no-gutter"),n.appendChild(t.root),n}console.error("Import the CodeEditor component to create snippets!")},z.makeKbd=function(e,t=0){var s,i={Ctrl:"⌃",Enter:"↩",Shift:"⇧",CapsLock:"⇪",Meta:"⌘",Option:"⌥",Alt:"⌥",Tab:"⇥",ArrowUp:"↑",ArrowDown:"↓",ArrowLeft:"←",ArrowRight:"→",Space:"␣"},a=z.makeContainer(["auto","auto"],"flex flex-row ml-auto");for(s of e)z.makeContainer(["auto","auto"],"self-center text-xs fg-secondary select-none",i[s]??s,a);return a},z.makeIcon=function(s,i={}){let a=null;var e=t=>{i.svgClass&&i.svgClass.length&&i.svgClass.split(" ").forEach(e=>t.classList.add(e));var e=document.createElement("a");return e.title=i.title??"",e.className="lexicon "+(i.iconClass??""),e.appendChild(t),t.dataset.name=s,e};s.includes("@")&&(s=(t=s.split("@"))[0],i.variant=t[1]);let l=z.ICONS[s];var t=lucide[s]??lucide[z.LucideIconAlias[s]];if(l){l.constructor==String&&(l=z.ICONS[l]);var n=i.variant??"regular",o=l[3];if(n==o||!t||"regular"==o){(a=document.createElementNS("http://www.w3.org/2000/svg","svg")).setAttribute("viewBox",`0 0 ${l[0]} `+l[1]),l[5]&&(l[5].svgClass?.split(" ").forEach(e=>{a.classList.add(e)}),l[5].svgAttributes?.split(" ").forEach(e=>{e=e.split("=");a.setAttribute(e[0],e[1])}));let t=document.createElement("path");t.setAttribute("fill","currentColor"),t.setAttribute("d",l[4]),a.appendChild(t),l[5]&&(l[5].pathClass?.split(" ").forEach(e=>{t.classList.add(e)}),l[5].pathAttributes?.split(" ").forEach(e=>{e=e.split("=");t.setAttribute(e[0],e[1])}));return a.innerHTML+="\x3c!-- This icon might belong to a collection from Iconify - https://iconify.design/ - or !Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc. --\x3e",e(a)}}return console.assert(t,`No existing icon named _${s}_`),e(a=lucide.createElement(t,i))},z.registerIcon=function(e,t,s="none",i=[]){var a,l,n=(t=(new DOMParser).parseFromString(t,"image/svg+xml").documentElement).querySelector("path"),o=t.getAttribute("viewBox").split(" "),r=n.getAttribute("d"),c=[],d=[];for(a of t.attributes)switch(a.name){case"transform":case"fill":case"stroke-width":case"stroke-linecap":case"stroke-linejoin":c.push(a.name+"="+a.value)}for(l of n.attributes)switch(l.name){case"transform":case"fill":case"stroke-width":case"stroke-linecap":case"stroke-linejoin":d.push(l.name+"="+l.value)}t=[parseInt(o[2]),parseInt(o[3]),i,s,r,{svgAttributes:c.length?c.join(" "):null,pathAttributes:d.length?d.join(" "):null}],z.ICONS[e]&&console.warn(e+" will be added/replaced in LX.ICONS"),z.ICONS[e]=t},z.registerCommandbarEntry=function(e,t){z.extraCommandbarEntries.push({name:e,callback:t})};z.vec2=class O{constructor(e,t){this.x=e??0,this.y=t??e??0}get xy(){return[this.x,this.y]}get yx(){return[this.y,this.x]}set(e,t){this.x=e,this.y=t}add(e,t=new O){return t.set(this.x+e.x,this.y+e.y),t}sub(e,t=new O){return t.set(this.x-e.x,this.y-e.y),t}mul(e,t=new O){return e.constructor==Number&&(e=new O(e)),t.set(this.x*e.x,this.y*e.y),t}div(e,t=new O){return e.constructor==Number&&(e=new O(e)),t.set(this.x/e.x,this.y/e.y),t}abs(e=new O){return e.set(Math.abs(this.x),Math.abs(this.y)),e}dot(e){return this.x*e.x+this.y*e.y}len2(){return this.dot(this)}len(){return Math.sqrt(this.len2())}nrm(e=new O){return e.set(this.x,this.y),e.mul(1/this.len(),e)}dst(e){return e.sub(this).len()}clp(e,t,s=new O){return s.set(g(this.x,e,t),g(this.y,e,t)),s}};class p{constructor(e){Object.defineProperty(p.prototype,"rgb",{get:function(){return this._rgb},set:function(e){this._fromRGB(e)},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"hex",{get:function(){return this._hex},set:function(e){this._fromHex(e)},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"hsv",{get:function(){return this._hsv},set:function(e){this._fromHSV(e)},enumerable:!0,configurable:!0}),this.set(e)}set(e){if("string"==typeof e&&e.startsWith("#"))this._fromHex(e);else if("r"in e&&"g"in e&&"b"in e)e.a=e.a??1,this._fromRGB(e);else{if(!("h"in e&&"s"in e&&"v"in e))throw e;e.a=e.a??1,this._fromHSV(e)}}setHSV(e){this._fromHSV(e)}setRGB(e){this._fromRGB(e)}setHex(e){this._fromHex(e)}_fromHex(e){this._fromRGB(t(e))}_fromRGB(e){this._rgb=e,this._hsv=a(e),this._hex=s(e),this.css=i(this._rgb)}_fromHSV(e){this._hsv=e,this._rgb=W(e),this._hex=s(this._rgb),this.css=i(this._rgb)}}z.Color=p,z.init=async function(e={}){var t,s;return this.ready||(await z.loadScriptSync("https://unpkg.com/lucide@latest"),console.log("LexGUI v"+this.version),(t=document.createElement("div")).id="lexroot",t.className="lexcontainer",t.tabIndex=-1,e.rootClass&&(t.className+=" "+e.rootClass),this.modal=document.createElement("div"),this.modal.id="modal",this.modal.classList.add("hidden-opacity"),this.modal.toggle=function(e){this.classList.toggle("hidden-opacity",e)},this.root=t,this.container=document.body,e.container&&(this.container=e.container.constructor===String?document.getElementById(e.container):e.container),this.layoutMode=e.layoutMode??"app",document.documentElement.setAttribute("data-layout",this.layoutMode),"document"==this.layoutMode&&document.addEventListener("scroll",e=>{document.body.querySelectorAll(".lexdropdownmenu").forEach(e=>{e._updatePosition()})}),this.container.appendChild(this.modal),e.skipRoot?this.root=document.body:this.container.appendChild(t),(s=document.createElement("section")).className="notifications",this.notifications=document.createElement("ol"),this.notifications.className="",this.notifications.iWidth=0,s.appendChild(this.notifications),document.body.appendChild(s),this.notifications.addEventListener("mouseenter",()=>{this.notifications.classList.add("list")}),this.notifications.addEventListener("mouseleave",()=>{this.notifications.classList.remove("list")}),t.addEventListener("dragover",function(e){e.preventDefault()},!1),document.addEventListener("contextmenu",function(e){e.preventDefault()},!1),this.DEFAULT_NAME_WIDTH="30%",this.DEFAULT_SPLITBAR_SIZE=4,this.OPEN_CONTEXTMENU_ENTRY="click",this.widgetResizeObserver=new ResizeObserver(e=>{for(var t of e){var s=t.target?.jsInstance;s&&s.onResize&&s.onResize(t.contentRect)}}),this.ready=!0,this.menubars=[],this.sidebars=[],this.commandbar=(e=>{let n=document.createElement("dialog"),o=(n.className="commandbar",n.tabIndex=-1,e.appendChild(n),[]),r=null,t=(n.addEventListener("keydown",function(e){var t;e.stopPropagation(),e.stopImmediatePropagation(),r=r??-1,"Escape"==e.key?(this.close(),h(!0)):"Enter"==e.key?(t=o[r])&&(null!=t.item.checked&&(t.item.checked=!t.item.checked),this.close(),t.callback.call(window,t.item.name,t.item.checked)):"ArrowDown"==e.key&&r<o.length-1?(r++,n.querySelectorAll(".hovered").forEach(e=>e.classList.remove("hovered")),o[r].classList.add("hovered"),0<(t=o[r].offsetHeight*(r+1)-c.offsetHeight)&&c.scrollTo({top:t,behavior:"smooth"})):"ArrowUp"==e.key&&0<r&&(r--,n.querySelectorAll(".hovered").forEach(e=>e.classList.remove("hovered")),o[r].classList.add("hovered"))}),n.addEventListener("focusout",function(e){e.relatedTarget!=e.currentTarget&&(e.stopPropagation(),e.stopImmediatePropagation(),this.close(),h(!0))}),e.addEventListener("keydown",e=>{if(" "==e.key&&e.ctrlKey)e.stopImmediatePropagation(),e.stopPropagation(),z.setCommandbarState(!0);else for(var t of z.components){var s;if(z[t]&&z[t].prototype.onKeyPressed)for(s of z.CodeEditor.getInstances())s.onKeyPressed(e)}}),e=z.makeContainer(["100%","auto"],"flex flex-row"),new k(null,"",e=>{n._addElements(e.toLowerCase())},{width:"100%",icon:"Search",trigger:"input",placeholder:"Search..."}));e.appendChild(t.root);var s=new x({width:"100%",skipAppend:!0,className:"cb-tabs"}),i=s.addTabs({parentClass:"p-2"});let a,c=(i.add("All",document.createElement("div"),{selected:!0,onSelect:(e,t)=>{a=t}}),document.createElement("div")),d=(c.className="searchitembox",null),h=e=>{c.innerHTML="",o.length=0,r=null,e&&t.set("",!0)},u=(t,s,e,i)=>{var a,l;t.length&&(d&&d.classList.remove("last"),(a=document.createElement("div")).className="searchitem last",void 0!==i?.checked?(l=i.checked?z.makeIcon("Check").innerHTML:"",a.innerHTML=l+(e+t)):a.innerHTML=e+t,a.callback=s,a.item=i,a.addEventListener("click",e=>{null!=i.checked&&(i.checked=!i.checked),s.call(window,t,i.checked),z.setCommandbarState(!1),h(!0)}),a.addEventListener("mouseenter",function(e){n.querySelectorAll(".hovered").forEach(e=>e.classList.remove("hovered")),this.classList.add("hovered"),r=o.indexOf(this)}),a.addEventListener("mouseleave",function(e){this.classList.remove("hovered")}),o.push(a),c.appendChild(a),d=a)},p=(e,t,s,i)=>{if(e){var a,l=e.name,e=(l.toLowerCase().includes(t)&&e.callback&&u(l,e.callback,s,e),e.submenu??e[l]);if(!i&&e){s+=l+z.makeIcon("ChevronRight",{svgClass:"sm fg-secondary separator"}).innerHTML;for(a of e)p(a,t,s)}}};return n._addElements=e=>{h();for(var t of z.menubars)for(var s of t.items)p(s,e,"");for(var i of z.sidebars)for(var a of i.items)p(a,e,"");for(var l of z.extraCommandbarEntries){var n=l.name;n.toLowerCase().includes(e)&&u(n,l.callback,"",{})}if(z.has("CodeEditor")){let s=z.CodeEditor.getInstances();if(s.length&&s[0].area.root.offsetHeight){var o=s[0].languages;for(let t of Object.keys(o)){var r="Language: "+t,c=s[0]._getFileIcon(null,o[t].ext).split(" "),c=z.makeIcon(c[0],{svgClass:""+c.slice(0).join(" ")}).innerHTML;c+=r+" <span class='lang-ext'>("+o[t].ext+")</span>",r.toLowerCase().includes(e)&&u(c,()=>{for(var e of s)e._changeLanguage(t)},"",{})}}}},n.appendChild(e),n.appendChild(s.root),n.appendChild(c),n})(this.container),e.skipRoot||e.skipDefaultArea||(this.main_area=new x({id:e.id??"mainarea"})),(e.autoTheme??!0)&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches&&(z.setTheme("light"),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",e=>{z.setTheme(e.matches?"dark":"light")}))),this.main_area},z.setLayoutMode=function(e){this.layoutMode=e,document.documentElement.setAttribute("data-layout",this.layoutMode)},z.setCommandbarState=function(e,t=!0){var s=this.commandbar;e?(s.show(),s.querySelector("input").focus(),t&&s._addElements(void 0)):s.close()},z.message=function(t,e,s={}){if(t)return s.modal=!0,new S(e,e=>{e.addTextArea(null,t,null,{disabled:!0,fitHeight:!0})},s);throw"No message to show"},z.popup=function(t,e,s={}){if(!t)throw"No message to show";s.size=s.size??["max-content","auto"],s.class="lexpopup";var i=s.timeout||3e3;let a=new S(e,e=>{e.addTextArea(null,t,null,{disabled:!0,fitHeight:!0})},s);return setTimeout(()=>{a.close()},Math.max(i,150)),a},z.prompt=function t(s,i,a,l={}){l.modal=!0,l.className="prompt";let n="",o=new S(i,e=>{e.addTextArea(null,s,null,{disabled:!0,fitHeight:!0}),(l.input??!0)&&e.addText(null,l.input||n,e=>n=e,{placeholder:"..."}),e.sameLine(2),e.addButton(null,"Cancel",()=>{l.on_cancel&&l.on_cancel(),o.close()}),e.addButton(null,l.accept||"Continue",()=>{l.required&&""===n?(s+=s.includes("You must fill the input text.")?"":"\nYou must fill the input text.",o.close(),t(s,i,a,l)):(a&&a.call(this,n),o.close())},{buttonClass:"primary"})},l);return(l.input??!0)&&o.root.querySelector("input").focus(),o},z.toast=function(e,t,s={}){if(!e)throw"The toast needs at least a title!";console.assert(this.notifications);let i=document.createElement("li");i.className="lextoast",i.style.translate="0 calc(100% + 30px)",this.notifications.prepend(i),N(()=>{this.notifications.offsetWidth>this.notifications.iWidth&&(this.notifications.iWidth=Math.min(this.notifications.offsetWidth,480),this.notifications.style.width=this.notifications.iWidth+"px"),i.dataset.open=!0},10);var a=document.createElement("div"),l=(a.className="lextoastcontent",i.appendChild(a),document.createElement("div"));l.className="title",l.innerHTML=e,a.appendChild(l),t&&((e=document.createElement("div")).className="desc",e.innerHTML=t,a.appendChild(e)),s.action&&((l=new P).addButton(null,s.action.name??"Accept",s.action.callback.bind(this,i),{width:"auto",maxWidth:"150px",className:"right",buttonClass:"border"}),i.appendChild(l.root.childNodes[0]));let n=this;i.close=function(){this.dataset.closed=!0,N(()=>{this.remove(),n.notifications.childElementCount||(n.notifications.style.width="unset",n.notifications.iWidth=0)},500)},(s.closable??!0)&&((t=z.makeIcon("X",{iconClass:"closer"})).addEventListener("click",()=>{i.close()}),i.appendChild(t)),-1!=(a=s.timeout??3e3)&&N(()=>{i.close()},a)},z.badge=function(e,t,s={}){var i=document.createElement("div");return i.innerHTML=e,i.className="lexbadge "+(t??""),Object.assign(i.style,s.style??{}),s.asElement?i:i.outerHTML},z.makeElement=function(e,t,s,i,a={}){return(e=document.createElement(e)).className=t??"",e.innerHTML=s??"",Object.assign(e.style,a),i&&(i.attach?i.attach(e):i.appendChild(e)),e},z.makeContainer=function(e,t,s,i,a={}){return(t=z.makeElement("div","lexcontainer "+(t??""),s,i,a)).style.width=e&&e[0]?e[0]:"100%",t.style.height=e&&e[1]?e[1]:"100%",t},z.asTooltip=function(t,s,a={}){console.assert(t,"You need a trigger to generate a tooltip!"),t.dataset.disableTooltip=!(a.active??!0);let l=null;t.addEventListener("mouseenter",function(e){"true"!=t.dataset.disableTooltip&&(z.root.querySelectorAll(".lextooltip").forEach(e=>e.remove()),(l=document.createElement("div")).className="lextooltip",l.innerHTML=s,N(()=>{var e=[0,0],t=this.getBoundingClientRect(),s=a.offset??6;let i=!0;switch(a.side??"top"){case"left":e[0]+=t.x-l.offsetWidth-s,i=!1;break;case"right":e[0]+=t.x+t.width+s,i=!1;break;case"top":e[1]+=t.y-l.offsetHeight-s,i=!0;break;case"bottom":e[1]+=t.y+t.height+s,i=!0}i?e[0]+=t.x+.5*t.width-.5*l.offsetWidth:e[1]+=t.y+.5*t.height-.5*l.offsetHeight,e[0]=z.clamp(e[0],0,window.innerWidth-l.offsetWidth-4),e[1]=z.clamp(e[1],0,window.innerHeight-l.offsetHeight-4),l.style.left=e[0]+"px",l.style.top=e[1]+"px"}),z.root.appendChild(l))}),t.addEventListener("mouseleave",function(e){l&&(l.dataset.closed=!0,N(()=>{l.remove()},300))})};class b{constructor(e,t,s){this.name=e,this.value=t,this.domEvent=s}}z.IEvent=b;class E{static NONE=0;static NODE_SELECTED=1;static NODE_DELETED=2;static NODE_DBLCLICKED=3;static NODE_CONTEXTMENU=4;static NODE_DRAGGED=5;static NODE_RENAMED=6;static NODE_VISIBILITY=7;static NODE_CARETCHANGED=8;constructor(e,t,s){this.type=e||E.NONE,this.node=t,this.value=s,this.multiple=!1,this.panel=null}string(){switch(this.type){case E.NONE:return"tree_event_none";case E.NODE_SELECTED:return"tree_event_selected";case E.NODE_DELETED:return"tree_event_deleted";case E.NODE_DBLCLICKED:return"tree_event_dblclick";case E.NODE_CONTEXTMENU:return"tree_event_contextmenu";case E.NODE_DRAGGED:return"tree_event_dragged";case E.NODE_RENAMED:return"tree_event_renamed";case E.NODE_VISIBILITY:return"tree_event_visibility";case E.NODE_CARETCHANGED:return"tree_event_caretchanged"}}}z.TreeEvent=E,z.emit=function(e,t,s={}){var i=z.signals[e];if(i){var a,l=s.target;if(l)l[e]&&l[e].call(l,t);else for(var n of i)n instanceof w?n.set(t,s.skipCallback??!0):n.constructor===Function?n(null,t):(a=n[e],console.assert(a,`No callback registered with _${e}_ signal`),a.bind(n)(t))}},z.addSignal=function(e,t,s){t[e]=s,z.signals[e]||(z.signals[e]=[]),-1<z.signals[e].indexOf(t)||z.signals[e].push(t)};class m{static activeElement=!1;constructor(e,t,s={}){console.assert(e,"Popover needs a DOM element as trigger!"),m.activeElement?m.activeElement.destroy():((this._trigger=e).classList.add("triggered"),(e.active=this)._windowPadding=4,this.side=s.side??"bottom",this.align=s.align??"center",this.avoidCollisions=s.avoidCollisions??!0,this.root=document.createElement("div"),this.root.dataset.side=this.side,this.root.tabIndex="1",this.root.className="lexpopover",z.root.appendChild(this.root),this.root.addEventListener("keydown",e=>{"Escape"==e.key&&(e.preventDefault(),e.stopPropagation(),this.destroy())}),t&&(t=[].concat(t)).forEach(e=>{var t=e.root??e;this.root.appendChild(t),e.onPopover&&e.onPopover()}),m.activeElement=this,N(()=>{this._adjustPosition(),this.root.focus(),this._onClick=e=>{e.target&&(this.root.contains(e.target)||e.target==this._trigger)||this.destroy()},document.body.addEventListener("mousedown",this._onClick,!0),document.body.addEventListener("focusin",this._onClick,!0)},10))}destroy(){this._trigger.classList.remove("triggered"),delete this._trigger.active,document.body.removeEventListener("mousedown",this._onClick,!0),document.body.removeEventListener("focusin",this._onClick,!0),this.root.remove(),m.activeElement=null}_adjustPosition(){var t=[0,0];{var s=this._trigger.getBoundingClientRect();let e=!0;switch(this.side){case"left":t[0]+=s.x-this.root.offsetWidth,e=!1;break;case"right":t[0]+=s.x+s.width,e=!1;break;case"top":t[1]+=s.y-this.root.offsetHeight,e=!0;break;case"bottom":t[1]+=s.y+s.height,e=!0}switch(this.align){case"start":e?t[0]+=s.x:t[1]+=s.y;break;case"center":e?t[0]+=s.x+.5*s.width-.5*this.root.offsetWidth:t[1]+=s.y+.5*s.height-.5*this.root.offsetHeight;break;case"end":e?t[0]+=s.x-this.root.offsetWidth+s.width:t[1]+=s.y-this.root.offsetHeight+s.height}}this.avoidCollisions&&(t[0]=z.clamp(t[0],0,window.innerWidth-this.root.offsetWidth-this._windowPadding),t[1]=z.clamp(t[1],0,window.innerHeight-this.root.offsetHeight-this._windowPadding)),this.root.style.left=t[0]+"px",this.root.style.top=t[1]+"px"}}z.Popover=m;z.Sheet=class{constructor(e,t,s={}){this.side=s.side??"left",this.root=document.createElement("div"),this.root.dataset.side=this.side,this.root.tabIndex="1",this.root.role="dialog",this.root.className="lexsheet fixed z-100 bg-primary",z.root.appendChild(this.root),this.root.addEventListener("keydown",e=>{"Escape"==e.key&&(e.preventDefault(),e.stopPropagation(),this.destroy())}),t&&(t=[].concat(t)).forEach(e=>{var t=e.root??e;this.root.appendChild(t),e.onSheet&&e.onSheet()}),N(()=>{switch(z.modal.toggle(!1),this.side){case"left":this.root.style.left=0,this.root.style.width=e,this.root.style.height="100%";break;case"right":this.root.style.right=0,this.root.style.width=e,this.root.style.height="100%";break;case"top":this.root.style.top=0,this.root.style.width="100%",this.root.style.height=e;break;case"bottom":this.root.style.bottom=0,this.root.style.width="100%",this.root.style.height=e}this.root.focus(),this._onClick=e=>{e.target&&this.root.contains(e.target)||this.destroy()},document.body.addEventListener("mousedown",this._onClick,!0),document.body.addEventListener("focusin",this._onClick,!0)},10)}destroy(){document.body.removeEventListener("mousedown",this._onClick,!0),document.body.removeEventListener("focusin",this._onClick,!0),this.root.remove(),z.modal.toggle(!0)}};class A{static currentMenu=!1;constructor(e,t,s={}){console.assert(e,"DropdownMenu needs a DOM element as trigger!"),A.currentMenu||!t?.length?(A.currentMenu.destroy(),this.invalid=!0):((this._trigger=e).classList.add("triggered"),(e.ddm=this)._items=t,this._windowPadding=4,this.side=s.side??"bottom",this.align=s.align??"center",this.avoidCollisions=s.avoidCollisions??!0,this.onBlur=s.onBlur,this.inPlace=!1,this.root=document.createElement("div"),this.root.id="root",this.root.dataset.side=this.side,this.root.tabIndex="1",this.root.className="lexdropdownmenu",z.root.appendChild(this.root),this._create(this._items),A.currentMenu=this,N(()=>{this._adjustPosition(),this.root.focus(),this._onClick=e=>{e.target&&(null!=e.target.closest(".lexdropdownmenu")||e.target==this._trigger)||this.destroy(!0)},document.body.addEventListener("mousedown",this._onClick,!0),document.body.addEventListener("focusin",this._onClick,!0)},10))}destroy(e){this._trigger.classList.remove("triggered"),delete this._trigger.ddm,document.body.removeEventListener("mousedown",this._onClick,!0),document.body.removeEventListener("focusin",this._onClick,!0),z.root.querySelectorAll(".lexdropdownmenu").forEach(e=>{e.remove()}),A.currentMenu=null,e&&this.onBlur&&this.onBlur()}_create(e,n){if(n){let t=n.getBoundingClientRect(),s=document.createElement("div");s.tabIndex="1",s.className="lexdropdownmenu",s.dataset.id=n.dataset.id,s.dataset.side="right",z.root.appendChild(s),s.currentParent=n,n=s,N(()=>{var e=[t.x+t.width,t.y];this.avoidCollisions&&(e[0]=z.clamp(e[0],0,window.innerWidth-s.offsetWidth-this._windowPadding),e[1]=z.clamp(e[1],0,window.innerHeight-s.offsetHeight-this._windowPadding)),s.style.left=e[0]+"px",s.style.top=e[1]+"px"},10)}else n=this.root;var t=0<e.filter(e=>null!=e?.icon||null!=e?.checked).length;for(let l of e)if(l){let a=l.name??l;var o=z.getSupportedDOMName(a);if(!n.querySelector("#"+o)){let i=document.createElement("div");if(i.className="lexdropdownmenuitem"+(l.name?"":" label")+(l.disabled?" disabled":"")+" "+(l.className??""),i.dataset.id=o,i.innerHTML=`<span>${a}</span>`,i.tabIndex="1",n.appendChild(i),l.constructor!==String){l.submenu?(s=z.makeIcon("Right",{svgClass:"sm"}),i.appendChild(s)):l.kbd&&(l.kbd=[].concat(l.kbd),s=z.makeKbd(l.kbd),i.appendChild(s),document.addEventListener("keydown",t=>{if(this._trigger.ddm){t.preventDefault();let e=l.kbd.join("");(e=1==e.length?e.toLowerCase():e)==t.key&&i.click()}}));var s,r,c=l.disabled??!1;if(l.icon?(r=z.makeIcon(l.icon,{svgClass:c?"fg-tertiary":l.className}),i.prepend(r)):null==l.checked&&t&&i.classList.add("pl-8"),!c){if(null!=l.checked){let t=new ie(o+"_entryChecked",l.checked,e=>{var t=l.callback;t&&t.call(this,a,e,i)},{className:"accent"}),s=t.root.querySelector("input");s.classList.add("ml-auto"),i.appendChild(s),i.addEventListener("click",e=>{"checkbox"!=e.target.type&&(s.checked=!s.checked,t.set(s.checked))})}else i.addEventListener("click",()=>{var e=l.callback;e&&e.call(this,a,i),this.destroy(!0)});i.addEventListener("mouseover",e=>{let t=i.dataset.id,s=n;for(;s;)t+="/"+s.dataset.id,s=s.currentParent?.parentElement;if(z.root.querySelectorAll(".lexdropdownmenu").forEach(e=>{t.includes(e.dataset.id)||(e.currentParent.built=!1,e.remove())}),l.submenu&&this.inPlace){if(i.built)return;i.built=!0,this._create(l.submenu,i)}e.stopPropagation()})}}}}else this._addSeparator(n)}_adjustPosition(){var t=[0,0];{var s=this._trigger.getBoundingClientRect();let e=!0;switch(this.side){case"left":t[0]+=s.x-this.root.offsetWidth,e=!1;break;case"right":t[0]+=s.x+s.width,e=!1;break;case"top":t[1]+=s.y-this.root.offsetHeight,e=!0;break;case"bottom":t[1]+=s.y+s.height,e=!0}switch(this.align){case"start":e?t[0]+=s.x:t[1]+=s.y;break;case"center":e?t[0]+=s.x+.5*s.width-.5*this.root.offsetWidth:t[1]+=s.y+.5*s.height-.5*this.root.offsetHeight;break;case"end":e?t[0]+=s.x-this.root.offsetWidth+s.width:t[1]+=s.y-this.root.offsetHeight+s.height}}this.avoidCollisions&&(t[0]=z.clamp(t[0],0,window.innerWidth-this.root.offsetWidth-this._windowPadding),t[1]=z.clamp(t[1],0,window.innerHeight-this.root.offsetHeight-this._windowPadding)),this.root.style.left=t[0]+"px",this.root.style.top=t[1]+"px",this.inPlace=!0}_addSeparator(e){var t=document.createElement("div");t.className="separator",(e=e??this.root).appendChild(t)}}function V(e,t,s){e=new A(e,t,s);return e.invalid?null:e}z.DropdownMenu=A,z.addDropdownMenu=V;class q{static currentPicker=!1;constructor(e,t={}){this.colorModel=t.colorModel??"Hex",this.useAlpha=t.useAlpha??!1,this.callback=t.onChange,this.callback||console.warn("Define a callback in _options.onChange_ to allow getting new Color values!"),this.root=document.createElement("div"),this.root.className="lexcolorpicker",this.markerHalfSize=8,this.markerSize=2*this.markerHalfSize,this.currentColor=new p(e);t=new p({h:this.currentColor.hsv.h,s:1,v:1});this.colorPickerBackground=document.createElement("div"),this.colorPickerBackground.className="lexcolorpickerbg",this.colorPickerBackground.style.backgroundColor=`rgb(${t.css.r}, ${t.css.g}, ${t.css.b})`,this.root.appendChild(this.colorPickerBackground),this.intSatMarker=document.createElement("div"),this.intSatMarker.className="lexcolormarker",this.intSatMarker.style.backgroundColor=this.currentColor.hex,this.colorPickerBackground.appendChild(this.intSatMarker);let l=null;let s=e=>{var t=e.movementX,s=e.movementY,i=e.x-l.x,a=e.y-l.y;0!=t&&(0<=i||t<0)&&(i<this.colorPickerBackground.offsetWidth||0<t)&&(this.intSatMarker.style.left=z.clamp(parseInt(this.intSatMarker.style.left)+t,-this.markerHalfSize,this.colorPickerBackground.offsetWidth-this.markerHalfSize)+"px"),0!=s&&(0<=a||s<0)&&(a<this.colorPickerBackground.offsetHeight||0<s)&&(this.intSatMarker.style.top=z.clamp(parseInt(this.intSatMarker.style.top)+s,-this.markerHalfSize,this.colorPickerBackground.offsetHeight-this.markerHalfSize)+"px"),this._positionToSv(parseInt(this.intSatMarker.style.left),parseInt(this.intSatMarker.style.top)),this._updateColorValue(),e.stopPropagation(),e.preventDefault()},i=e=>{var t=this.root.ownerDocument;t.removeEventListener("mousemove",s),t.removeEventListener("mouseup",i),document.body.classList.remove("noevents")};this.colorPickerBackground.addEventListener("mousedown",e=>{var t=this.root.ownerDocument,t=(t.addEventListener("mousemove",s),t.addEventListener("mouseup",i),document.body.classList.add("noevents"),e.stopImmediatePropagation(),e.stopPropagation(),e.offsetX-this.markerHalfSize),e=(this.intSatMarker.style.left=t+"px",e.offsetY-this.markerHalfSize);this.intSatMarker.style.top=e+"px",this._positionToSv(t,e),this._updateColorValue(),l=this.colorPickerBackground.getBoundingClientRect()});var n=z.makeContainer(["100%","auto"],"flex flex-row gap-1 items-center","",this.root),n=(window.EyeDropper&&n.appendChild(new _(null,"eyedrop",async()=>{var e=new EyeDropper;try{var t=await e.open();this.fromHexColor(t.sRGBHex)}catch(e){}},{icon:"Pipette",buttonClass:"bg-none",title:"Sample Color"}).root),z.makeContainer(["100%","100%"],"flex flex-col gap-2","",n));this.colorPickerTracker=document.createElement("div"),this.colorPickerTracker.className="lexhuetracker",n.appendChild(this.colorPickerTracker),this.hueMarker=document.createElement("div"),this.hueMarker.className="lexcolormarker",this.hueMarker.style.backgroundColor=`rgb(${t.css.r}, ${t.css.g}, ${t.css.b})`,this.colorPickerTracker.appendChild(this.hueMarker);let a=e=>{this.hueMarker.style.left=e+"px",this.currentColor.hsv.h=z.remapRange(e,0,this.colorPickerTracker.offsetWidth-this.markerSize,0,360);e=new p({h:this.currentColor.hsv.h,s:1,v:1});this.hueMarker.style.backgroundColor=`rgb(${e.css.r}, ${e.css.g}, ${e.css.b})`,this.colorPickerBackground.style.backgroundColor=`rgb(${e.css.r}, ${e.css.g}, ${e.css.b})`,this._updateColorValue()},o=null;let r=e=>{var t=e.movementX,s=e.x-o.x;0!=t&&(s>=this.markerHalfSize||t<0)&&(s<this.colorPickerTracker.offsetWidth-this.markerHalfSize||0<t)&&(s=z.clamp(parseInt(this.hueMarker.style.left)+t,0,this.colorPickerTracker.offsetWidth-this.markerSize),a(s)),e.stopPropagation(),e.preventDefault()},c=e=>{var t=this.root.ownerDocument;t.removeEventListener("mousemove",r),t.removeEventListener("mouseup",c),document.body.classList.remove("noevents")};if(this.colorPickerTracker.addEventListener("mousedown",e=>{var t=this.root.ownerDocument,t=(t.addEventListener("mousemove",r),t.addEventListener("mouseup",c),document.body.classList.add("noevents"),e.stopImmediatePropagation(),e.stopPropagation(),g(e.offsetX-this.markerHalfSize,0,this.colorPickerTracker.offsetWidth-this.markerSize));a(t),o=this.colorPickerTracker.getBoundingClientRect()}),this.useAlpha){this.alphaTracker=document.createElement("div"),this.alphaTracker.className="lexalphatracker",this.alphaTracker.style.color=`rgb(${this.currentColor.css.r}, ${this.currentColor.css.g}, ${this.currentColor.css.b})`,n.appendChild(this.alphaTracker),this.alphaMarker=document.createElement("div"),this.alphaMarker.className="lexcolormarker",this.alphaMarker.style.backgroundColor=`rgb(${this.currentColor.css.r}, ${this.currentColor.css.g}, ${this.currentColor.css.b},${this.currentColor.css.a})`,this.alphaTracker.appendChild(this.alphaMarker);let i=e=>{this.alphaMarker.style.left=e+"px",this.currentColor.hsv.a=z.remapRange(e,0,this.alphaTracker.offsetWidth-this.markerSize,0,1),this._updateColorValue(),this.alphaMarker.style.backgroundColor=`rgb(${this.currentColor.css.r}, ${this.currentColor.css.g}, ${this.currentColor.css.b},${this.currentColor.css.a})`},a=null;let s=e=>{var t=e.movementX,s=e.x-a.x;0!=t&&(s>=this.markerHalfSize||t<0)&&(s<this.alphaTracker.offsetWidth-this.markerHalfSize||0<t)&&(s=z.clamp(parseInt(this.alphaMarker.style.left)+t,0,this.alphaTracker.offsetWidth-this.markerSize),i(s)),e.stopPropagation(),e.preventDefault()},l=e=>{var t=this.root.ownerDocument;t.removeEventListener("mousemove",s),t.removeEventListener("mouseup",l),document.body.classList.remove("noevents")};this.alphaTracker.addEventListener("mousedown",e=>{var t=this.root.ownerDocument,t=(t.addEventListener("mousemove",s),t.addEventListener("mouseup",l),document.body.classList.add("noevents"),e.stopImmediatePropagation(),e.stopPropagation(),g(e.offsetX-this.markerHalfSize,0,this.alphaTracker.offsetWidth-this.markerSize));i(t),a=this.alphaTracker.getBoundingClientRect()})}t=z.makeContainer(["100%","auto"],"flex flex-row gap-1","",this.root);t.appendChild(new M(null,["CSS","Hex","HSV","RGB"],this.colorModel,e=>{this.colorModel=e,this._updateColorValue(null,!0)}).root),this.labelWidget=new k(null,"",null,{inputClass:"bg-none",fit:!0,disabled:!0}),t.appendChild(this.labelWidget.root);{let e=new _(null,"copy",async()=>{navigator.clipboard.writeText(this.labelWidget.value()),e.root.querySelector("input[type='checkbox']").style.pointerEvents="none",N(()=>{e.root.swap(!0),e.root.querySelector("input[type='checkbox']").style.pointerEvents="auto"},3e3)},{swap:"Check",icon:"Copy",buttonClass:"bg-none",className:"ml-auto",title:"Copy"});e.root.querySelector(".swap-on svg").addClass("fg-success"),t.appendChild(e.root)}this._updateColorValue(e,!0),N(this._placeMarkers.bind(this)),this.onPopover=this._placeMarkers.bind(this)}_placeMarkers(){this._svToPosition(this.currentColor.hsv.s,this.currentColor.hsv.v);var e=z.remapRange(this.currentColor.hsv.h,0,360,0,this.colorPickerTracker.offsetWidth-this.markerSize);this.hueMarker.style.left=e+"px",this.useAlpha&&(e=z.remapRange(this.currentColor.hsv.a,0,1,0,this.alphaTracker.offsetWidth-this.markerSize),this.alphaMarker.style.left=e+"px")}_svToPosition(e,t){this.intSatMarker.style.left=z.remapRange(e,0,1,-this.markerHalfSize,this.colorPickerBackground.offsetWidth-this.markerHalfSize)+"px",this.intSatMarker.style.top=z.remapRange(1-t,0,1,-this.markerHalfSize,this.colorPickerBackground.offsetHeight-this.markerHalfSize)+"px"}_positionToSv(e,t){this.currentColor.hsv.s=z.remapRange(e,-this.markerHalfSize,this.colorPickerBackground.offsetWidth-this.markerHalfSize,0,1),this.currentColor.hsv.v=1-z.remapRange(t,-this.markerHalfSize,this.colorPickerBackground.offsetHeight-this.markerHalfSize,0,1)}_updateColorValue(e,t=!1){this.currentColor.set(e??this.currentColor.hsv),this.callback&&!t&&this.callback(this.currentColor),this.intSatMarker.style.backgroundColor=this.currentColor.hex,this.useAlpha&&(this.alphaTracker.style.color=`rgb(${this.currentColor.css.r}, ${this.currentColor.css.g}, ${this.currentColor.css.b})`);var s,i,a,e=(e,t=2)=>e.toFixed(t).replace(/([0-9]+(\.[0-9]+[1-9])?)(\.?0+$)/,"$1");"CSS"==this.colorModel?({r:t,g:a,b:s,a:i}=this.currentColor.css,this.labelWidget.set(`rgb${this.useAlpha?"a":""}(${t},${a},${s}${this.useAlpha?","+e(i):""})`)):"Hex"==this.colorModel?this.labelWidget.set((this.useAlpha?this.currentColor.hex:this.currentColor.hex.substr(0,7)).toUpperCase()):"HSV"==this.colorModel?({h:t,s:a,v:s,a:i}=this.currentColor.hsv,t=[Math.floor(t)+"º",Math.floor(100*a)+"%",Math.floor(100*s)+"%"],this.useAlpha&&t.push(e(i)),this.labelWidget.set(t.join(" "))):({r:a,g:s,b:i,a:t}=this.currentColor.rgb,a=[e(a),e(s),e(i)],this.useAlpha&&a.push(e(t)),this.labelWidget.set(a.join(" ")))}fromHexColor(e){this.currentColor.setHex(e);var{h:t,s,v:i}=this.currentColor.hsv,s=(this._svToPosition(s,i),new p({h:t,s:1,v:1}));this.hueMarker.style.backgroundColor=this.colorPickerBackground.style.backgroundColor=`rgb(${s.css.r}, ${s.css.g}, ${s.css.b})`,this.hueMarker.style.left=z.remapRange(t,0,360,-this.markerHalfSize,this.colorPickerTracker.offsetWidth-this.markerHalfSize)+"px",this._updateColorValue(e)}}z.ColorPicker=q;class ${constructor(e,t={}){this.root=z.makeContainer(["256px","auto"],"border p-3 bg-primary rounded-lg text-md"),this.onChange=t.onChange,this.untilToday=t.untilToday,this.fromToday=t.fromToday,e?this.fromDateString(e):(t=new Date,this.month=t.getMonth()+1,this.year=t.getFullYear(),this.fromMonthYear(this.month,this.year))}_getCurrentDate(){return{day:this.day,month:this.month,year:this.year,fullDate:this.getFullDate()}}_previousMonth(){this.month=Math.max(0,this.month-1),0==this.month&&(this.month=12,this.year--),this.fromMonthYear(this.month,this.year)}_nextMonth(){this.month=Math.min(this.month+1,12),12==this.month&&(this.month=0,this.year++),this.fromMonthYear(this.month,this.year)}refresh(){this.root.innerHTML="";var e,t=z.makeContainer(["100%","auto"],"flex flex-row p-1","",this.root),s=z.makeIcon("Left",{title:"Previous Month",iconClass:"border p-1 rounded hover:bg-secondary",svgClass:"sm"}),s=(t.appendChild(s),s.addEventListener("click",()=>{this._previousMonth()}),z.makeContainer(["100%","auto"],"text-center font-medium select-none",this.monthName+" "+this.year,t),z.makeIcon("Right",{title:"Next Month",iconClass:"border p-1 rounded hover:bg-secondary",svgClass:"sm"})),t=(t.appendChild(s),s.addEventListener("click",()=>{this._nextMonth()}),document.createElement("table")),s=(t.className="w-full",this.root.appendChild(t),document.createElement("thead")),i=(t.appendChild(s),document.createElement("tr"));for(e of["Mo","Tu","We","Th","Fr","Sa","Su"]){var a=document.createElement("th");a.className="fg-tertiary text-sm font-normal select-none",a.innerHTML=`<span>${e}</span>`,i.appendChild(a)}s.appendChild(i);var l=document.createElement("tbody");t.appendChild(l);for(let t=0;t<6;t++){var n=document.createElement("tr");for(let e of this.calendarDays.slice(7*t,7*t+7)){var o=document.createElement("th"),r=(o.className="leading-loose font-normal rounded select-none cursor-pointer",new Date(`${this.month}/${e.day}/`+this.year)),c=new Date,d=!this.untilToday||r.getTime()<c.getTime(),r=!this.fromToday||r.getTime()>c.getTime(),c=e.currentMonth&&d&&r;this.currentDate&&e.day==this.currentDate.day&&this.month==this.currentDate.month&&this.year==this.currentDate.year&&e.currentMonth?o.className+=" bg-contrast fg-contrast":o.className+=` ${c?"fg-primary":"fg-tertiary"} hover:bg-secondary`,o.innerHTML=`<span>${e.day}</span>`,n.appendChild(o),c&&o.addEventListener("click",()=>{this.day=e.day,this.currentDate=this._getCurrentDate(),this.onChange&&this.onChange(this.currentDate)})}l.appendChild(n)}}fromDateString(e){e=e.split("/");this.day=parseInt(e[0]),this.month=parseInt(e[1]),this.year=parseInt(e[2]),this.currentDate=this._getCurrentDate(),this.fromMonthYear(this.month,this.year)}fromMonthYear(e,t){e--,t=t??(new Date).getFullYear();var s=new Date(t,e,1).getDay(),s=0===s?6:s-1,i=new Date(t,e+1,0).getDate(),a=new Date(0===e?t-1:t,1+(0===e?11:e-1),0).getDate(),l=[];for(let e=s-1;0<=e;e--)l.push({day:a-e,currentMonth:!1});for(let e=1;e<=i;e++)l.push({day:e,currentMonth:!0});var n=42-l.length;for(let e=1;e<=n;e++)l.push({day:e,currentMonth:!1});this.monthName=this.getMonthName(e),this.firstDay=s,this.daysInMonth=i,this.calendarDays=l,this.refresh()}getMonthName(e,t="en-US"){return new Intl.DateTimeFormat(t,{month:"long"}).format(new Date(2e3,e,1))}getFullDate(){return`${this.monthName} ${this.day}${this._getOrdinalSuffix(this.day)}, `+this.year}_getOrdinalSuffix(e){if(3<e&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}}z.Calendar=$;class x{constructor(e={}){var t=document.createElement("div"),s=(t.className="lexarea",e.id&&(t.id=e.id),e.className&&(t.className+=" "+e.className),e.width||"100%"),l=e.height||"100%",s=(this.setLimitBox(e.minWidth,e.minHeight,e.maxWidth,e.maxHeight),s.constructor==Number&&(s+="px"),l.constructor==Number&&(l+="px"),t.style.width=s,t.style.height=l,this.offset=0,this.root=t,this.size=[this.root.offsetWidth,this.root.offsetHeight],this.sections=[],this.panels=[],document.getElementById("lexroot")),l=(s&&!e.skipAppend&&s.appendChild(this.root),e.overlay);if(l&&(this.root.classList.add("overlay-"+l),e.left?this.root.style.left=e.left:e.right?this.root.style.right=e.right:e.top?this.root.style.top=e.top:e.bottom&&(this.root.style.bottom=e.bottom),(e.draggable??!0)&&h(t,e),e.resizeable&&t.classList.add("resizeable"),e.resize)){this.splitBar=document.createElement("div");s="left"==l||"right"==l?"horizontal":"vertical";this.type=l,this.splitBar.className="lexsplitbar "+s,"right"==l?(this.splitBar.style.width=z.DEFAULT_SPLITBAR_SIZE+"px",this.splitBar.style.left=-z.DEFAULT_SPLITBAR_SIZE/2+"px"):"left"==l?(t=Math.min(document.body.clientWidth-z.DEFAULT_SPLITBAR_SIZE,this.root.clientWidth),this.splitBar.style.width=z.DEFAULT_SPLITBAR_SIZE+"px",this.splitBar.style.left=t+z.DEFAULT_SPLITBAR_SIZE/2+"px"):"top"==l?(e=Math.min(document.body.clientHeight-z.DEFAULT_SPLITBAR_SIZE,this.root.clientHeight),this.splitBar.style.height=z.DEFAULT_SPLITBAR_SIZE+"px",this.splitBar.style.top=e+z.DEFAULT_SPLITBAR_SIZE/2+"px"):"bottom"==l&&(this.splitBar.style.height=z.DEFAULT_SPLITBAR_SIZE+"px",this.splitBar.style.top=-z.DEFAULT_SPLITBAR_SIZE/2+"px"),this.splitBar.addEventListener("mousedown",function(e){var t=i.root.ownerDocument;t.addEventListener("mousemove",n),t.addEventListener("mouseup",o),a[0]=e.x,a[1]=e.y,e.stopPropagation(),e.preventDefault(),document.body.classList.add("nocursor"),i.splitBar.classList.add("nocursor")}),this.root.appendChild(this.splitBar);let i=this,a=[0,0];function n(e){switch(i.type){case"right":var t=a[0]-e.x,s=i.root.offsetWidth+t;i.root.style.width=s+"px";break;case"left":t=a[0]-e.x,s=Math.min(document.body.clientWidth-z.DEFAULT_SPLITBAR_SIZE,i.root.offsetWidth-t);i.root.style.width=s+"px",i.splitBar.style.left=s+z.DEFAULT_SPLITBAR_SIZE/2+"px";break;case"top":t=a[1]-e.y,s=Math.min(document.body.clientHeight-z.DEFAULT_SPLITBAR_SIZE,i.root.offsetHeight-t);i.root.style.height=s+"px",i.splitBar.style.top=s+z.DEFAULT_SPLITBAR_SIZE/2+"px";break;case"bottom":t=a[1]-e.y,s=i.root.offsetHeight+t;i.root.style.height=s+"px"}a[0]=e.x,a[1]=e.y,e.stopPropagation(),e.preventDefault(),i.onresize&&i.onresize(i.root.getBoundingClientRect())}function o(e){var t=i.root.ownerDocument;t.removeEventListener("mousemove",n),t.removeEventListener("mouseup",o),document.body.classList.remove("nocursor"),i.splitBar.classList.remove("nocursor")}}}attach(e){if(this.sections.length)this.sections[1].attach(e);else{if(!e)throw"no content to attach";(e.parent=this).root.appendChild(e.root||e)}}split(t={}){this.sections.length&&(this.offset=this.root.childNodes[0].offsetHeight,this._root=this.sections[0].root,this.root=this.sections[1].root);let a=t.type??"horizontal",l=t.sizes||["50%","50%"],n="auto"===t.sizes||t.sizes&&"auto"==t.sizes[0]&&"auto"==t.sizes[1];var e=this.root.getBoundingClientRect();if(!l[1]||"auto"!=l[0]&&"auto"==l[1]){let e=l[0];var s=t.top||0;e.constructor==Number&&(e=e+s+"px"),l[1]="calc( 100% - "+e+" )"}var i,o,r,s=t.minimizable??!1,c=(t.resize??!0)||s,d=t.fixedSize??!c;let h=0,u=[],p=[],m=(this.offset=0,c&&(this.resize=c,this.splitBar=document.createElement("div"),this.splitBar.className="lexsplitbar "+a,"horizontal"==a?this.splitBar.style.width=z.DEFAULT_SPLITBAR_SIZE+"px":this.splitBar.style.height=z.DEFAULT_SPLITBAR_SIZE+"px",this.splitBar.addEventListener("mousedown",function(e){var t=cg.root.ownerDocument;t.addEventListener("mousemove",v),t.addEventListener("mouseup",f),e.stopPropagation(),e.preventDefault(),document.body.classList.add("nocursor"),cg.splitBar.classList.add("nocursor")}),h=z.DEFAULT_SPLITBAR_SIZE/2),"horizontal"==a?(this.root.style.display="flex",d?(u[0]=`calc(${l[0]} - ${h}px)`,p[0]=`calc(${l[1]} - ${h}px)`):(o=e.width,i=C(l[0],o),r=C(l[1],o)/o*100,u[0]=`calc(${i/o*100}% - ${h}px)`,p[0]=`calc(${r}% - ${h}px)`),u[1]="100%",p[1]="100%"):(n?(u[1]="auto",p[1]="auto"):d?(u[1]="auto"==l[0]?"auto":`calc(${l[0]} - ${h}px)`,p[1]="auto"==l[1]?"auto":`calc(${l[1]} - ${h}px)`):(i=e.height,o=C(l[0],i),r=C(l[1],i)/i*100,u[1]="auto"==l[0]?"auto":`calc(${o/i*100}% - ${h}px)`,p[1]="auto"==l[1]?"auto":`calc(${r}% - ${h}px)`),u[0]="100%",p[0]="100%"),new x({width:u[0],height:u[1],skipAppend:!0,className:"split"+(t.menubar||t.sidebar?"":" origin")})),g=new x({width:p[0],height:p[1],skipAppend:!0,className:"split"});if(!(d||e.width&&e.height)){let i=new ResizeObserver(e=>{console.assert(1==e.length,"AreaResizeObserver: more than one entry");var t,s,e=e[0].contentRect;e.width&&e.height&&(this._update([e.width,e.height],!1),n||("horizontal"==a?(s=e.width,t=C(l[0],s)/s*100,s=C(l[1],s)/s*100,u[0]=`calc(${t}% - ${h}px)`,p[0]=`calc(${s}% - ${h}px)`):(t=e.height,s=C(l[0],t)/t*100,e=C(l[1],t)/t*100,u[1]="auto"==l[0]?"auto":`calc(${s}% - ${h}px)`,p[1]="auto"==l[1]?"auto":`calc(${e}% - ${h}px)`),m.root.style.width=u[0],m.root.style.height=u[1],g.root.style.width=p[0],g.root.style.height=p[1]),m._update(),g._update(),i.disconnect())});N(()=>{i.observe(this.root)},100)}if(n&&"vertical"==a){let s=new ResizeObserver(e=>{for(var t of e){t=t.target.getComputedSize();g.root.style.height="calc(100% - "+t.height+"px )"}s.disconnect()});s.observe(m.root)}if(c&&s&&(this.splitExtended=!1,g.root.addEventListener("animationend",e=>{var t=getComputedStyle(g.root).opacity;g.root.classList.remove(e.animationName+"-"+a),g.root.style.opacity=t,D(g.root)}),this.splitBar.addEventListener("contextmenu",e=>{e.preventDefault(),T(null,e,e=>{e.add("Extend",{disabled:this.splitExtended,callback:()=>{this.extend()}}),e.add("Reduce",{disabled:!this.splitExtended,callback:()=>{this.reduce()}})})})),m.parentArea=this,(g.parentArea=this).root.appendChild(m.root),c&&this.root.appendChild(this.splitBar),this.root.appendChild(g.root),this.sections=[m,g],this.type=a,this._update(e.width||e.height?[e.width,e.height]:void 0),c){let s=this;function v(e){"horizontal"==s.type?s._moveSplit(-e.movementX):s._moveSplit(-e.movementY),e.stopPropagation(),e.preventDefault()}function f(e){var t=s.root.ownerDocument;t.removeEventListener("mousemove",v),t.removeEventListener("mouseup",f),document.body.classList.remove("nocursor"),s.splitBar.classList.remove("nocursor")}}return this.sections}setLimitBox(e=0,t=0,s=1/0,i=1/0){this.minWidth=e,this.minHeight=t,this.maxWidth=s,this.maxHeight=i,0!=e&&(this.root.style.minWidth=e+"px"),0!=t&&(this.root.style.minHeight=t+"px"),s!=1/0&&(this.root.style.maxWidth=s+"px"),i!=1/0&&(this.root.style.maxHeight=i+"px")}setSize(e){let[t,s]=e;null!=t&&t.constructor==Number&&(t+="px"),null!=s&&s.constructor==Number&&(s+="px"),t&&(this.root.style.width=t),s&&(this.root.style.height=s),this.onresize&&this.onresize(this.root.getBoundingClientRect()),N(()=>{this.size=[this.root.clientWidth,this.root.clientHeight],this.propagateEvent("onresize")},150)}extend(){var e,t;this.splitExtended||([e,t]=this.sections,this.splitExtended=!0,"vertical"==this.type?(this.offset=t.root.offsetHeight,t.root.classList.add("fadeout-vertical"),this._moveSplit(-1/0,!0)):(this.offset=t.root.offsetWidth-8,t.root.classList.add("fadeout-horizontal"),this._moveSplit(-1/0,!0,8)),N(()=>this.propagateEvent("onresize"),150))}reduce(){var e,t;this.splitExtended&&(this.splitExtended=!1,[e,t]=this.sections,"vertical"==this.type?t.root.classList.add("fadein-vertical"):t.root.classList.add("fadein-horizontal"),this._moveSplit(this.offset),N(()=>this.propagateEvent("onresize"),150))}hide(){this.root.classList.add("hidden")}show(){this.root.classList.remove("hidden")}toggle(e){this.root.classList.toggle("hidden",e)}propagateEvent(t){for(let e=0;e<this.sections.length;e++){var s=this.sections[e];s[t]&&s[t].call(this,s.root.getBoundingClientRect()),s.propagateEvent(t)}}addPanel(e){e=new P(e);return this.attach(e),this.panels.push(e),e}addMenubar(e,t={}){var e=new F(e,t),[s,i]=(z.menubars.push(e),this.split({type:"vertical",sizes:["48px",null],resize:!1,menubar:!0}));return e.siblingArea=i,s.attach(e),s.isMenubar=!0,(t.sticky??!0)&&(s.root.className+=" sticky top-0"),t.parentClass&&(s.root.className+=" "+t.parentClass),e}addSidebar(e,t={}){var s=new l(t),e=(e&&e(s),s.update(),z.sidebars.push(s),t.side??"left"),e=(console.assert("left"==e||"right"==e,"Invalid sidebar side: "+e),"left"==e),i=t.width??"16rem",[i,a]=this.split({type:"horizontal",sizes:e?[i,null]:[null,i],resize:!1,sidebar:!0}),e=(s.siblingArea=e?a:i,e?i:a);return e.attach(s),e.isSidebar=!0,t.parentClass&&(e.root.className+=" "+t.parentClass),s}addOverlayButtons(e,l={}){if(this.sections.length)this.sections[1].addOverlayButtons(e,l);else{console.assert(e.constructor==Array&&e.length),this.root.style.position="relative",l.className="lexoverlaybuttons";let n=this.addPanel(l),i=null,t=document.createElement("div"),s=(t.className="lexoverlaybuttonscontainer",t.appendChild(n.root),this.attach(t),l.float);if(s)for(let e=0;e<s.length;e++)switch(s[e]){case"h":break;case"v":t.className+=" vertical";break;case"t":break;case"m":t.className+=" middle";break;case"b":t.className+=" bottom";break;case"l":break;case"c":t.className+=" center";break;case"r":t.className+=" right"}let a=function(a,e,t){var s={width:"auto",selectable:a.selectable,selected:a.selected,icon:a.icon,img:a.img,className:a.class??"",title:a.name,overflowContainerX:n.root,swap:a.swap};e&&(i||((i=document.createElement("div")).className="lexoverlaygroup",n.queuedContainer=i),s.parent=i);let l=a.callback;if(a.options)n.addSelect(null,a.options,a.name,l,s);else{let i=n.addButton(null,a.name,function(e,t){var s;a.selectable&&(a.group?(s=a.selected,a.group.forEach(e=>e.selected=!1),a.selected=!s):a.selected=!a.selected),l&&l(e,t,i.root)},s)}i&&t&&(n.root.appendChild(i),i=null,n.clearQueue())};var o,r;n.clear();for(r of e)if(r.constructor===Array)for(let e=0;e<r.length;++e){var c=r[e];c.group=r,a(c,!0,e==r.length-1)}else a(r);s&&(o=0,n.root.childNodes.forEach(e=>{o+=e.offsetHeight}),t.className.includes("middle"))&&(t.style.top="-moz-calc( 50% - "+.5*o+"px )",t.style.top="-webkit-calc( 50% - "+.5*o+"px )",t.style.top="calc( 50% - "+.5*o+"px )")}}addTabs(e={}){var t=new o(this,e);return e.folding&&(this.parentArea._disableSplitResize(),this.root.style.paddingTop="4px"),t}_moveSplit(t,s=!1,i=0){if(!this.type)throw"No split area";if(void 0!==t){var a,l,n,o=this.sections[0],r=o.root,c=(r.classList.contains("origin")||(r=r.parentElement),this.sections[1]),d=c.root,h="- "+z.DEFAULT_SPLITBAR_SIZE+"px";let e=null;s||(e=r.style.transition,r.style.transition=d.style.transition="none"),"horizontal"==this.type?(a=Math.max(d.offsetWidth+t,parseInt(c.minWidth)),n=(a=i?i:a)/this.size[0]*100,l=Math.max(0,100-n),r.style.width=`-moz-calc(${l}% ${h})`,r.style.width=`-webkit-calc( ${l}% ${h})`,r.style.width=`calc( ${l}% ${h})`,d.style.width=n+"%",d.style.width=n+"%",d.style.width=n+"%",o.maxWidth!=1/0&&(d.style.minWidth=`calc( 100% - ${parseInt(o.maxWidth)}px )`)):(a=Math.max(d.offsetHeight+t+c.offset,parseInt(c.minHeight)),l=(a=i?i:a)/this.size[1]*100,n=Math.max(0,100-l),r.style.height=`-moz-calc(${n}% ${h})`,r.style.height=`-webkit-calc( ${n}% ${h})`,r.style.height=`calc( ${n}% ${h})`,d.style.height=l+"%",d.style.height=l+"%",d.style.height=l+"%",o.maxHeight!=1/0&&(d.style.minHeight=`calc( 100% - ${parseInt(o.maxHeight)}px )`)),s||(r.style.transition=d.style.transition=e),N(()=>{this._update(),this.propagateEvent("onresize")},10)}}_disableSplitResize(){this.resize=!1,this.splitBar.remove(),delete this.splitBar}_update(e,t=!0){if(e?this.size=e:(e=this.root.getBoundingClientRect(),this.size=[e.width,e.height]),t)for(var s=0;s<this.sections.length;s++)this.sections[s]._update()}}function D(e){e.offsetHeight}z.Area=x;class o{static TAB_ID=0;constructor(s,e={}){this.onclose=e.onclose;var t=document.createElement("div"),i=(t.className="lexareatabs "+(e.fit?"fit":"row"),e.folding??!1);i&&t.classList.add("folding");let n=this;t.addEventListener("dragenter",function(e){e.preventDefault(),this.classList.add("dockingtab")}),t.addEventListener("dragleave",function(e){e.preventDefault(),this.contains(e.relatedTarget)||this.classList.remove("dockingtab")}),t.addEventListener("drop",function(e){e.preventDefault();var t,s,i,a=e.dataTransfer.getData("source"),l=document.getElementById(a);l&&(t=l.parentElement,s=(i=e.target).getBoundingClientRect(),e.offsetX<.5*s.width?this.insertBefore(l,i):i.nextElementSibling?this.insertBefore(l,i.nextElementSibling):this.appendChild(l),t.childNodes.forEach((e,t)=>e.childIndex=t-1),s=/true/.test(e.dataTransfer.getData("fit")),(t.childElementCount==(s?2:1)?t.lastChild:t.querySelector(".selected")??t.childNodes[s?1:0]).click(),this.childNodes.forEach((e,t)=>e.childIndex=t-1),i=document.getElementById(a+"_content"),n.area.attach(i),this.classList.remove("dockingtab"),l.instance=n,l.click(),n.tabs[l.dataset.name]=i)}),s.root.classList.add("lexareatabscontainer");var[a,l]=s.split({type:"vertical",sizes:e.sizes??"auto",resize:!1,top:2});a.attach(t),e.parentClass&&(t.parentElement.className+=" "+e.parentClass),this.area=l,this.area.root.className+=" lexareatabscontent",e.contentClass&&(this.area.root.className+=" "+e.contentClass),this.selected=null,this.root=t,this.tabs={},this.tabDOMs={},e.fit&&((a=document.createElement("span")).className="lexareatab thumb",this.thumb=a,this.root.appendChild(a),new ResizeObserver(e=>{var t,s=this.thumb.item;s&&(t=this.thumb.style.transition,this.thumb.style.transition="none",this.thumb.style.transform="translate( "+s.childIndex*s.offsetWidth+"px )",this.thumb.style.width=s.offsetWidth+"px",D(this.thumb),this.thumb.style.transition=t)}).observe(this.area.root)),i&&(this.folded=!0,"up"==(this.folding=i)&&s.root.insertChildAtIndex(s.sections[1].root,0),new ResizeObserver(e=>{for(var t of e){t=t.contentRect;s.parentArea.sections[0].root.style.height="calc(100% - "+(42+t.height)+"px )"}}).observe(this.area.root),this.area.root.classList.add("folded"))}add(e,t,i={}){let s=i.selected??!1;var a;s&&(this.root.querySelectorAll("span").forEach(e=>e.classList.remove("selected")),(this.area.root.querySelector(":scope > .pseudoparent-tabs")??this.area.root).querySelectorAll(":scope > .lextabcontent").forEach(e=>e.style.display="none")),s=!Object.keys(this.tabs).length&&!this.folding||s;let l=t.root||t,n=(l.originalDisplay=l.style.display,l.style.display=s?l.originalDisplay:"none",l.classList.add("lextabcontent"),i.icon&&(i.icon.includes(".")?i.icon="<img src='https://raw.githubusercontent.com/jxarco/lexgui.js/master/"+i.icon+"'>":(a=i.icon.split(" "),i.icon=z.makeIcon(a[0],{svgClass:"sm "+a.slice(0).join(" ")}).innerHTML)),document.createElement("span"));n.dataset.name=e,n.className="lexareatab flex flex-row gap-1"+(s?" selected":""),n.innerHTML=(i.icon??"")+e,n.id=e.replace(/\s/g,"")+o.TAB_ID++,n.title=i.title??"",n.selected=s??!1,n.fixed=i.fixed,n.instance=this,l.id=n.id+"_content",n.selected&&(this.selected=e),n.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation();var t,s=n.instance;n.fixed||(t=n.selected,n.parentElement.querySelectorAll("span").forEach(e=>e.selected=!1),n.selected=!t,n.parentElement.querySelectorAll("span").forEach(e=>e.classList.remove("selected")),n.classList.toggle("selected",s.folding&&n.selected),(s.area.root.querySelector(":scope > .pseudoparent-tabs")??s.area.root).querySelectorAll(":scope > .lextabcontent").forEach(e=>e.style.display="none"),l.style.display=l.originalDisplay,s.selected=n.dataset.name),s.folding&&(s.folded=n.selected,s.area.root.classList.toggle("folded",!s.folded)),i.onSelect&&i.onSelect(e,n.dataset.name),s.thumb&&(s.thumb.style.transform="translate( "+n.childIndex*n.offsetWidth+"px )",s.thumb.style.width=n.offsetWidth+"px",s.thumb.item=n)}),n.addEventListener("contextmenu",e=>{e.preventDefault(),e.stopPropagation(),i.onContextMenu&&i.onContextMenu(e,n.dataset.name)}),i.allowDelete&&(n.addEventListener("mousedown",e=>{e.button==z.MOUSE_MIDDLE_CLICK&&e.preventDefault()}),n.addEventListener("mouseup",e=>{e.preventDefault(),e.stopPropagation(),e.button==z.MOUSE_MIDDLE_CLICK&&this.delete(n.dataset.name)})),n.setAttribute("draggable",!0),n.addEventListener("dragstart",e=>{var t=!!this.thumb;n.parentElement.childNodes.length==(t?2:1)?e.preventDefault():(e.dataTransfer.setData("source",e.target.id),e.dataTransfer.setData("fit",t))}),n.childIndex=this.root.childElementCount-1,this.root.appendChild(n),this.area.attach(l),this.tabDOMs[e]=n,this.tabs[e]=t,setTimeout(()=>{i.onCreate&&i.onCreate.call(this,this.area.root.getBoundingClientRect()),s&&this.thumb&&(this.thumb.style.transform="translate( "+n.childIndex*n.offsetWidth+"px )",this.thumb.style.width=n.offsetWidth+"px",this.thumb.item=n)},10)}select(e){this.tabDOMs[e]&&this.tabDOMs[e].click()}delete(e){var t=this.tabDOMs[e];t&&!t.fixed&&(this.onclose&&this.onclose(e),this.tabDOMs[e].remove(),delete this.tabDOMs[e],this.tabs[e].remove(),delete this.tabs[e],t=this.root.lastChild)&&!t.fixed&&this.root.lastChild.click()}}z.Tabs=o;class F{constructor(e,t={}){this.root=document.createElement("div"),this.root.className="lexmenubar",t.float&&(this.root.style.justifyContent=t.float),this.buttons=[],this.icons={},this.shorts={},this.items=e??[],this.createEntries()}_resetMenubar(e){this.root.querySelectorAll(".lexmenuentry").forEach(e=>{e.classList.remove("selected"),delete e.dataset.built}),this._currentDropdown&&(this._currentDropdown.destroy(),this._currentDropdown=null),this.focused=e??!1}createEntries(){for(let a of this.items){let i=a.name;var e=z.getSupportedDOMName(i);if(!this.root.querySelector("#"+e)){let t=document.createElement("div"),s=(t.className="lexmenuentry",t.id=e,t.innerHTML="<span>"+i+"</span>",t.tabIndex="1",this.root.appendChild(t),()=>{this._resetMenubar(!0),t.classList.add("selected"),t.dataset.built="true",this._currentDropdown=V(t,a.submenu??[],{side:"bottom",align:"start",onBlur:()=>{this._resetMenubar()}})});t.addEventListener("click",()=>{var e=a.callback;e?e.call(this,i,t):(s(),this.focused=!0)}),t.addEventListener("mouseover",e=>{this.focused&&!t.dataset.built&&s()})}}}getButton(e){return this.buttons[e]}getSubitem(t,s){var i=s[0];for(let e=0;e<t.length;e++)if(t[e][i])return 1==s.length?t[e]:(s.splice(0,1),this.getSubitem(t[e][i],s))}getItem(e){e=e.split("/");return this.getSubitem(this.items,e)}setButtonIcon(e,i,a,l={}){if(!e)throw"Set Button Name!";let n=this.buttons[e];if(n)n.innerHTML="",n.appendChild(z.makeIcon(i,{svgClass:"xl"}));else{n=document.createElement("div");let t=l.disabled??!1,s=(n.className="lexmenubutton main"+(t?" disabled":""),n.title=e,n.appendChild(z.makeIcon(i,{svgClass:"xl"})),"right"==l.float&&(n.right=!0),this.root.lastChild&&this.root.lastChild.right?this.root.lastChild.before(n):"left"==l.float?this.root.prepend(n):this.root.appendChild(n),n.querySelector("a"));s.addEventListener("click",e=>{a&&!t&&a.call(this,s,e)}),this.buttons[e]=n}}setButtonImage(e,i,a,l={}){if(!e)throw"Set Button Name!";let n=this.buttons[e];if(n)n.querySelector("img").src=i;else{n=document.createElement("div");let t=l.disabled??!1,s=(n.className="lexmenubutton main"+(t?" disabled":""),n.title=e,n.innerHTML="<a><image src='"+i+"' class='lexicon' style='height:32px;'></a>","right"==l.float&&(n.right=!0),this.root.lastChild&&this.root.lastChild.right?this.root.lastChild.before(n):"left"==l.float?this.root.prepend(n):this.root.appendChild(n),n.querySelector("a"));s.addEventListener("click",e=>{a&&!t&&a.call(this,s,e)}),this.buttons[e]=n}}addButtons(t,e={}){if(!t)throw"No buttons to add!";this.buttonContainer||(this.buttonContainer=document.createElement("div"),this.buttonContainer.className="lexmenubuttons",this.buttonContainer.classList.add(e.float??"center"),"right"==e.position&&(this.buttonContainer.right=!0),this.root.lastChild&&this.root.lastChild.right?this.root.lastChild.before(this.buttonContainer):this.root.appendChild(this.buttonContainer));for(let e=0;e<t.length;++e){var s=t[e],i=s.title,s=new _(i,"",s.callback,{title:i,buttonClass:"bg-none",disabled:s.disabled,icon:s.icon,hideName:!0,swap:s.swap});this.buttonContainer.appendChild(s.root),i&&(this.buttons[i]=s.root)}}}z.Menubar=F;class l{constructor(e={}){var t;this.root=document.createElement("div"),this.root.className="lexsidebar "+(e.className??""),this._displaySelected=e.displaySelected??!1,Object.defineProperty(l.prototype,"displaySelected",{get:function(){return this._displaySelected},set:function(e){this._displaySelected=e,this._displaySelected||this.root.querySelectorAll(".lexsidebarentry").forEach(e=>e.classList.remove("selected"))},enumerable:!0,configurable:!0}),this.side=e.side??"left",this.collapsable=e.collapsable??!0,this._collapseWidth=e.collapseToIcons??!0?"58px":"0px",this.collapsed=!1,this.filterString="",N(()=>{this.root.parentElement.ogWidth=this.root.parentElement.style.width,this.root.parentElement.style.transition="width 0.25s ease-out",this.resizeObserver=new ResizeObserver(e=>{for(var t of e)this.siblingArea.setSize(["calc(100% - "+t.contentRect.width+"px )",null])})},10),e.skipHeader||(this.header=e.header??this._generateDefaultHeader(e),console.assert(this.header.constructor===HTMLDivElement,"Use an HTMLDivElement to build your custom header"),this.header.className="lexsidebarheader",this.root.appendChild(this.header),this.collapsable&&(t=z.makeIcon("left"==this.side?"PanelLeft":"PanelRight",{title:"Toggle Sidebar",iconClass:"toggler"}),this.header.appendChild(t),t.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),this.toggleCollapsed()}))),e.filter&&(t=new k(null,"",(e,t)=>{this.filterString=e,this.update()},{inputClass:"outline",placeholder:"Search...",icon:"Search",className:"lexsidebarfilter"}),this.filter=t.root,this.root.appendChild(this.filter)),this.content=document.createElement("div"),this.content.className="lexsidebarcontent",this.root.appendChild(this.content),e.skipFooter||(this.footer=e.footer??this._generateDefaultFooter(e),console.assert(this.footer.constructor===HTMLDivElement,"Use an HTMLDivElement to build your custom footer"),this.footer.className="lexsidebarfooter",this.root.appendChild(this.footer)),new ResizeObserver(e=>{var t=(this.header?.offsetHeight??0)+(this.filter?.offsetHeight??0)+(this.footer?.offsetHeight??0);this.content.style.height=`calc(100% - ${t}px)`}).observe(this.root),this.items=[],this.icons={},this.groups={}}_generateDefaultHeader(t){var e=document.createElement("div"),s=(e.addEventListener("click",e=>{this.collapsed?(e.preventDefault(),e.stopPropagation(),this.toggleCollapsed()):t.onHeaderPressed&&t.onHeaderPressed(e)}),document.createElement("span")),s=(s.className="lexavatar",e.appendChild(s),t.headerImage?((i=document.createElement("img")).src=t.headerImage,s.appendChild(i)):t.headerIcon&&(i=z.makeIcon(t.headerIcon),s.appendChild(i)),document.createElement("div")),i=(s.className="infodefault",e.appendChild(s),document.createElement("span")),i=(i.innerHTML=t.headerTitle??"",s.appendChild(i),document.createElement("span"));return i.innerHTML=t.headerSubtitle??"",s.appendChild(i),e}_generateDefaultFooter(t){let s=document.createElement("div");s.addEventListener("click",e=>{t.onFooterPressed&&t.onFooterPressed(e,s)});var e=document.createElement("span"),e=(e.className="lexavatar",s.appendChild(e),t.footerImage?((i=document.createElement("img")).src=t.footerImage,e.appendChild(i)):t.footerIcon&&(i=z.makeIcon(t.footerIcon),e.appendChild(i)),document.createElement("div")),i=(e.className="infodefault",s.appendChild(e),document.createElement("span")),i=(i.innerHTML=t.footerTitle??"",e.appendChild(i),document.createElement("span")),e=(i.innerHTML=t.footerSubtitle??"",e.appendChild(i),z.makeIcon("MenuArrows"));return s.appendChild(e),s}toggleCollapsed(e){if(this.collapsable){if(this.collapsed=e??!this.collapsed,this.collapsed?(this.root.classList.add("collapsing"),this.root.parentElement.style.width=this._collapseWidth):(this.root.classList.remove("collapsing"),this.root.classList.remove("collapsed"),this.root.parentElement.style.width=this.root.parentElement.ogWidth),!this.resizeObserver)throw"Wait until ResizeObserver has been created!";this.resizeObserver.observe(this.root.parentElement),N(()=>{this.root.classList.toggle("collapsed",this.collapsed),this.resizeObserver.unobserve(this.root.parentElement),this.root.querySelectorAll(".lexsidebarentrycontent").forEach(e=>e.dataset.disableTooltip=!this.collapsed)},250)}}separator(){this.currentGroup=null,this.add("")}group(e,t){this.currentGroup=e,this.groups[e]=t}add(e,l={}){l.constructor==Function&&(l={callback:l});let n=e.split("/");e=n[n.length-1];this.icons[e]=l.icon;let o=0,r=(i,e)=>{if(null!=i){let s=null;var t,a;e.forEach(e=>{var t=Object.keys(e).find(e=>e==i);t&&(s=e[t])}),s?r(n[o++],s):((t={})[i]=[],(a=n[o++])||(t.callback=l.callback,t.group=this.currentGroup,t.options=l),e.push(t),r(a,t[i]))}};r(n[o++],this.items)}select(e){let t=z.getSupportedDOMName(e);e=this.items.find(e=>e.name===t);e&&e.dom.click()}update(){this.content.innerHTML="";for(var e of this.items)delete e.dom;for(let o of this.items){let a=o.options??{};if(!o.dom){let n=o.name=Object.keys(o)[0];if(!this.filterString.length||n.toLowerCase().includes(this.filterString.toLowerCase())){var t=z.getSupportedDOMName(n);let e=null,l=document.createElement("div");if(l.id=t,l.className="lexsidebarentry "+(a.className??""),this.displaySelected&&a.selected&&l.classList.add("selected"),o.group){var s=o.group.replace(/\s/g,"").replaceAll(".","");if(e=this.content.querySelector("#"+s)){if(!e.classList.contains("lexsidebargroup"))throw"Bad id: "+o.group}else{(e=document.createElement("div")).id=s,e.className="lexsidebargroup",this.content.appendChild(e);var s=document.createElement("div"),r=(s.className="lexsidebargrouptitle",e.appendChild(s),document.createElement("div"));r.innerHTML=o.group,s.appendChild(r),null!=this.groups[o.group]&&(r=z.makeIcon(this.groups[o.group].icon,{svgClass:"sm"}),s.appendChild(r),r.addEventListener("click",e=>{this.groups[o.group].callback&&this.groups[o.group].callback(o.group,e)}))}}if(""==t){s=document.createElement("div");s.className="lexsidebarseparator",this.content.appendChild(s)}else{this.collapseContainer?(this.collapseContainer.appendChild(l),this.collapseQueue--,this.collapseQueue||delete this.collapseContainer):(e||this.content).appendChild(l);let s=document.createElement("div");s.className="lexsidebarentrycontent",l.appendChild(s),o.dom=l,"checkbox"==a.type?(o.value=a.value??!1,r=new P,o.checkbox=r.addCheckbox(null,o.value,(e,t)=>{t.preventDefault(),t.stopPropagation();var s=a.callback;o.value=e,s&&s.call(this,n,e,t)},{className:"accent",label:n,signal:"@checkbox_"+n}),s.appendChild(r.root.childNodes[0])):(a.icon&&(t=z.makeIcon(a.icon,{iconClass:"lexsidebarentryicon"}),s.appendChild(t),z.asTooltip(s,n,{side:"right",offset:16,active:!1})),(t=document.createElement("a")).innerHTML=n,s.appendChild(t),a.content&&s.appendChild(a.content));let i=null!=a.collapsable?a.collapsable:a.collapsable||o[n].length;if(l.addEventListener("click",e=>{var t;e.target&&e.target.classList.contains("lexcheckbox")||(i?s.querySelector(".collapser").click():((t=a.callback)&&t.call(this,n,o.value,e),o.checkbox&&(o.value=!o.value,o.checkbox.set(o.value,!0))),this.displaySelected&&(this.root.querySelectorAll(".lexsidebarentry").forEach(e=>e.classList.remove("selected")),l.classList.add("selected")))}),a.action?(t=z.makeIcon(a.action.icon??"Ellipsis",{title:a.action.name}),s.appendChild(t),t.addEventListener("click",e=>{e.preventDefault(),e.stopImmediatePropagation();var t=a.action.callback;t&&t.call(this,n,e)})):i&&((t=document.createElement("div")).className="collapsablecontainer",Object.assign(t.style,{width:"100%",display:"none"}),z.makeCollapsible(s,t,e??this.content),this.collapseQueue=a.collapsable,this.collapseContainer=t),o[n].length){var c=document.createElement("div");c.className="lexsidebarsubentrycontainer",i?(this.collapseContainer.appendChild(c),delete this.collapseContainer):(e?(c.classList.add("collapsablecontainer"),e):this.content).appendChild(c);for(let e=0;e<o[n].length;++e){var d=o[n][e];let i=d.options??{},a=d.name=Object.keys(d)[0];if(!this.filterString.length||a.toLowerCase().includes(this.filterString.toLowerCase())){let s=document.createElement("div");s.innerHTML=`<span>${a}</span>`,i.action&&(d=z.makeIcon(i.action.icon??"Ellipsis",{title:i.action.name}),s.appendChild(d),d.addEventListener("click",e=>{e.preventDefault(),e.stopImmediatePropagation();var t=i.action.callback;t&&t.call(this,a,e)})),s.className="lexsidebarentry",s.id=a,c.appendChild(s),s.addEventListener("click",e=>{var t=i.callback;t&&t.call(this,a,s,e),this.displaySelected&&(this.root.querySelectorAll(".lexsidebarentry").forEach(e=>e.classList.remove("selected")),l.classList.add("selected"))})}}}}}}}}}z.SideBar=l;class w{static NONE=0;static TEXT=1;static TEXTAREA=2;static BUTTON=3;static SELECT=4;static CHECKBOX=5;static TOGGLE=6;static RADIO=7;static BUTTONS=8;static COLOR=9;static RANGE=10;static NUMBER=11;static TITLE=12;static VECTOR=13;static TREE=14;static PROGRESS=15;static FILE=16;static LAYERS=17;static ARRAY=18;static LIST=19;static TAGS=20;static CURVE=21;static CARD=22;static IMAGE=23;static CONTENT=24;static CUSTOM=25;static SEPARATOR=26;static KNOB=27;static SIZE=28;static OTP=29;static PAD=30;static FORM=31;static DIAL=32;static COUNTER=33;static TABLE=34;static TABS=35;static DATE=36;static LABEL=37;static BLANK=38;static NO_CONTEXT_TYPES=[w.BUTTON,w.LIST,w.FILE,w.PROGRESS];constructor(e,s,i,a={}){this.type=e,this.name=s,this.options=a,this._initialValue=i;var l=document.createElement("div");if(l.className="lexwidget",a.id&&(l.id=a.id),a.title&&(l.title=a.title),a.className&&(l.className+=" "+a.className),e!=w.TITLE&&(a.width&&(l.style.width=l.style.minWidth=a.width),a.maxWidth&&(l.style.maxWidth=a.maxWidth),a.minWidth&&(l.style.minWidth=a.minWidth),a.height&&(l.style.height=l.style.minHeight=a.height),z.widgetResizeObserver.observe(l)),null!=s){if(!a.hideName){e=document.createElement("div");e.className="lexwidgetname",a.justifyName&&e.classList.add("float-"+a.justifyName),e.innerHTML=s,e.title=a.title??e.innerHTML,e.style.width=a.nameWidth||z.DEFAULT_NAME_WIDTH,e.style.minWidth=e.style.width,l.appendChild(e),l.domName=e;let t=this;e.addEventListener("contextmenu",function(e){e.preventDefault(),t.oncontextmenu(e)}),a.skipReset||null==i||this._addResetProperty(e,function(e){t.set(t._initialValue,!1,e),this.style.display="none"})}}else a.hideName=!0;a.signal&&z.addSignal(a.signal,this),this.root=l,(this.root.jsInstance=this).options=a}static _dispatchEvent(e,t,s,i,a){t=new CustomEvent(t,{detail:s,bubbles:i,cancelable:a});e.dispatchEvent(t)}_addResetProperty(e,t){var s=z.makeIcon("Undo2",{iconClass:"ml-0 mr-1 px-1",title:"Reset"});return s.style.display="none",s.addEventListener("click",t),e.appendChild(s),s}_canPaste(){return this.type===w.CUSTOM?void 0!==navigator.clipboard.customIdx&&this.customIdx==navigator.clipboard.customIdx:navigator.clipboard.type===this.type}_trigger(e,t,s=this){t&&t.call(s,e.value,e.domEvent,e.name)}value(){if(this.onGetValue)return this.onGetValue();console.warn("Can't get value of "+this.typeName())}set(e,t,s){var i,a;if(this.onSetValue)return(i=this.root.querySelector(".lexwidgetname .lexicon"))&&(i.style.display=e!=this.value()?"block":"none",a=e.constructor===Array?((e,t)=>{if(e!==t){if(null==e||null==t)return!1;if(e.length!==t.length)return!1;for(var s=0;s<e.length;++s)if(e[s]!==t[s])return!1}return!0})(e,this._initialValue):e==this._initialValue,i.style.display=a?"none":"block"),this.onSetValue(e,t??!1,s);console.warn("Can't set value of "+this.typeName())}oncontextmenu(e){w.NO_CONTEXT_TYPES.includes(this.type)||T(this.typeName(),e,e=>{e.add("Copy",()=>{this.copy()}),e.add("Paste",{disabled:!this._canPaste(),callback:()=>{this.paste()}})})}copy(){navigator.clipboard.type=this.type,navigator.clipboard.customIdx=this.customIdx,navigator.clipboard.data=this.value(),navigator.clipboard.writeText(navigator.clipboard.data)}paste(){this._canPaste()&&this.set(navigator.clipboard.data)}typeName(){switch(this.type){case w.TEXT:return"Text";case w.TEXTAREA:return"TextArea";case w.BUTTON:return"Button";case w.SELECT:return"Select";case w.CHECKBOX:return"Checkbox";case w.TOGGLE:return"Toggle";case w.RADIO:return"Radio";case w.COLOR:return"Color";case w.RANGE:return"Range";case w.NUMBER:return"Number";case w.VECTOR:return"Vector";case w.TREE:return"Tree";case w.PROGRESS:return"Progress";case w.FILE:return"File";case w.LAYERS:return"Layers";case w.ARRAY:return"Array";case w.LIST:return"List";case w.TAGS:return"Tags";case w.CURVE:return"Curve";case w.KNOB:return"Knob";case w.SIZE:return"Size";case w.PAD:return"Pad";case w.FORM:return"Form";case w.DIAL:return"Dial";case w.COUNTER:return"Counter";case w.TABLE:return"Table";case w.TABS:return"Tabs";case w.DATE:return"Date";case w.LABEL:return"Label";case w.BLANK:return"Blank";case w.CUSTOM:return this.customName}console.error("Unknown Widget type: "+this.type)}refresh(){}}z.Widget=w,z.ADD_CUSTOM_WIDGET=function(v,f={}){let e=L();P.prototype["add"+v]=function(o,r,c){f.nameWidth="100%";let d=new w(w.CUSTOM,o,null,f),h=(this._attachWidget(d),d.customName=v,d.customIdx=e,d.onGetValue=()=>r,d.onSetValue=(e,t,s)=>{r=e,g(),h.querySelector(".lexcustomitems").toggleAttribute("hidden",!1),t||d._trigger(new b(o,r,s),c)},d.root),u,p,m=f.default??{},g=()=>{r&&(d.instance=r=Object.assign(y(m),r)),u&&u.remove(),p&&p.remove(),(u=document.createElement("div")).className="lexcustomcontainer",u.style.width="100%",h.appendChild(u),h.dataset.opened=!1;var e=z.makeIcon(f.icon??"Box"),t=z.makeIcon("Menu"),s=v+(r?"":" [empty]"),s=this.addButton(null,s,(e,t)=>{r?(h.querySelector(".lexcustomitems").toggleAttribute("hidden"),h.dataset.opened=!h.querySelector(".lexcustomitems").hasAttribute("hidden")):T(null,t,e=>{e.add("New "+v,()=>{r={},g(),h.querySelector(".lexcustomitems").toggleAttribute("hidden",!1),h.dataset.opened=!h.querySelector(".lexcustomitems").hasAttribute("hidden")})})},{buttonClass:"custom"}),i=s.root.querySelector("span");if(i.prepend(e),i.appendChild(t),u.appendChild(s.root),r&&t.addEventListener("click",e=>{e.stopImmediatePropagation(),e.stopPropagation(),T(null,e,e=>{e.add("Clear",()=>{r=null,g()})})}),(p=document.createElement("div")).className="lexcustomitems",p.toggleAttribute("hidden",!0),h.appendChild(p),r){this.queue(p);var a,l=(e,t,s)=>{r[e]=t,d._trigger(new b(o,r,s),c)};for(a in m){var n=r[a]??m[a];switch(n.constructor){case String:"#"===n[0]?this.addColor(a,n,l.bind(this,a)):this.addText(a,n,l.bind(this,a));break;case Number:this.addNumber(a,n,l.bind(this,a));break;case Boolean:this.addCheckbox(a,n,l.bind(this,a));break;case Array:4<n.length?this.addArray(a,n,l.bind(this,a)):this._addVector(n.length,a,n,l.bind(this,a))}}this.clearQueue()}};g()}};class U{constructor(e,t,s){if(this.domEl=e,this.data=t,this.onevent=s.onevent,this.options=s,this.selected=[],this._forceClose=!1,t.constructor===Object)this._createItem(null,t);else for(var i of t)this._createItem(null,i)}_createItem(e,l,t=0,s){let n=this;var i=this.domEl.querySelector(".lexnodetreefilter");if(l.children=l.children??[],i&&""!=i.value&&!l.id.includes(i.value)){for(var a=0;a<l.children.length;++a)this._createItem(l,l.children[a],t+1,s);return}let o=this.domEl.querySelector("ul"),r=(l.visible=l.visible??!0,l.parent=e,0<l.children.length);var i=-1<this.selected.indexOf(l)||l.selected;if(this.options.onlyFolders){let t=!1;l.children.forEach(e=>t|="folder"==e.type),r=!!t}let c=document.createElement("li"),d=(c.className="lextreeitem datalevel"+t+(r?" parent":"")+(i?" selected":""),c.id=z.getSupportedDOMName(l.id),c.tabIndex="0",c.treeData=l,this.options.skipDefaultIcon??!0?null:"Dot");(d=r?l.closed?"Right":"Down":d)&&c.appendChild(z.makeIcon(d,{iconClass:"hierarchy",svgClass:"xs"})),(d=l.icon)&&(l.icon.includes(".")?c.innerHTML+="<img src='https://raw.githubusercontent.com/jxarco/lexgui.js/master/"+l.icon+"'>":(i=l.icon.split(" "),i=z.makeIcon(i[0],{iconClass:"tree-item-icon mr-2",svgClass:"md"+(1<i.length?" "+i.slice(0).join(" "):"")}),c.appendChild(i))),c.innerHTML+=l.rename?"":l.id,c.setAttribute("draggable",!0),c.style.paddingLeft=3+15*(t+1)+"px",o.appendChild(c),c.addEventListener("click",e=>{var t;h?h=!1:(e.shiftKey||(o.querySelectorAll("li").forEach(e=>{e.classList.remove("selected")}),this.selected.length=0),-1<(t=this.selected.indexOf(l))?(c.classList.remove("selected"),this.selected.splice(t,1)):(c.classList.add("selected"),this.selected.push(l)),r&&1<l.id.length&&(l.closed=!1,n.onevent&&(t=new E(E.NODE_CARETCHANGED,l,l.closed),n.onevent(t)),n.frefresh(l.id)),n.onevent&&((t=new E(E.NODE_SELECTED,e.shiftKey?this.selected:l)).multiple=e.shiftKey,n.onevent(t)))}),c.addEventListener("dblclick",function(){var e;(n.options.rename??!0)&&(l.rename=!0,n.refresh()),n.onevent&&(e=new E(E.NODE_DBLCLICKED,l),n.onevent(e))}),c.addEventListener("contextmenu",s=>{if(s.preventDefault(),n.onevent){let t=new E(E.NODE_CONTEXTMENU,1<this.selected.length?this.selected:l,s);t.multiple=1<this.selected.length,z.addContextMenu(t.multiple?"Selected Nodes":t.node.id,t.value,e=>{t.panel=e}),n.onevent(t),this.options.addDefault&&(t.panel.items&&t.panel.add(""),t.panel.add("Select Children",()=>{let s=e=>{if(!e.closed)for(var t of e.children??[])t&&(this.domEl.querySelector("#"+t.id).classList.add("selected"),this.selected.push(t),s(t))};this.domEl.querySelectorAll(".selected").forEach(e=>e.classList.remove("selected")),this.selected.length=0,s(l)}),t.panel.add("Delete",{callback:()=>{var e,t;l.parent&&(n.onevent&&(e=new E(E.NODE_DELETED,l,s),n.onevent(e)),t=(e=l.parent.children).indexOf(l),e.splice(t,1),this.refresh())}}))}}),c.addEventListener("keydown",e=>{if(!l.rename)if(e.preventDefault(),"Delete"==e.key){var t;n.onevent&&((a=new E(E.NODE_DELETED,1<this.selected.length?this.selected:l,e)).multiple=1<this.selected.length,n.onevent(a));for(t of this.selected){var s=t.parent.children,i=s.indexOf(t);s.splice(i,1)}this.selected.length=0,this.refresh()}else{var a;("ArrowUp"==e.key||"ArrowDown"==e.key)&&(a=1<this.selected.length?"ArrowUp"==e.key?this.selected.shift():this.selected.pop():this.selected[0],a=this.domEl.querySelector("#"+z.getSupportedDOMName(a.id)),e="ArrowUp"==e.key?a.previousSibling:a.nextSibling)&&e.click()}});i=document.createElement("input");i.toggleAttribute("hidden",!l.rename),i.className="bg-none",i.value=l.id,c.appendChild(i),l.rename&&(c.classList.add("selected"),i.focus()),i.addEventListener("keyup",function(e){var t;"Enter"==e.key?(this.value=this.value.replace(/\s/g,"_"),n.onevent&&(t=new E(E.NODE_RENAMED,l,this.value),n.onevent(t)),l.id=z.getSupportedDOMName(this.value),delete l.rename,n.frefresh(l.id),o.querySelector("#"+l.id).classList.add("selected")):"Escape"==e.key&&(delete l.rename,n.frefresh(l.id))}),i.addEventListener("blur",function(e){delete l.rename,n.refresh()}),(this.options.draggable??!0)&&(e&&c.addEventListener("dragstart",e=>{window.__tree_node_dragged=l}),c.addEventListener("dragover",e=>{e.preventDefault()},!1),c.addEventListener("dragenter",e=>{e.target.classList.add("draggingover")}),c.addEventListener("dragleave",e=>{e.target.classList.remove("draggingover")}),c.addEventListener("drop",e=>{e.preventDefault();let t=window.__tree_node_dragged;if(t){var s,e=l;if(t.id==e.id)console.warn("Cannot parent node to itself!");else{let a=function(e,t){var s,i=!1;for(s of t.children){if(s.id==e.id)return!0;i|=a(e,s)}return i};a(e,t)?console.warn("Cannot parent node to a current child!"):(n.onevent&&(s=new E(E.NODE_DRAGGED,t,e),n.onevent(s)),s=t.parent.children.findIndex(e=>e.id==t.id),s=t.parent.children.splice(s,1),e.children.push(s[0]),n.refresh(),delete window.__tree_node_dragged)}}}));let h=!1;r&&c.querySelector("a.hierarchy").addEventListener("click",function(e){if(h=!0,e.stopImmediatePropagation(),e.stopPropagation(),e.altKey){let s=function(e){e.closed=!e.closed;for(var t of e.children)s(t)};s(l)}else l.closed=!l.closed;n.onevent&&(e=new E(E.NODE_CARETCHANGED,l,l.closed),n.onevent(e)),n.frefresh(l.id)});var u=document.createElement("div");if(c.appendChild(u),l.actions)for(let e=0;e<l.actions.length;++e){let t=l.actions[e],s=z.makeIcon(t.icon,{title:t.name});s.addEventListener("click",function(e){t.callback&&(t.callback(l,s),e.stopPropagation())}),u.appendChild(s)}l.skipVisibility||(i=new _(null,"",(e,t)=>{if(t.stopPropagation(),l.visible=void 0!==l.visible&&!l.visible,n.onevent){let e=new E(E.NODE_VISIBILITY,l,l.visible);n.onevent(e)}},{icon:l.visible?"Eye":"EyeOff",swap:l.visible?"EyeOff":"Eye",title:"Toggle visible",className:"p-0 m-0",buttonClass:"bg-none"}),u.appendChild(i.root));let p=function(e,t){if(e.length)for(var s of e.children)return s.id==t||p(s,t)};e=p(l,s);if(!l.closed||e)for(a=0;a<l.children.length;++a){var m=l.children[a];this.options.onlyFolders&&"folder"!=m.type||this._createItem(l,m,t+1,s)}}refresh(e,t){if(this.data=e??this.data,this.domEl.querySelector("ul").innerHTML="",this.data.constructor===Object)this._createItem(null,this.data,0,t);else for(var s of this.data)this._createItem(null,s,0,t)}frefresh(e){this.refresh();e=this.domEl.querySelector("#"+e);e&&e.focus()}select(e){this.refresh(null,e),this.domEl.querySelectorAll(".selected").forEach(e=>e.classList.remove("selected")),this.selected.length=0;e=this.domEl.querySelector("#"+e);e&&(e.classList.add("selected"),this.selected=[e.treeData],e.focus())}}z.NodeTree=U;class G extends w{constructor(e,t){super(w.BLANK),this.root.style.width=e??"auto",this.root.style.height=t??"8px"}}z.Blank=G;class j extends w{constructor(e,t={}){console.assert(e,"Can't create Title Widget without text!"),super(w.TITLE,null,null,t),this.root.className="lextitle "+this.root.className,t.icon&&((s=z.makeIcon(t.icon,{iconClass:"mr-2"})).querySelector("svg").style.color=t.iconColor||"",this.root.appendChild(s));var s=document.createElement("span");s.innerText=e,this.root.appendChild(s),Object.assign(this.root.style,t.style??{}),null!=t.link&&((s=document.createElement("a")).innerText=e,s.href=t.link,s.target=t.target??"",s.className="lextitle link",Object.assign(s.style,t.style??{}),this.root.replaceWith(s))}}z.Title=j;class k extends w{constructor(i,a,l,s={}){super(w.TEXT,i,String(a),s),this.onGetValue=()=>a,this.onSetValue=(e,t,s)=>{this.valid(e)&&this._lastValueTriggered!=e&&(this._lastValueTriggered=a=e,o.value=e,t||this._trigger(new b(i,e,s),l))},this.onResize=e=>{var t=this.root.domName?.style.width??"0px";n.style.width=s.inputWidth??`calc( 100% - ${t})`},this.valid=e=>!(e=e??this.value()).length||""==o.pattern||new RegExp(o.pattern).test(e);let n=document.createElement("div"),o=(n.className=s.warning?" lexwarning":"",n.style.display="flex",n.style.position="relative",this.root.appendChild(n),this.disabled=(s.disabled||s.warning)??!!s.url,null);var e;this.disabled?s.url?((o=document.createElement("a")).href=s.url,o.target="_blank",o.innerHTML=a??"",o.style.textAlign=s.float??"",o.className="lextext ellipsis-overflow"):((o=document.createElement("input")).disabled=!0,o.value=a,o.style.textAlign=s.float??"",o.className="lextext ellipsis-overflow "+(s.inputClass??"")):((o=document.createElement("input")).className="lextext "+(s.inputClass??""),o.type=s.type||"",o.value=a||"",o.style.textAlign=s.float??"",o.setAttribute("placeholder",s.placeholder??""),s.required&&o.setAttribute("required",s.required),s.pattern&&o.setAttribute("pattern",s.pattern),"default"==(e=s.trigger??"default")?(o.addEventListener("keyup",e=>{"Enter"==e.key&&o.blur()}),o.addEventListener("focusout",e=>{this.set(e.target.value,!1,e)})):"input"==e&&o.addEventListener("input",e=>{this.set(e.target.value,!1,e)}),o.addEventListener("mousedown",function(e){e.stopImmediatePropagation(),e.stopPropagation()}),s.icon&&(o.style.paddingLeft="1.75rem",e=z.makeIcon(s.icon,{iconClass:"absolute z-1 ml-2",svgClass:"sm"}),n.appendChild(e))),s.fit&&o.classList.add("size-content"),Object.assign(o.style,s.style??{}),n.appendChild(o),N(this.onResize.bind(this))}}z.TextInput=k;class X extends w{constructor(i,a,l,s={}){super(w.TEXTAREA,i,a,s),this.onGetValue=()=>a,this.onSetValue=(e,t,s)=>{o.value=a=e,t||this._trigger(new b(i,e,s),l)},this.onResize=e=>{var t=this.root.domName?.style.width??"0px";n.style.width=s.inputWidth??`calc( 100% - ${t})`};let n=document.createElement("div"),o=(n.className="lextextarea",n.style.display="flex",this.root.appendChild(n),document.createElement("textarea"));o.value=a??"",o.className=s.inputClass??"",o.style.textAlign=s.float??"",Object.assign(o.style,s.style??{}),s.fitHeight&&o.classList.add("size-content"),(s.resize??!0)||o.classList.add("resize-none"),n.appendChild(o),s.disabled&&o.setAttribute("disabled",!0),s.placeholder&&o.setAttribute("placeholder",s.placeholder);var e=s.trigger??"default";"default"==e?(o.addEventListener("keyup",function(e){"Enter"==e.key&&o.blur()}),o.addEventListener("focusout",e=>{this.set(e.target.value,!1,e)})):"input"==e&&o.addEventListener("input",e=>{this.set(e.target.value,!1,e)}),s.icon&&(e=z.makeIcon(s.icon,{iconClass:"absolute z-1 ml-2",svgClass:"sm"}),n.appendChild(e)),N(()=>{n.style.height=s.height??"",this.onResize()},10)}}z.TextArea=X;class _ extends w{constructor(s,i,a,l={}){super(w.BUTTON,s,null,l),this.onGetValue=()=>n.querySelector("input")?.checked,this.onSetValue=(e,t,s)=>{l.swap?this.root.setState(e,t):(n.innerHTML="",l.icon?(t=z.makeIcon(l.icon),n.prepend(t)):l.img?((t=document.createElement("img")).src=l.img,n.prepend(t)):n.innerHTML=`<span>${e??""}</span>`)},this.onResize=e=>{var t=this.root.domName?.style.width??"0px";n.style.width=`calc( 100% - ${t})`};var e,n=document.createElement("button");n.title=l.tooltip?"":l.title??"",n.className="lexbutton p-1 "+(l.buttonClass??""),this.root.appendChild(n),l.selected&&n.classList.add("selected"),l.icon?(e=z.makeIcon(l.icon),n.prepend(e),n.classList.add("justify-center")):l.img?((e=document.createElement("img")).src=l.img,n.prepend(e)):n.innerHTML=`<span>${i||""}</span>`,l.disabled&&n.setAttribute("disabled",!0);let o=n;l.swap&&(n.classList.add("swap"),n.querySelector("a").classList.add("swap-off"),(e=document.createElement("input")).className="p-0 border-0",e.type="checkbox",n.prepend(e),e=z.makeIcon(l.swap,{iconClass:"swap-on"}),n.appendChild(e),this.root.swap=function(e){var t=n.querySelector("input");t.checked=!t.checked,e||o.click()},this.root.setState=function(e,t){n.querySelector("input").checked=e,t||o.click()}),o.addEventListener("click",e=>{l.selectable&&(l.parent&&l.parent.querySelectorAll(".lexbutton.selected").forEach(e=>{e!=n&&e.classList.remove("selected")}),n.classList.toggle("selected"));var t=n.querySelector("input");this._trigger(new b(s,t?.checked??i,e),a)}),l.tooltip&&z.asTooltip(n,l.title??s),N(this.onResize.bind(this))}}z.Button=_;class Y extends w{constructor(i,a,e={}){let l=!e.noSelection,n=l&&(e.toggle??!1),o=document.createElement("div"),r=(o.className="lexcombobuttons ",e.skipReset=!0,e.float&&(o.className+=e.float),[]);var c,d=document.createElement("div");d.className="lexcombobuttonsbox ",o.appendChild(d);for(let s of a){if(!s.value)throw"Set 'value' for each button!";let t=document.createElement("button");t.className="lexbutton combo",t.title=s.icon?s.value:"",t.id=s.id??"",t.dataset.value=s.value,e.buttonClass&&t.classList.add(e.buttonClass),l&&(s.selected||e.selected?.includes(s.value))&&(t.classList.add("selected"),r=r.concat([s.value])),s.icon?(c=z.makeIcon(s.icon),t.appendChild(c)):t.innerHTML=`<span>${s.value}</span>`,s.disabled&&t.setAttribute("disabled",!0),t.addEventListener("click",e=>{r=[],l&&(n?t.classList.toggle("selected"):(o.querySelectorAll("button").forEach(e=>e.classList.remove("selected")),t.classList.add("selected"))),o.querySelectorAll("button").forEach(e=>{e.classList.contains("selected")&&r.push(e.dataset.value)}),!n&&1<r.length?console.error("Enable _options.toggle_ to allow selecting multiple options in ComboButtons."):(r=r[0],this.set(s.value,!1,t.classList.contains("selected")))}),d.appendChild(t)}1<r.length?n||(e.toggle=!0,n=l,console.warn(`Multiple options selected in '${i}' ComboButtons. Enabling _toggle_ mode.`)):r=r[0],super(w.BUTTONS,i,null,e),this.onGetValue=()=>r,this.onSetValue=(t,e,s)=>{l&&null==s&&(o.querySelectorAll("button").forEach(e=>e.classList.remove("selected")),o.querySelectorAll("button").forEach(e=>{r&&-1<r.indexOf(e.dataset.value)&&e.classList.add("selected")})),e||t.constructor==Array||(e=s,s=a.filter(e=>e.value==t)[0]?.callback,this._trigger(new b(i,n?[t,e]:t,null),s))},this.onResize=e=>{var t=this.root.domName?.style.width??"0px";o.style.width=`calc( 100% - ${t})`},this.root.appendChild(o),N(this.onResize.bind(this))}}z.ComboButtons=Y;class Z extends w{constructor(t,s={}){s.hideName=!0,super(w.CARD,t,null,s);let i=document.createElement("div");i.className="lexcard",i.style.width="100%",this.root.appendChild(i),s.img&&((a=document.createElement("img")).src=s.img,i.appendChild(a),null!=s.link)&&(a.style.cursor="pointer",a.addEventListener("click",function(){var e=i.querySelector("a");e&&e.click()}));var e,a=document.createElement("span");a.innerText=t,i.appendChild(a),null!=s.link&&((e=document.createElement("a")).innerText=t,e.href=s.link,e.target=s.target??"",a.innerText="",a.appendChild(e)),s.callback&&(i.style.cursor="pointer",i.addEventListener("click",e=>{this._trigger(new b(t,null,e),s.callback)}))}}z.Card=Z;class K extends w{constructor(e,i,a,s={}){if(i.constructor!=Object)return void console.error("Form data must be an Object");s.hideName=!0,super(w.FORM,e,null,s),this.onGetValue=()=>n.formData,this.onSetValue=(t,s,e)=>{n.formData=t;var i,a,l=n.querySelectorAll(".lexwidget");for(let e=0;e<l.length;++e)l[e].jsInstance.type==z.Widget.TEXT&&(i=l[e].querySelector(".lexwidgetname").innerText,(a=l[e].querySelector(".lextext input")).value=t[i]??"",w._dispatchEvent(a,"focusout",s))};let n=document.createElement("div");n.className="lexformdata",n.style.width="100%",n.formData={},this.root.appendChild(n);for(let t in i){let e=i[t];var l;e.constructor!=Object&&(e={},i[t]=e),e.placeholder=e.placeholder??t,e.width="100%",s.skipLabels||(l=new k(null,t,null,{disabled:!0,inputClass:"formlabel nobg"}),n.appendChild(l.root)),e.textWidget=new k(null,e.constructor==Object?e.value:e,e=>{n.formData[t]=e},e),n.appendChild(e.textWidget.root),n.formData[t]=e.constructor==Object?e.value:e}var e=z.makeContainer(["100%","auto"],"flex flex-row","",n),t=((s.secondaryActionName||s.secondaryActionCallback)&&(t=new _(null,s.secondaryActionName??"Cancel",(e,t)=>{a&&a(n.formData,t)},{width:"100%",minWidth:"0",buttonClass:s.secondaryButtonClass??"primary"}),e.appendChild(t.root)),new _(null,s.primaryActionName??"Submit",(e,t)=>{for(var s in i)if(!i[s].textWidget.valid())return;a&&a(n.formData,t)},{width:"100%",minWidth:"0",buttonClass:s.primaryButtonClass??"contrast"}));e.appendChild(t.root)}}z.Form=K;class M extends w{constructor(l,n,r,o,c={}){super(w.SELECT,l,r,c),this.onGetValue=()=>r,this.onSetValue=(t,e,s)=>{r=t;let i=null;var a;g.childNodes.forEach(e=>{e.classList.remove("selected"),e.getAttribute("value")==t&&(i=e)}),console.assert(i,`Item ${t} does not exist in the Select.`),i.classList.add("selected"),h.refresh(r),m&&(m.root.querySelector("input").value="",a=this._filterOptions(n,""),p.refresh(a)),e||this._trigger(new b(l,r,s),o)},this.onResize=e=>{var t=this.root.domName?.style.width??"0px";s.style.width=c.inputWidth??`calc( 100% - ${t})`};let s=document.createElement("div"),d=(s.className="lexselect",this.root.appendChild(s),document.createElement("div")),h=(d.className="lexselect lexoption",d.name=l,d.iValue=r,c.overflowContainer&&(c.overflowContainerX=c.overflowContainerY=c.overflowContainer),new _(null,r,(e,t)=>{p.unfocus_event?delete p.unfocus_event:(u.classList.remove("place-above"),u.hasAttribute("open")?u.close():(u.show(),(i=>{var a=h.root;let l=a.getBoundingClientRect();var n=i.parentElement.closest("dialog")??i.parentElement.closest(".lexcolorpicker");{var o=c.overflowContainerY??i.getParentArea(),r=i.offsetHeight;let t=l.y,s=window.innerHeight;if(o&&(o=o.getBoundingClientRect(),s=o.y+o.height),n){let e=n.getBoundingClientRect();t-=e.y,s-=e.y}i.style.top=t+a.offsetHeight+"px",t+r>s&&(i.style.top=t-r+"px",i.classList.add("place-above"))}{o=c.overflowContainerX??i.getParentArea(),a=i.offsetWidth;let t=l.x;if(i.style.minWidth=l.width+"px",n){let e=n.getBoundingClientRect();t-=e.x}i.style.left=t+"px";let e=window.innerWidth;o&&(r=o.getBoundingClientRect(),e=r.x+r.width),t+a>e&&(i.style.left=t-(a-l.width)+"px")}})(u)),m&&m.root.querySelector("input").focus())},{buttonClass:"array",skipInlineCount:!0,disabled:c.disabled})),u=(h.root.style.width="100%",h.root.querySelector("span").appendChild(z.makeIcon("Down",{svgClass:"sm"})),s.appendChild(h.root),h.refresh=e=>{var t=h.root.querySelector("span");""==t.innerText?t.innerText=e:t.innerHTML=t.innerHTML.replaceAll(t.innerText,e)},document.createElement("dialog")),p=(u.className="lexselectoptions",document.createElement("ul")),m=(p.tabIndex=-1,p.className="lexoptions",u.appendChild(p),p.addEventListener("focusout",function(e){if(e.stopPropagation(),e.stopImmediatePropagation(),e.relatedTarget===h.root.querySelector("button"))this.unfocus_event=!0,setTimeout(()=>delete this.unfocus_event,200);else{if(e.relatedTarget&&u.contains(e.relatedTarget))return;if("lexinput-filter"==e.target.className)return}u.close()}),null);var e;c.filter&&((e=z.deepCopy(c)).placeholder=e.placeholder??"Search...",e.skipWidget=e.skipWidget??!0,e.trigger="input",e.icon="Search",e.className="lexfilter",e.inputClass="outline",(m=new k(null,c.filterValue??"",e=>{e=this._filterOptions(n,e);p.refresh(e)},e)).root.querySelector(".lextext").style.border="1px solid transparent",m.root.querySelector("input").addEventListener("focusout",function(e){e.relatedTarget&&"UL"==e.relatedTarget.tagName&&e.relatedTarget.classList.contains("lexoptions")||u.close()}),p.appendChild(m.root));let g=document.createElement("span");g.className="lexselectinnerlist",p.appendChild(g),p.refresh=t=>{var e,s;if(g.innerHTML="",t.length)for(let e=0;e<t.length;e++){var i,a=t[e],l=document.createElement("li"),n=document.createElement("div"),o=(n.className="option",l.appendChild(n),e=>{this.set(e.currentTarget.getAttribute("value"),!1,e),u.close()});l.addEventListener("click",o),a.constructor!=Object?((i="@"===a[0])?(n.innerHTML="<span>"+a.substr(1)+"</span>",l.removeEventListener("click",o)):(n.innerHTML=`<span>${a}</span>`,n.appendChild(z.makeIcon("Check")),n.value=a,l.setAttribute("value",a),a==r&&(l.classList.add("selected"),d.innerHTML=a)),l.classList.add(i?"lexselectlabel":"lexselectitem")):((o=document.createElement("img")).src=a.src,l.setAttribute("value",a.value),l.className="lexlistitem",n.innerText=a.value,n.className+=" media",n.prepend(o),n.setAttribute("value",a.value),n.setAttribute("data-index",e),n.setAttribute("data-src",a.src),n.setAttribute("title",a.value),r==a.value&&l.classList.add("selected")),g.appendChild(l)}else s=c.emptyMsg??"No options found.",(e=document.createElement("div")).className="option",e.innerHTML=s,(s=document.createElement("li")).className="lexselectitem empty",s.appendChild(e),g.appendChild(s)},p.refresh(n),s.appendChild(u),N(this.onResize.bind(this))}_filterOptions(t,s){var i=!s.length,a=[];for(let e=0;e<t.length;e++){var l=t[e];if(!i){var n="string"==typeof l?l:l.value,o=s.toLowerCase();if(!n.toLowerCase().includes(o))continue}a.push(l)}return a}}z.Select=M;class n extends w{constructor(i,e,a,t={}){var s=JSON.parse(JSON.stringify(e)),l=(super(w.CURVE,i,s,t),this.onGetValue=()=>JSON.parse(JSON.stringify(n.element.value)),this.onSetValue=(e,t,s)=>{n.element.value=JSON.parse(JSON.stringify(e)),n.redraw(),t||this._trigger(new b(i,n.element.value,s),a)},this.onResize=e=>{var t=this.root.domName?.style.width??"0px";l.style.width=`calc( 100% - ${t})`},document.createElement("div"));l.className="lexcurve",this.root.appendChild(l),t.callback=(e,t)=>{this._trigger(new b(i,e,t),a)},t.name=i;let n=new Ee(e,t);l.appendChild(n.element),this.curveInstance=n,new ResizeObserver(e=>{for(var t of e)n.canvas.width=t.contentRect.width,n.redraw()}).observe(l),N(this.onResize.bind(this))}}z.Curve=n;class J extends w{constructor(i,e,a,t={}){var s=JSON.parse(JSON.stringify(e)),l=(super(w.DIAL,i,s,t),this.onGetValue=()=>JSON.parse(JSON.stringify(n.element.value)),this.onSetValue=(e,t,s)=>{n.element.value=JSON.parse(JSON.stringify(e)),n.redraw(),t||this._trigger(new b(i,n.element.value,s),a)},this.onResize=e=>{var t=this.root.domName?.style.width??"0px";l.style.width=`calc( 100% - ${t})`,n.element.style.height=n.element.offsetWidth+"px",n.canvas.width=n.element.offsetWidth,l.style.width=n.element.offsetWidth+"px",n.canvas.height=n.canvas.width,n.redraw()},document.createElement("div"));l.className="lexcurve",this.root.appendChild(l),t.callback=(e,t)=>{this._trigger(new b(i,e,t),a)},t.name=i;let n=new xe(this,e,t);l.appendChild(n.element),this.dialInstance=n,N(this.onResize.bind(this))}}z.Curve=n;class Q extends w{constructor(i,a,l,e={}){super(w.LAYERS,i,a,e),this.onGetValue=()=>a,this.onSetValue=(e,t,s)=>{a=e,this.setLayers(a),t||this._trigger(new b(i,a,s),l)},this.onResize=e=>{var t=this.root.domName?.style.width??"0px";n.style.width=`calc( 100% - ${t})`};var n=document.createElement("div");n.className="lexlayers",this.root.appendChild(n),this.setLayers=i=>{n.innerHTML="";let t=i.toString(2);var s=t.length;for(let e=0;e<16-s;++e)t="0"+t;for(let s=0;s<16;++s){var e,a=document.createElement("div");a.className="lexlayer",null!=i&&null!=(e=t[16-s-1])&&"1"==e&&a.classList.add("selected"),a.innerText=s+1,a.title="Bit "+s+", value "+(1<<s),n.appendChild(a),a.addEventListener("click",e=>{e.stopPropagation(),e.stopImmediatePropagation(),e.target.classList.toggle("selected");var t=i^1<<s;this.set(t,!1,e)})}},this.setLayers(a),N(this.onResize.bind(this))}}z.Layers=Q;class ee extends w{constructor(a,l=[],n,o={}){o.nameWidth="100%",super(w.ARRAY,a,null,o),this.onGetValue=()=>l,this.onSetValue=(e,t,s)=>{l=e,this._updateItems(),t||this._trigger(new b(a,l,s),n)};var e=document.createElement("div"),t=(e.className="lexarray",e.style.width="100%",this.root.appendChild(e),this.root.dataset.opened=!1,`Array (size ${l.length})`),t=new _(null,t,()=>{this.root.dataset.opened="true"!=this.root.dataset.opened,this.root.querySelector(".lexarrayitems").toggleAttribute("hidden")},{buttonClass:"array"});t.root.querySelector("span").appendChild(z.makeIcon("Down",{svgClass:"sm"})),e.appendChild(t.root);let r=document.createElement("div");r.className="lexarrayitems",r.toggleAttribute("hidden",!0),this.root.appendChild(r),this._updateItems=()=>{var e;for(e of this.root.querySelector(".lexbutton.array span").childNodes)if(e.nodeType===Node.TEXT_NODE){e.textContent=`Array (size ${l.length})`;break}r.innerHTML="";for(let i=0;i<l.length;++i){let s=l[i];var t=o.innerValues?"select":s.constructor;let e=null;switch(t){case String:e=new k(i+"",s,function(e,t){l[i]=e,n(l)},{nameWidth:"12px",className:"p-0",skipReset:!0});break;case Number:e=new re(i+"",s,function(e,t){l[i]=e,n(l)},{nameWidth:"12px",className:"p-0",skipReset:!0});break;case"select":e=new M(i+"",o.innerValues,s,function(e,t){l[i]=e,n(l)},{nameWidth:"12px",className:"p-0",skipReset:!0})}console.assert(e,`Value of type ${t} cannot be modified in ItemArray`),r.appendChild(e.root);t=new _(null,"",(e,t)=>{l.splice(l.indexOf(s),1),this._updateItems(),this._trigger(new b(a,l,t),n)},{title:"Remove item",icon:"Trash3"});e.root.appendChild(t.root)}var s=new _(null,z.makeIcon("Plus",{svgClass:"sm"}).innerHTML+"Add item",(e,t)=>{l.push(o.innerValues?o.innerValues[0]:""),this._updateItems(),this._trigger(new b(a,l,t),n)},{buttonClass:"array"});r.appendChild(s.root)},this._updateItems()}}z.ItemArray=ee;class te extends w{constructor(l,n,o,r,e={}){super(w.LIST,l,o,e),this.onGetValue=()=>o,this.onSetValue=(t,e,s)=>{c.querySelectorAll(".lexlistitem").forEach(e=>e.classList.remove("selected"));let i=null;for(let e=0;e<n.length;++e){var a=n[e];if(a==t||a.constructor==Array&&a[0]==t){i=e;break}}i?(c.children[i].classList.toggle("selected"),o=t,e||this._trigger(new b(l,t,s),r)):console.error(`Cannot find item ${t} in List.`)},this.onResize=e=>{var t=this.root.domName?.style.width??"0px";c.style.width=`calc( 100% - ${t})`},this._updateValues=e=>{n=e,c.innerHTML="";for(let i=0;i<n.length;++i){let e=null,t=n[i],s=(t.constructor===Array&&(e=t[1],t=t[0]),document.createElement("div"));s.className="lexlistitem"+(o==t?" selected":""),e&&s.appendChild(z.makeIcon(e)),s.innerHTML+=`<span>${t}</span>`,s.addEventListener("click",e=>{c.querySelectorAll(".lexlistitem").forEach(e=>e.classList.remove("selected")),s.classList.toggle("selected"),o=t,this._trigger(new b(l,t,e),r)}),c.appendChild(s)}};let c=document.createElement("div");c.className="lexlist",this.root.appendChild(c),this._updateValues(n),N(this.onResize.bind(this))}}z.List=te;class se extends w{constructor(i,a,l,e={}){a=a.replace(/\s/g,"").split(",");var t=[].concat(a);super(w.TAGS,i,t,e),this.onGetValue=()=>[].concat(a),this.onSetValue=(e,t,s)=>{a=[].concat(e),this.generateTags(a),t||this._trigger(new b(i,a,s),l)},this.onResize=e=>{var t=this.root.domName?.style.width??"0px";n.style.width=`calc( 100% - ${t})`};let n=document.createElement("div");n.className="lextags",this.root.appendChild(n),this.generateTags=i=>{n.innerHTML="";for(let e=0;e<i.length;++e){let t=i[e],s=document.createElement("span");s.className="lextag",s.innerHTML=t;var a=z.makeIcon("X",{svgClass:"sm"});s.appendChild(a),a.addEventListener("click",e=>{s.remove(),i.splice(i.indexOf(t),1),this.set(i,!1,e)}),n.appendChild(s)}let s=document.createElement("input");s.value="",s.placeholder="Add tag...",n.appendChild(s),s.onkeydown=e=>{var t=s.value.replace(/\s/g,"");" "!=e.key&&"Enter"!=e.key||(e.preventDefault(),!t.length)||-1<i.indexOf(t)||(i.push(t),this.set(i,!1,e))},s.focus()},this.generateTags(a),N(this.onResize.bind(this))}}z.Tags=se;class ie extends w{constructor(i,a,l,s={}){if(!i&&!s.label)throw"Set Widget Name or at least a label!";super(w.CHECKBOX,i,a,s),this.onGetValue=()=>a,this.onSetValue=(e,t,s)=>{e==a||(o.checked=a=e,this.root.querySelector(".lexcheckboxsubmenu")?.toggleAttribute("hidden",!e),t)||this._trigger(new b(i,e,s),l)},this.onResize=e=>{var t=this.root.domName?.style.width??"0px";n.style.width=s.inputWidth??`calc( 100% - ${t})`};var n=document.createElement("div");n.className="lexcheckboxcont",this.root.appendChild(n);let o=document.createElement("input");o.type="checkbox",o.className="lexcheckbox "+(s.className??"primary"),o.checked=a,o.disabled=s.disabled??!1,n.appendChild(o);var e,t=document.createElement("span");t.className="checkboxtext",t.innerHTML=s.label??"On",n.appendChild(t),o.addEventListener("change",e=>{this.set(o.checked,!1,e)}),s.suboptions&&((t=document.createElement("div")).className="lexcheckboxsubmenu",t.toggleAttribute("hidden",!o.checked),(e=new P).queue(t),s.suboptions.call(this,e),e.clearQueue(),this.root.appendChild(t)),N(this.onResize.bind(this))}}z.Checkbox=ie;class ae extends w{constructor(i,a,l,s={}){if(!i&&!s.label)throw"Set Widget Name or at least a label!";super(w.TOGGLE,i,a,s),this.onGetValue=()=>o.checked,this.onSetValue=(e,t,s)=>{e==a||(o.checked=a=e,this.root.querySelector(".lextogglesubmenu")?.toggleAttribute("hidden",!e),t)||this._trigger(new b(i,e,s),l)},this.onResize=e=>{var t=this.root.domName?.style.width??"0px";n.style.width=s.inputWidth??`calc( 100% - ${t})`};var n=document.createElement("div");n.className="lextogglecont",this.root.appendChild(n);let o=document.createElement("input");o.type="checkbox",o.className="lextoggle "+(s.className??""),o.checked=a,o.iValue=a,o.disabled=s.disabled??!1,n.appendChild(o);var e,t=document.createElement("span");t.className="toggletext",t.innerHTML=s.label??"On",n.appendChild(t),o.addEventListener("change",e=>{this.set(o.checked,!1,e)}),s.suboptions&&((t=document.createElement("div")).className="lextogglesubmenu",t.toggleAttribute("hidden",!o.checked),(e=new P).queue(t),s.suboptions.call(this,e),e.clearQueue(),this.root.appendChild(t)),N(this.onResize.bind(this))}}z.Toggle=ae;class le extends w{constructor(e,t,a,l,s={}){super(w.RADIO,e,null,s);let i=null;this.onGetValue=()=>{var e=n.querySelectorAll("button");return i?[i,e[i]]:void 0},this.onSetValue=(e,t,s)=>{e=e[0]??e,console.assert(e.constructor==Number,"RadioGroup _value_ must be an Array index!");var i=n.querySelectorAll("button"),i=(i.forEach(e=>{e.checked=!1,e.classList.remove("checked")}),i[e]);i.checked=!i.checked,i.classList.toggle("checked"),t||this._trigger(new b(null,[e,a[e]],s),l)};var n=document.createElement("div"),e=(n.className="lexradiogroup "+(s.className??""),this.root.appendChild(n),document.createElement("span"));e.innerHTML=t,n.appendChild(e);for(let t=0;t<a.length;++t){var o=document.createElement("div"),r=(o.className="lexradiogroupitem",n.appendChild(o),document.createElement("button")),c=(r.className="flex p-0 rounded-lg cursor-pointer",r.disabled=s.disabled??!1,o.appendChild(r),r.addEventListener("click",e=>{this.set(t,!1,e)}),document.createElement("span")),r=(r.appendChild(c),document.createElement("span"));r.innerHTML=a[t],o.appendChild(r)}s.selected&&(console.assert(s.selected.constructor==Number,"RadioGroup _selected_ must be an Array index!"),i=s.selected,this.set(i,!0))}}z.RadioGroup=le;class ne extends w{constructor(i,a,l,n={}){a=a??"#000000";let o=n.useAlpha??(a.constructor===Object&&"a"in a||a.constructor===String&&[5,9].includes(a.length));var e=new p(a),s=(a=o?e.hex:e.hex.substr(0,7),super(w.COLOR,i,a,n),this.onGetValue=()=>{var e=new p(a);return n.useRGB?e.rgb:a},this.onSetValue=(t,e,s)=>{t=new p(t);if(r.style.color=a=t.hex.substr(0,7),o&&(c.style.color=a=t.hex),this._skipTextUpdate||d.set(a,!0,s),!e){let e=a;n.useRGB&&(e=t.rgb,o||delete e.a),this._trigger(new b(i,e,s),l)}},this.onResize=e=>{var t=this.root.domName?.style.width??"0px";s.style.width=`calc( 100% - ${t})`},document.createElement("span"));s.className="lexcolor",this.root.appendChild(s),this.picker=new q(a,{colorModel:n.useRGB?"RGB":"Hex",useAlpha:o,onChange:e=>{this._fromColorPicker=!0,this.set(e.hex),delete this._fromColorPicker}});let t=z.makeContainer(["18px","18px"],"flex flex-row bg-contrast rounded overflow-hidden","",s),r=(t.tabIndex="1",t.addEventListener("click",e=>{n.disabled||(this._popover=new m(t,[this.picker]))}),document.createElement("div")),c=(r.className="lexcolorsample",r.style.color=a,t.appendChild(r),null),d=(o?((c=document.createElement("div")).className="lexcolorsample",c.style.color=a,t.appendChild(c)):r.style.width="18px",new k(null,a,e=>{this._skipTextUpdate=!0,this.set(e),delete this._skipTextUpdate},{width:"calc( 100% - 24px )",disabled:n.disabled}));d.root.style.marginLeft="6px",s.appendChild(d.root),N(this.onResize.bind(this))}}z.ColorInput=ne;class oe extends w{constructor(i,a,l,n={}){super(w.RANGE,i,a,n),this.onGetValue=()=>a,this.onSetValue=(e,t,s)=>{isNaN(e)||(o.value=a=g(+e,+o.min,+o.max),t)||this._trigger(new b(i,n.left?+o.max-a+ +o.min:a,s),l)},this.onResize=e=>{var t=this.root.domName?.style.width??"0px";s.style.width=n.inputWidth??`calc( 100% - ${t})`};let s=document.createElement("div"),o=(s.className="lexrange",this.root.appendChild(s),document.createElement("input"));o.className="lexrangeslider "+(n.className??""),o.min=n.min??0,o.max=n.max??100,o.step=n.step??1,o.type="range",o.disabled=n.disabled??!1,a.constructor==Number&&(a=g(a,+o.min,+o.max)),n.left&&(a=+o.max-a+ +o.min),o.value=a,s.appendChild(o),n.left&&o.classList.add("left"),(n.fill??!0)||o.classList.add("no-fill"),o.addEventListener("input",e=>{this.set(e.target.valueAsNumber,!1,e)},{passive:!1}),o.addEventListener("mousedown",function(e){n.onPress&&n.onPress.bind(o)(e,o)},!1),o.addEventListener("mouseup",function(e){n.onRelease&&n.onRelease.bind(o)(e,o)},!1),this.setLimits=(e,t,s)=>{o.min=e??o.min,o.max=t??o.max,o.step=s??o.step,w._dispatchEvent(o,"input",!0)},N(this.onResize.bind(this))}}z.RangeInput=oe;class re extends w{constructor(i,a,l,n={}){super(w.NUMBER,i,a,n),this.onGetValue=()=>a,this.onSetValue=(e,t,s)=>{isNaN(e)||(a=g(+e,+c.min,+c.max),c.value=a=f(a,n.precision),o.querySelector(".lexinputslider")&&(o.querySelector(".lexinputslider").value=a),t)||this._trigger(new b(i,a,s),l)},this.onResize=e=>{var t=this.root.domName?.style.width??"0px";s.style.width=n.inputWidth??`calc( 100% - ${t})`};var s=document.createElement("div");s.className="lexnumber",this.root.appendChild(s);let o=document.createElement("div"),r=(o.className="numberbox",s.appendChild(o),z.makeContainer(["auto","100%"],"relative flex flex-row cursor-text","",o)),c=document.createElement("input"),d=(c.id="number_"+L(),c.className="vecinput",c.min=n.min??-1e24,c.max=n.max??1e24,c.step=n.step??"any",c.type="number",a.constructor==Number&&(a=f(a=g(a,+c.min,+c.max),n.precision)),c.value=c.iValue=a,r.appendChild(c),z.makeIcon("MoveVertical",{iconClass:"drag-icon hidden-opacity",svgClass:"sm"}));if(r.appendChild(d),n.units&&(e=z.makeContainer(["auto","auto"],"px-2 bg-secondary content-center",n.units,r),c.unitBox=e),n.disabled&&(c.disabled=!0),!n.skipSlider&&void 0!==n.min&&void 0!==n.max){var e=z.makeContainer(["100%","auto"],"","",o);let i=document.createElement("input");i.className="lexinputslider",i.min=n.min,i.max=n.max,i.step=n.step??1,i.type="range",i.value=a,i.addEventListener("input",e=>{this.set(i.valueAsNumber,!1,e)},!1),i.addEventListener("mousedown",function(e){n.onPress&&n.onPress.bind(i)(e,i)},!1),i.addEventListener("mouseup",function(e){n.onRelease&&n.onRelease.bind(i)(e,i)},!1),e.appendChild(i),this.setLimits=(e,t,s)=>{c.min=i.min=e??c.min,c.max=i.max=t??c.max,c.step=s??c.step,i.step=s??i.step,this.set(a,!0)}}c.addEventListener("input",function(e){a=f(a=+this.valueAsNumber,n.precision)},!1),c.addEventListener("wheel",t=>{if(t.preventDefault(),c===document.activeElement){let e=n.step??1;t.shiftKey?e*=10:t.altKey&&(e*=.1),a=+c.valueAsNumber-e*(0<t.deltaY?1:-1),this.set(a,!1,t)}},{passive:!1}),c.addEventListener("change",e=>{this.set(c.valueAsNumber,!1,e)},{passive:!1});var h=this;let u=t=>{var s=-t.movementY;if(0!=s){let e=n.step??1;t.shiftKey?e*=10:t.altKey&&(e*=.1),a=+c.valueAsNumber+e*s,this.set(a,!1,t)}t.stopPropagation(),t.preventDefault()},p=e=>{var t=h.root.ownerDocument;t.removeEventListener("mousemove",u),t.removeEventListener("mouseup",p),document.body.classList.remove("noevents"),d.classList.add("hidden-opacity"),document.pointerLockElement&&document.exitPointerLock(),n.onRelease&&n.onRelease.bind(c)(e,c)};r.addEventListener("mousedown",e=>{var t;document.activeElement!=c&&e.button==z.MOUSE_LEFT_CLICK&&((t=h.root.ownerDocument).addEventListener("mousemove",u),t.addEventListener("mouseup",p),document.body.classList.add("noevents"),d.classList.remove("hidden-opacity"),e.stopImmediatePropagation(),e.stopPropagation(),document.pointerLockElement||r.requestPointerLock(),n.onPress)&&n.onPress.bind(c)(e,c)}),N(this.onResize.bind(this))}}z.NumberInput=re;class ce extends w{constructor(t,a,l,n,o={}){t=g(t,2,4),l=l??new Array(t).fill(0),super(w.VECTOR,a,[].concat(l),o),this.onGetValue=()=>{var e,t=[];for(e of this.root.querySelectorAll("input"))t.push(+e.value);return t},this.onSetValue=(t,e,s)=>{if(r.length!=t.length)console.error("Input length does not match vector length.");else{for(let e=0;e<r.length;++e){var i;i=f(g(t[e],+r[e].min,+r[e].max),o.precision)??0,r[e].value=t[e]=i}e||this._trigger(new b(a,t,s),n)}},this.onResize=e=>{var t=this.root.domName?.style.width??"0px";c.style.width=`calc( 100% - ${t})`};let r=[];var c=document.createElement("div");c.className="lexvector",this.root.appendChild(c);let d=this;for(let e=0;e<t;++e){let s=document.createElement("div"),a=(s.className="vecbox",s.innerHTML="<span class='"+P.VECTOR_COMPONENTS[e]+"'></span>",document.createElement("input")),i=(a.className="vecinput v"+t,a.min=o.min??-1e24,a.max=o.max??1e24,a.step=o.step??"any",a.type="number",a.id="vec"+t+"_"+L(),a.idx=e,r[e]=a,s.appendChild(a),l[e].constructor==Number&&(l[e]=g(l[e],+a.min,+a.max),l[e]=f(l[e],o.precision)),a.value=a.iValue=l[e],z.makeIcon("MoveVertical",{iconClass:"drag-icon hidden-opacity",svgClass:"sm"}));function h(e){var t;document.activeElement!=a&&e.button==z.MOUSE_LEFT_CLICK&&((t=d.root.ownerDocument).addEventListener("mousemove",u),t.addEventListener("mouseup",p),document.body.classList.add("noevents"),i.classList.remove("hidden-opacity"),e.stopImmediatePropagation(),e.stopPropagation(),document.pointerLockElement||s.requestPointerLock(),o.onPress)&&o.onPress.bind(a)(e,a)}function u(t){var s=-t.movementY;if(0!=s){let e=o.step??1;if(t.shiftKey?e=10:t.altKey&&(e=.1),m.locked)for(var i of d.root.querySelectorAll(".vecinput"))i.value=f(+i.valueAsNumber+e*s,o.precision),w._dispatchEvent(i,"change");else a.value=f(+a.valueAsNumber+e*s,o.precision),w._dispatchEvent(a,"change")}t.stopPropagation(),t.preventDefault()}function p(e){var t=d.root.ownerDocument;t.removeEventListener("mousemove",u),t.removeEventListener("mouseup",p),document.body.classList.remove("noevents"),i.classList.add("hidden-opacity"),document.pointerLockElement&&document.exitPointerLock(),o.onRelease&&o.onRelease.bind(a)(e,a)}s.appendChild(i),o.disabled&&(a.disabled=!0),a.addEventListener("wheel",function(t){if(t.preventDefault(),this===document.activeElement){let e=o.step??1;if(t.shiftKey?e=10:t.altKey&&(e=.1),m.locked)for(var s of d.querySelectorAll(".vecinput"))s.value=f(+s.valueAsNumber-e*(0<t.deltaY?1:-1),o.precision),w._dispatchEvent(s,"change");else this.value=f(+this.valueAsNumber-e*(0<t.deltaY?1:-1),o.precision),w._dispatchEvent(a,"change")}},{passive:!1}),a.addEventListener("change",e=>{if(!isNaN(e.target.value)){var t=f(g(e.target.value,+a.min,+a.max),o.precision);if(m.locked)for(var s of r)s.value=t,l[s.idx]=t;else a.value=t,l[e.target.idx]=t;this.set(l,!1,e)}},!1),s.addEventListener("mousedown",h),c.appendChild(s)}void 0===o.min&&void 0===o.max||(this.setLimits=(e,t,s)=>{for(var i of r)i.min=e??i.min,i.max=t??i.max,i.step=s??i.step;this.set(l,!0)});let m=new _(null,"",e=>{m.locked=e},{title:"Lock",icon:"LockOpen",swap:"Lock",buttonClass:"bg-none p-0"});c.appendChild(m.root),N(this.onResize.bind(this))}}z.Vector=ce;class de extends w{constructor(e,t,l,s={}){super(w.SIZE,e,t,s),this.onGetValue=()=>{var t=[];for(let e=0;e<this.root.dimensions.length;++e)t.push(this.root.dimensions[e].value());return t},this.onSetValue=(t,s,e)=>{for(let e=0;e<this.root.dimensions.length;++e)this.root.dimensions[e].set(t[e],s)},this.root.aspectRatio=2==t.length?t[0]/t[1]:null,this.root.dimensions=[];for(let a=0;a<t.length;++a){var i=new P;this.root.dimensions[a]=i.addNumber(null,t[a],e=>{var t,s,i=this.value();this.root.locked&&(t=0==a?1/this.root.aspectRatio:this.root.aspectRatio,i[s=(1+a)%2]=e*t,this.root.dimensions[s].set(i[s],!0)),l&&l(i)},{min:0,disabled:s.disabled,precision:s.precision,className:"flex-fill"}),this.root.appendChild(this.root.dimensions[a].root),a+1!=t.length&&(i=z.makeIcon("X",{svgClass:"fg-accent font-bold"}),this.root.appendChild(i))}s.units&&((e=document.createElement("span")).className="select-none fg-tertiary font-medium",e.innerText=s.units,this.root.appendChild(e)),this.root.aspectRatio&&(e=new _(null,"",e=>{(this.root.locked=e)&&(e=this.value(),this.root.aspectRatio=e[0]/e[1])},{title:"Lock Aspect Ratio",icon:"LockOpen",swap:"Lock",buttonClass:"bg-none p-0"}),this.root.appendChild(e.root))}}z.SizeInput=de;class he extends w{constructor(i,a,l,e={}){var t=e.pattern??"xxx-xxx",s=(t.match(/x/g)||[]).length;(a=String(a)).length||(a="x".repeat(s)),super(w.OTP,i,a,e),this.onGetValue=()=>+a,this.onSetValue=(e,t,s)=>{a=e,n(a),t||this._trigger(new b(i,+e,s),l)},this.onResize=e=>{var t=this.root.domName?.style.width??"0px";r.style.width=`calc( 100% - ${t})`},this.disabled=e.disabled??!1;let r=document.createElement("div"),c=(r.className="lexotp flex flex-row items-center",this.root.appendChild(r),t.split("-")),n=l=>{r.innerHTML="";let t=0,n=0;for(let e=0;e<c.length;++e){var s=c[e];for(let e=0;e<s.length;++e){var o=l[t++];let i=z.makeContainer(["36px","30px"],"lexotpslot border-top border-bottom border-left px-3 cursor-text select-none font-medium outline-none","x"==o?"":o,r),a=(i.tabIndex="1",this.disabled&&i.classList.add("disabled"),t);0==e?i.className+=" rounded-l":e==s.length-1&&(i.className+=" rounded-r border-right"),i.addEventListener("click",()=>{var e;this.disabled||(r.querySelectorAll(".lexotpslot").forEach(e=>e.classList.remove("active")),(e=r.querySelectorAll(".lexotpslot")[n]).classList.add("active"),e.focus())}),i.addEventListener("blur",()=>{this.disabled||N(()=>{r.contains(document.activeElement)||r.querySelectorAll(".lexotpslot").forEach(e=>e.classList.remove("active"))},10)}),i.addEventListener("keyup",e=>{var t,s;this.disabled||(/[^0-9]+/g.test(e.key)?"ArrowLeft"==e.key||"ArrowRight"==e.key?(s="ArrowLeft"==e.key?-1:1,(t=r.querySelectorAll(".lexotpslot")[n+s])&&(r.querySelectorAll(".lexotpslot")[n].classList.remove("active"),t.classList.add("active"),t.focus(),n+=s)):"Enter"!=e.key||l.includes("x")||this.set(l):(t=e.key,console.assert(NaN!=parseInt(t)),i.innerHTML=t,l=l.substring(0,a-1)+t+l.substring(a),(s=r.querySelectorAll(".lexotpslot")[n+1])?(r.querySelectorAll(".lexotpslot")[n].classList.remove("active"),s.classList.add("active"),s.focus(),n++):this.set(l)))})}e<c.length-1&&z.makeContainer(["auto","auto"],"mx-2","-",r)}console.assert(t==l.length,"OTP Value/Pattern Mismatch!")};n(a)}}z.OTPInput=he;class ue extends w{constructor(a,e,l,s={}){super(w.PAD,a,null,s),this.onGetValue=()=>o.value.xy,this.onSetValue=(e,t,s)=>{o.value.set(e[0],e[1]),r(o.value),t||this._trigger(new b(a,o.value.xy),l)},this.onResize=e=>{var t=this.root.domName?.style.width??"0px";i.style.width=`calc( 100% - ${t})`};var i=document.createElement("div");i.className="lexpad",this.root.appendChild(i);let n=document.createElement("div"),o=(n.id="lexpad-"+a,n.className="lexinnerpad",n.style.width=s.padSize??"96px",n.style.height=s.padSize??"96px",i.appendChild(n),document.createElement("div")),r=(o.className="lexpadthumb",o.value=new z.vec2(e[0],e[1]),o.min=s.min??0,o.max=s.max??1,n.appendChild(o),e=>{var[t,s]=[n.offsetWidth,n.offsetHeight],e=new z.vec2(u(e.x,o.min,o.max,0,1),u(e.y,o.min,o.max,0,1));o.style.transform=`translate(calc( ${t*e.x}px - 50% ), calc( ${s*e.y}px - 50%)`}),c=(n.addEventListener("mousedown",function(e){var t;document.activeElement!=o&&((t=c.root.ownerDocument).addEventListener("mousemove",d),t.addEventListener("mouseup",h),document.body.classList.add("nocursor"),document.body.classList.add("noevents"),e.stopImmediatePropagation(),e.stopPropagation(),o.classList.add("active"),s.onPress)&&s.onPress.bind(o)(e,o)}),this);function d(e){var t=n.getBoundingClientRect(),t=new z.vec2(e.x-t.x,e.y-t.y),[s,i]=(t.clp(0,n.offsetWidth,t),[n.offsetWidth,n.offsetHeight]),t=t.div(new z.vec2(n.offsetWidth,n.offsetHeight));o.style.transform=`translate(calc( ${s*t.x}px - 50% ), calc( ${i*t.y}px - 50%)`,o.value=new z.vec2(u(t.x,0,1,o.min,o.max),u(t.y,0,1,o.min,o.max)),c._trigger(new b(a,o.value.xy,e),l),e.stopPropagation(),e.preventDefault()}function h(e){var t=c.root.ownerDocument;t.removeEventListener("mousemove",d),t.removeEventListener("mouseup",h),document.body.classList.remove("nocursor"),document.body.classList.remove("noevents"),o.classList.remove("active"),s.onRelease&&s.onRelease.bind(o)(e,o)}N(()=>{this.onResize(),r(o.value)})}}z.Pad=ue;class pe extends w{constructor(e,t,a={}){super(w.PROGRESS,e,t,a),this.onGetValue=()=>l.value,this.onSetValue=(e,t,s)=>{this.root.querySelector("meter").value=e,i(),this.root.querySelector("span")&&(this.root.querySelector("span").innerText=e)},this.onResize=e=>{var t=this.root.domName?.style.width??"0px";s.style.width=`calc( 100% - ${t})`};let s=document.createElement("div"),l=(s.className="lexprogress",this.root.appendChild(s),document.createElement("meter")),i=(l.id="lexprogressbar-"+e,l.className="lexprogressbar",l.step="any",l.min=a.min??0,l.max=a.max??1,l.low=a.low??l.low,l.high=a.high??l.high,l.optimum=a.optimum??l.optimum,l.value=t,s.appendChild(l),()=>{let e=z.getThemeColor("global-selected");null!=l.low&&l.value<l.low?e=z.getThemeColor("global-color-error"):null!=l.high&&l.value<l.high&&(e=z.getThemeColor("global-color-warning")),l.style.background=`color-mix(in srgb, ${e} 20%, transparent)`});var n;if(a.showValue&&(document.getElementById("progressvalue-"+e)&&document.getElementById("progressvalue-"+e).remove(),(n=document.createElement("span")).id="progressvalue-"+e,n.style.padding="0px 5px",n.innerText=t,s.appendChild(n)),a.editable){l.classList.add("editable");let s=e=>{var t;0!=e.movementX&&(t=l.getBoundingClientRect(),t=f(u(e.offsetX-t.x,0,t.width,l.min,l.max)),this.set(t,!1,e),a.callback)&&a.callback(t,e),e.stopPropagation(),e.preventDefault()},i=e=>{var t=this.root.ownerDocument;t.removeEventListener("mousemove",s),t.removeEventListener("mouseup",i),document.body.classList.remove("noevents"),l.classList.remove("grabbing")};l.addEventListener("mousedown",e=>{var t=this.root.ownerDocument,t=(t.addEventListener("mousemove",s),t.addEventListener("mouseup",i),document.body.classList.add("noevents"),l.classList.add("grabbing"),e.stopImmediatePropagation(),e.stopPropagation(),l.getBoundingClientRect()),t=f(u(e.offsetX,0,t.width,l.min,l.max));this.set(t,!1,e)})}i(),N(this.onResize.bind(this))}}z.Progress=pe;class me extends w{constructor(e,s,i={}){super(w.FILE,e,null,i);e=i.local??!0;let a=i.type??"text",l=i.read??!0,n=(this.onResize=e=>{var t=this.root.domName?.style.width??"0px";n.style.width=`calc( 100% - ${t})`},document.createElement("input"));if(n.className="lexfileinput",n.type="file",n.disabled=i.disabled??!1,this.root.appendChild(n),i.placeholder&&(n.placeholder=i.placeholder),n.addEventListener("change",function(e){let t=e.target.files;t.length&&(l?(i.onBeforeRead&&i.onBeforeRead(),e=new FileReader,"text"===a?e.readAsText(t[0]):"buffer"===a?e.readAsArrayBuffer(t[0]):"bin"===a?e.readAsBinaryString(t[0]):"url"===a&&e.readAsDataURL(t[0]),e.onload=e=>{s.call(this,e.target.result,t[0])}):s(t[0]))}),n.addEventListener("cancel",function(e){s(null)}),e){let t=null;e=new _(null,"",()=>{t=t||new S("Load Settings",e=>{e.addSelect("Type",["text","buffer","bin","url"],a,e=>{a=e}),e.addButton(null,"Reload",e=>{n.dispatchEvent(new Event("change"))})},{onclose:e=>{e.remove(),t=null}})},{skipInlineCount:!0,title:"Settings",disabled:i.disabled,icon:"Settings"});this.root.appendChild(e.root)}N(this.onResize.bind(this))}}z.FileInput=me;class ge extends w{constructor(e,t,s={}){s.hideName=!0,super(w.TREE,e,null,s);var i=document.createElement("div"),a=(i.className="lextree",this.root.appendChild(i),e&&((o=document.createElement("span")).innerHTML=e,i.appendChild(o)),document.createElement("div"));if(a.className="lextreetools",e||(a.className+=" notitle"),s.icons)for(var l of s.icons){var n=z.makeIcon(l.icon,{title:l.name});n.addEventListener("click",l.callback),a.appendChild(n)}s.filter=s.filter??!0;var o=null,o=(s.filter&&((o=document.createElement("input")).className="lexnodetreefilter",o.setAttribute("placeholder","Filter.."),o.style.width="100%",o.addEventListener("input",()=>{this.innerTree.refresh()}),e=z.makeIcon("Search"),a.appendChild(o),a.appendChild(e)),(s.icons||s.filter)&&i.appendChild(a),document.createElement("ul"));o.addEventListener("contextmenu",function(e){e.preventDefault()}),i.appendChild(o),this.innerTree=new U(i,t,s)}}z.Tree=ge;class ve extends w{constructor(e,a,t={}){if(t.hideName=!0,super(w.TABS,e,null,t),a.constructor!=Array)throw"Param @tabs must be an Array!";var e=t.vertical??!0,l=!e&&(t.showNames??!1);let n=document.createElement("div"),o=(n.className="lextabscontainer",e||(n.className+=" horizontal"),document.createElement("div"));o.className="tabs",n.appendChild(o),this.root.appendChild(n);for(let e=0;e<a.length;++e){let t=a[e];console.assert(t.name);var r=0==e;let s=document.createElement("div"),i=(s.className="lextab "+(e==a.length-1?"last":"")+(r?"selected":""),s.innerHTML=l?t.name:"",s.appendChild(z.makeIcon(t.icon??"Hash",{title:t.name})),document.createElement("div"));i.id=t.name.replace(/\s/g,""),i.className="widgets",r||i.toggleAttribute("hidden",!0),n.appendChild(i),s.addEventListener("click",e=>{o.querySelectorAll(".lextab").forEach(e=>{e.classList.remove("selected")}),s.classList.add("selected"),n.querySelectorAll(".widgets").forEach(e=>{e.toggleAttribute("hidden",!0)}),n.querySelector("#"+i.id).toggleAttribute("hidden"),t.onSelect&&t.onSelect(this,i)}),o.appendChild(s),t.onCreate&&((r=new P).queue(i),t.onCreate.call(this,r),r.clearQueue())}}}z.TabSections=ve;class fe extends w{constructor(i,e,a,t={}){super(w.COUNTER,i,e,t),this.onGetValue=()=>c.count,this.onSetValue=(e,t,s)=>{e=g(e,l,n),c.count=e,c.innerHTML=e,t||this._trigger(new b(i,e,s),a)};let l=t.min??0,n=t.max??100,o=t.step??1;var s=document.createElement("div"),r=(s.className="lexcounter",this.root.appendChild(s),new _(null,"",(e,t)=>{let s=o??1;t.shiftKey&&(s*=10),this.set(c.count-s,!1,t)},{skipInlineCount:!0,title:"Minus",icon:"Minus"})),r=(s.appendChild(r.root),document.createElement("div"));r.className="lexcounterbox",s.appendChild(r);let c=document.createElement("span");c.className="lexcountervalue",c.innerHTML=e,c.count=e,r.appendChild(c),t.label&&((e=document.createElement("span")).className="lexcounterlabel",e.innerHTML=t.label,r.appendChild(e));t=new _(null,"",(e,t)=>{let s=o??1;t.shiftKey&&(s*=10),this.set(c.count+s,!1,t)},{skipInlineCount:!0,title:"Plus",icon:"Plus"});s.appendChild(t.root)}}z.Counter=fe;class Ce extends w{constructor(e,M,S={}){if(!M)throw"Data is needed to create a table!";super(w.TABLE,e,null,S),this.onResize=e=>{var t=this.root.domName?.style.width??"0px";s.style.width=`calc( 100% - ${t})`};let s=document.createElement("div"),i=(s.className="lextable",this.root.appendChild(s),this.centered=S.centered??!1,!0===this.centered&&s.classList.add("centered"),this.filter=S.filter??!1,this.toggleColumns=S.toggleColumns??!1,this.customFilters=S.customFilters??!1,this.activeCustomFilters={},this._currentFilter=S.filterValue,M.head=M.head??[],M.body=M.body??[],M.checkMap={},M.colVisibilityMap={},M.head.forEach((e,t)=>{M.colVisibilityMap[t]=!0}),(e,t,s,i)=>s[e]<i[e]?-t:s[e]>i[e]?t:0),r=(e,t)=>{M.body=M.body.sort(i.bind(this,e,t)),this.refresh()};if(this.filter||this.customFilters||this.toggleColumns){var t=z.makeContainer(["100%","auto"],"flex flex-row");if(this.filter&&((e=z.deepCopy(S)).placeholder=`Filter ${this.filter}...`,e.skipWidget=!0,e.trigger="input",e.inputClass="outline",e=new k(null,this._currentFilter??"",e=>{this._currentFilter=e,this.refresh()},e),t.appendChild(e.root)),this.customFilters){let l=z.makeIcon("CirclePlus",{svgClass:"sm"}),n='<div class="lexcontainer border-right self-center mx-1" style="width: 1px; height: 70%;"></div>';for(let a of this.customFilters)a.widget=new _(null,l.innerHTML+a.name,e=>{let i=a.widget.root.querySelector("span");if(a.options){var t=a.options.map((e,t)=>({name:e,checked:!!this.activeCustomFilters[e],callback:(e,t,s)=>{t?this.activeCustomFilters[e]=a.name:delete this.activeCustomFilters[e];t=Object.keys(this.activeCustomFilters).filter(e=>this.activeCustomFilters[e]==a.name),e=t.reduce((e,t)=>e+z.badge(t,"bg-tertiary text-sm"),"");i.innerHTML=l.innerHTML+a.name+(t.length?n:"")+e,this.refresh()}}));new A(a.widget.root,t,{side:"bottom",align:"start"})}else if("range"==a.type){console.assert(null!=a.min&&null!=a.max,"Range filter needs min and max values!");t=z.makeContainer(["240px","auto"],"border bg-primary rounded-lg text-md");let e=new P;z.makeContainer(["100%","auto"],"px-3 p-2 pb-0 text-md font-medium",a.name,t),a.start=a.start??a.min,a.end=a.end??a.max,e.refresh=()=>{e.clear(),e.sameLine(2,"justify-center"),e.addNumber(null,a.start,e=>{a.start=e;e=a.start!=a.min||a.end!=a.max;i.innerHTML=l.innerHTML+a.name+(e?n+z.badge(`${a.start} - ${a.end} `+(a.units??""),"bg-tertiary text-sm"):""),this.refresh()},{skipSlider:!0,min:a.min,max:a.max,step:a.step,units:a.units}),e.addNumber(null,a.end,e=>{a.end=e;e=a.start!=a.min||a.end!=a.max;i.innerHTML=l.innerHTML+a.name+(e?n+z.badge(`${a.start} - ${a.end} `+(a.units??""),"bg-tertiary text-sm"):""),this.refresh()},{skipSlider:!0,min:a.min,max:a.max,step:a.step,units:a.units}),e.addButton(null,"Reset",()=>{a.start=a.min,a.end=a.max,i.innerHTML=l.innerHTML+a.name,e.refresh(),this.refresh()},{buttonClass:"contrast"})},e.refresh(),t.appendChild(e.root),new m(a.widget.root,[t],{side:"bottom"})}},{buttonClass:"px-2 primary dashed"}),t.appendChild(a.widget.root);this._resetCustomFiltersBtn=new _(null,"resetButton",e=>{this.activeCustomFilters={},this._resetCustomFiltersBtn.root.classList.add("hidden");for(var t of this.customFilters)t.widget.root.querySelector("span").innerHTML=l.innerHTML+t.name,"range"==t.type&&(t.start=t.min,t.end=t.max);this.refresh()},{title:"Reset filters",icon:"X"}),t.appendChild(this._resetCustomFiltersBtn.root),this._resetCustomFiltersBtn.root.classList.add("hidden")}this.toggleColumns&&(e=z.makeIcon("Settings2"),e=new _("toggleColumnsBtn",e.innerHTML+"View",(e,t)=>{var s=M.head.map((e,t)=>{e={name:e,icon:"Check",callback:()=>{M.colVisibilityMap[t]=!M.colVisibilityMap[t],T.querySelectorAll(`tr > *:nth-child(${t+this.rowOffsetCount+1})`).forEach(e=>{e.style.display="none"===e.style.display?"":"none"})}};return M.colVisibilityMap[t]||delete e.icon,e});new A(t.target,s,{side:"bottom",align:"end"})},{hideName:!0}),t.appendChild(e.root),e.root.style.marginLeft="auto"),s.appendChild(t)}let T=document.createElement("table");s.appendChild(T),this.refresh=()=>{this._currentFilter=this._currentFilter??"",T.innerHTML="",this.rowOffsetCount=0;var e,s,t,i,a=document.createElement("thead"),l=(a.className="lextablehead",T.appendChild(a),document.createElement("tr"));S.sortable&&((e=document.createElement("th")).style.width="0px",l.appendChild(e),this.rowOffsetCount++),S.selectable&&((e=document.createElement("th")).style.width="0px",(t=document.createElement("input")).type="checkbox",t.className="lexcheckbox accent",t.checked=M.checkMap[":root"]??!1,e.appendChild(t),t.addEventListener("change",function(){var e;M.checkMap[":root"]=this.checked;for(e of T.querySelector("tbody").childNodes)M.checkMap[e.getAttribute("rowId")]=this.checked,e.querySelector("input[type='checkbox']").checked=this.checked}),this.rowOffsetCount++,l.appendChild(e));for(s of M.head){var n=document.createElement("th");n.innerHTML=`<span>${s}</span>`,n.querySelector("span").appendChild(z.makeIcon("MenuArrows",{svgClass:"sm"}));let e=M.head.indexOf(s),t=(this.centered&&-1<this.centered.indexOf(e)&&n.classList.add("centered"),[{name:"Asc",icon:"ArrowUpAZ",callback:r.bind(this,e,1)},{name:"Desc",icon:"ArrowDownAZ",callback:r.bind(this,e,-1)}]);this.toggleColumns&&t.push(null,{name:"Hide",icon:"EyeOff",callback:()=>{M.colVisibilityMap[e]=!1,T.querySelectorAll(`tr > *:nth-child(${e+this.rowOffsetCount+1})`).forEach(e=>{e.style.display="none"===e.style.display?"":"none"})}}),n.addEventListener("click",e=>{new A(e.target,t,{side:"bottom",align:"start"})}),l.appendChild(n)}S.rowActions&&((t=document.createElement("th")).className="sm",l.appendChild(t)),a.appendChild(l);{var c,d,h=document.createElement("tbody");h.className="lextablebody",T.appendChild(h);let l=null,n=!1,o=null,r=(document.addEventListener("mouseup",e=>{var t,s,i;l&&(document.removeEventListener("mousemove",r),(t=T.rows[l]).dY=0,t.classList.remove("dragging"),Array.from(T.rows).forEach(e=>{e.style.transform="",e.style.transition="none"}),D(t),o&&(t=l-1,s=o[1]-1,i=M.body[t],M.body[t]=M.body[s],M.body[s]=i,o[0].parentNode.insertChildAtIndex(o[0],o[1]),o=null),l=null,N(()=>{Array.from(T.rows).forEach(e=>{e.style.transition="transform 0.2s ease-in"})}))}),e=>{var t;l&&((t=T.rows[l]).dY=t.dY??0,t.dY+=e.movementY,t.style.transform=`translateY(${t.dY}px)`)});for(let a=0;a<M.body.length;++a){let s=M.body[a];if(this.filter){var u=M.head.indexOf(this.filter);if(-1<u)if(!H(s[u]).toLowerCase().includes(this._currentFilter.toLowerCase()))continue}if(Object.keys(this.activeCustomFilters).length){var p,m={};for(p in this._resetCustomFiltersBtn.root.classList.remove("hidden"),this.activeCustomFilters){var g=this.activeCustomFilters[p],v=(m[g]=m[g]??!1,M.head.indexOf(g));-1<v&&(m[g]|=s[v]===p)}if(!Object.values(m).reduce((e,t)=>t*e))continue}if(this.customFilters){var f,C={};for(f of this.customFilters){var y,L,b,E=f.name;"range"==f.type?(C[E]=C[E]??!1,-1<(y=M.head.indexOf(E))&&(y=parseFloat(s[y]),L=f.start??f.min,b=f.end??f.max,C[E]|=L<=y&&y<=b)):f.type}if(!Object.values(C).reduce((e,t)=>t*e))continue}let i=document.createElement("tr"),t=z.getSupportedDOMName(s.join("-"));i.setAttribute("rowId",t.substr(0,32)),S.sortable&&((u=document.createElement("td")).style.width="0px",c=z.makeIcon("GripVertical"),u.appendChild(c),c.draggable=!0,c.addEventListener("dragstart",e=>{e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),l=i.rowIndex,i.classList.add("dragging"),document.addEventListener("mousemove",r)},!1),i.addEventListener("mouseenter",function(e){var t;e.preventDefault(),l&&this.rowIndex!=l&&n!=this.rowIndex&&(n=this.rowIndex,e=T.rows[l],t=""!=this.style.transform,this.rowIndex>l?(o=[e,t?this.rowIndex-1:this.rowIndex],this.style.transform=t?"":`translateY(-${this.offsetHeight}px)`):(o=[e,t?this.rowIndex:this.rowIndex-1],this.style.transform=t?"":`translateY(${this.offsetHeight}px)`),N(()=>{n=!1}))}),i.appendChild(u)),S.selectable&&(c=document.createElement("td"),(k=document.createElement("input")).type="checkbox",k.className="lexcheckbox accent",k.checked=M.checkMap[t],c.appendChild(k),k.addEventListener("change",function(){M.checkMap[t]=this.checked;var e=T.querySelector("thead input[type='checkbox']");this.checked?Array.from(T.querySelectorAll("tbody input[type='checkbox']")).filter(e=>!e.checked).length||(e.checked=M.checkMap[":root"]=!0):e.checked=M.checkMap[":root"]=!1}),i.appendChild(c));for(d of s){var x=document.createElement("td"),w=(x.innerHTML=""+d,s.indexOf(d));this.centered&&-1<this.centered.indexOf(w)&&x.classList.add("centered"),i.appendChild(x)}if(S.rowActions){var k=document.createElement("td"),_=(k.style.width="0px",document.createElement("div"));_.className="lextablebuttons",k.appendChild(_);for(let t of S.rowActions){let e=null;"delete"==t?(e=z.makeIcon("Trash3",{title:"Delete Row"})).addEventListener("click",function(){M.body.splice(a,1),i.remove()}):"menu"==t?(e=z.makeIcon("Ellipsis",{title:"Menu"})).addEventListener("click",function(e){var t;S.onMenuAction&&(t=S.onMenuAction(a,M),console.assert(t.length,"Add items to the Menu Action Dropdown!"),new A(e.target,t,{side:"bottom",align:"end"}))}):(console.assert(t.constructor==Object),e=z.makeIcon(t.icon,{title:t.title}),t.callback&&e.addEventListener("click",e=>{t.callback(s,T,e)&&this.refresh()})),console.assert(e),_.appendChild(e)}i.appendChild(k)}h.appendChild(i)}}for(i in M.colVisibilityMap){var o=parseInt(i);M.colVisibilityMap[o]||T.querySelectorAll(`tr > *:nth-child(${o+this.rowOffsetCount+1})`).forEach(e=>{e.style.display="none"===e.style.display?"":"none"})}},this.refresh(),N(this.onResize.bind(this))}}z.Table=Ce;class ye extends w{constructor(i,a,l,e={}){var t;super(w.DATE,i,null,e),e.today&&(t=new Date,a=`${t.getDate()}/${t.getMonth()+1}/`+t.getFullYear()),this.onGetValue=()=>a,this.onSetValue=(e,t,s)=>{a=e,this.calendar.fromDateString(e),o(this.calendar.getFullDate()),t||this._trigger(new b(i,e,s),l)},this.onResize=e=>{var t=this.root.domName?.style.width??"0px";n.style.width=`calc( 100% - ${t})`};let n=document.createElement("div"),o=(n.className="lexdate",this.root.appendChild(n),this.calendar=new $(a,{onChange:e=>{this.set(e.day+`/${e.month}/`+e.year)},...e}),e=>{n.innerHTML="";var t=z.makeIcon("Calendar");let s=new _(null,e??"Pick a date",()=>{this._popover=new m(s.root,[this.calendar])},{buttonClass:`flex flex-row px-3 ${e?"":"fg-tertiary"} justify-between`});s.root.querySelector("button").appendChild(t),n.appendChild(s.root)});o(a?this.calendar.getFullDate():null),N(this.onResize.bind(this))}}z.DatePicker=ye;class P{constructor(e={}){var t=document.createElement("div");t.className="lexpanel",e.id&&(t.id=e.id),e.className&&(t.className+=" "+e.className),t.style.width=e.width||"100%",t.style.height=e.height||"100%",Object.assign(t.style,e.style??{}),this.root=t,this.branches=[],this.widgets={},this._branchOpen=!1,this._currentBranch=null,this._queue=[],this._inlineWidgetsLeft=-1,this._inline_queued_container=null}get(e){return this.widgets[e]}getValue(e){var t=this.widgets[e];if(t)return t.value();throw"No widget called "+e}setValue(e,t,s){var i=this.widgets[e];if(i)return i.set(t,s);throw"No widget called "+e}attach(e){console.assert(e,"No content to attach!"),(e.parent=this).root.appendChild(e.root||e)}clear(){for(var t in this._branchOpen=!1,this.branches=[],this._currentBranch=null,this.widgets)if(this.widgets[t].options&&this.widgets[t].options.signal){var s=this.widgets[t].options.signal;for(let e=0;e<z.signals[s].length;e++)z.signals[s][e]==this.widgets[t]&&(z.signals[s]=[...z.signals[s].slice(0,e),...z.signals[s].slice(e+1)])}if(this.signals)for(let e=0;e<this.signals.length;e++){var i=Object.values(this.signals[e])[0],a=i.options.signal;for(let e=0;e<z.signals[a].length;e++)z.signals[a][e]==i&&(z.signals[a]=[...z.signals[a].slice(0,e),...z.signals[a].slice(e+1)])}this.widgets={},this.root.innerHTML=""}sameLine(e,t){this._inline_queued_container=this.queuedContainer,this._inlineWidgetsLeft=e??1/0,this._inlineExtraClass=t??null}endLine(e){if(e=e??this._inlineExtraClass,-1==this._inlineWidgetsLeft)console.warn("No pending widgets to be inlined!");else{this._inlineWidgetsLeft=-1,this._inlineContainer||(this._inlineContainer=document.createElement("div"),this._inlineContainer.className="lexinlinewidgets",e&&(this._inlineContainer.className+=" "+e));for(var t of this._inlineWidgets)t.constructor==Array?(this._inline_queued_container?this._inlineContainer:t[1]).appendChild(t[0]):this._inlineContainer.appendChild(t);(this._inline_queued_container||(this._currentBranch?this._currentBranch.content:this.root)).appendChild(this._inlineContainer),delete this._inlineWidgets,delete this._inlineContainer,delete this._inlineExtraClass}}branch(e,t={}){this._branchOpen&&this.merge();e=new Le(e,t);return(e.panel=this)._branchOpen=!0,this._currentBranch=e,0==this.branches.length&&e.root.classList.add("first"),this.root.querySelectorAll(".lexbranch.last").forEach(e=>{e.classList.remove("last")}),e.root.classList.add("last"),this.branches.push(e),this.root.appendChild(e.root),t.filter&&this._addFilter(t.filter,{callback:this._searchWidgets.bind(this,e.name)}),e}merge(){this._branchOpen=!1,this._currentBranch=null}_pick(e,t){return void 0===e?t:e}_attachWidget(t,s={}){null!=t.name&&(this.widgets[t.name]=t),t.options.signal&&!t.name&&(this.signals||(this.signals=[]),this.signals.push({[t.options.signal]:t}));var e=e=>{(s.container||this.queuedContainer||(this._currentBranch?(s.skipWidget||this._currentBranch.widgets.push(t),this._currentBranch.content):(e.className+=" nobranch w-full",this.root))).appendChild(e)},i=e=>{this.queuedContainer?this._inlineWidgets.push([e,this.queuedContainer]):this._inlineWidgets.push(e)};return 0<this._inlineWidgetsLeft&&!s.skipInlineCount?(this._inlineWidgets||(this._inlineWidgets=[]),i(t.root),this._inlineWidgetsLeft--,this._inlineWidgetsLeft||this.endLine()):e(t.root),t}_addFilter(e,t={}){t.placeholder=e.constructor==String?e:"Filter properties..",t.skipWidget=t.skipWidget??!0,t.skipInlineCount=!0;e=new k(null,null,null,t).root;e.className+=" lexfilter";let s=document.createElement("input");s.className="lexinput-filter",s.setAttribute("placeholder",t.placeholder),s.style.width="100%",s.value=t.filterValue||"";var i=z.makeIcon("Search");return e.appendChild(i),e.appendChild(s),s.addEventListener("input",e=>{t.callback&&t.callback(s.value,e)}),e}_searchWidgets(e,t){for(var s of this.branches)if(s.name===e){for(var i of s.widgets)i.domEl.classList.contains("lexfilter")||i.domEl.remove();this.queue(s.content);var a,l=!t.length;for(a of s.widgets){if(!l){if(!a.name)continue;t.toLowerCase();if(!a.name.toLowerCase().includes(t))continue}this.queuedContainer.appendChild(a.domEl)}return void this.clearQueue()}}getBranch(t){return t?this.branches.find(e=>e.name==t):this._currentBranch}queue(e){!e&&this._currentBranch&&(e=this._currentBranch.root),this.queuedContainer&&this._queue.push(this.queuedContainer),this.queuedContainer=e}clearQueue(){this._queue&&this._queue.length?this.queuedContainer=this._queue.pop():delete this.queuedContainer}addSeparator(){var e=document.createElement("div"),t=(e.className="lexseparator",new w(w.SEPARATOR));t.root=e,this._currentBranch?(this._currentBranch.content.appendChild(e),this._currentBranch.widgets.push(t)):this.root.appendChild(e)}addBlank(e,t){e=new G(e,t);return this._attachWidget(e)}addTitle(e,t={}){e=new j(e,t);return this._attachWidget(e)}addText(e,t,s,i={}){e=new k(e,t,s,i);return this._attachWidget(e)}addTextArea(e,t,s,i={}){e=new X(e,t,s,i);return this._attachWidget(e)}addLabel(e,t={}){t.disabled=!0,t.inputClass=(t.inputClass??"")+" nobg";e=this.addText(null,e,null,t);return e.type=w.LABEL,e}addButton(e,t,s,i={}){e=new _(e,t,s,i);return this._attachWidget(e)}addComboButtons(e,t,s={}){e=new Y(e,t,s);return this._attachWidget(e)}addCard(e,t={}){e=new Z(e,t);return this._attachWidget(e)}addForm(e,t,s,i={}){e=new K(e,t,s,i);return this._attachWidget(e)}addContent(e,t,s={}){console.assert(t,"Empty content!"),t.constructor==String&&((i=document.createElement("div")).innerHTML=t,t=1<i.childElementCount?i:i.firstElementChild),s.hideName=!0;var i=new w(w.CONTENT,e,null,s);return i.root.appendChild(t),this._attachWidget(i)}async addImage(e,t,s={}){console.assert(t,"Empty src/url for Image!");var i=document.createElement("div"),a=(i.className="leximage",i.style.width="100%",document.createElement("img")),t=(a.src=t,Object.assign(a.style,s.style??{}),i.appendChild(a),new w(w.IMAGE,e,null,s));return t.root.appendChild(i),a.decode(),this._attachWidget(t)}addSelect(e,t,s,i,a={}){e=new M(e,t,s,i,a);return this._attachWidget(e)}addCurve(e,t,s,i={}){e=new n(e,t,s,i);return this._attachWidget(e)}addDial(e,t,s,i={}){e=new J(e,t,s,i);return this._attachWidget(e)}addLayers(e,t,s,i={}){e=new Q(e,t,s,i);return this._attachWidget(e)}addArray(e,t=[],s,i={}){e=new ee(e,t,s,i);return this._attachWidget(e)}addList(e,t,s,i,a={}){e=new te(e,t,s,i,a);return this._attachWidget(e)}addTags(e,t,s,i={}){e=new se(e,t,s,i);return this._attachWidget(e)}addCheckbox(e,t,s,i={}){e=new ie(e,t,s,i);return this._attachWidget(e)}addToggle(e,t,s,i={}){e=new ae(e,t,s,i);return this._attachWidget(e)}addRadioGroup(e,t,s,i,a={}){e=new le(e,t,s,i,a);return this._attachWidget(e)}addColor(e,t,s,i={}){e=new ne(e,t,s,i);return this._attachWidget(e)}addRange(e,t,s,i={}){e=new oe(e,t,s,i);return this._attachWidget(e)}addNumber(e,t,s,i={}){e=new re(e,t,s,i);return this._attachWidget(e)}static VECTOR_COMPONENTS={0:"x",1:"y",2:"z",3:"w"};_addVector(e,t,s,i,a={}){e=new ce(e,t,s,i,a);return this._attachWidget(e)}addVector2(e,t,s,i){return this._addVector(2,e,t,s,i)}addVector3(e,t,s,i){return this._addVector(3,e,t,s,i)}addVector4(e,t,s,i){return this._addVector(4,e,t,s,i)}addSize(e,t,s,i={}){e=new de(e,t,s,i);return this._attachWidget(e)}addOTP(e,t,s,i={}){e=new he(e,t,s,i);return this._attachWidget(e)}addPad(e,t,s,i={}){e=new ue(e,t,s,i);return this._attachWidget(e)}addProgress(e,t,s={}){e=new pe(e,t,s);return this._attachWidget(e)}addFile(e,t,s={}){e=new me(e,t,s);return this._attachWidget(e)}addTree(e,t,s={}){e=new ge(e,t,s);return this._attachWidget(e)}addTabSections(e,t,s={}){e=new ve(e,t,s);return this._attachWidget(e)}addCounter(e,t,s,i={}){e=new fe(e,t,s,i);return this._attachWidget(e)}addTable(e,t,s={}){e=new Ce(e,t,s);return this._attachWidget(e)}addDate(e,t,s,i={}){e=new ye(e,t,s,i);return this._attachWidget(e)}}z.Panel=P;class Le{constructor(e,t={}){this.name=e;var s=document.createElement("div"),i=(s.className="lexbranch",t.id&&(s.id=t.id),t.className&&(s.className+=" "+t.className),s.style.margin="0 auto",this),a=(this.root=s,this.widgets=[],document.createElement("div")),l=(a.className="lexbranchtitle",t.icon&&(l=z.makeIcon(t.icon,{iconClass:"mr-2"}),a.appendChild(l)),a.innerHTML+=e||"Branch",z.makeIcon("Right",{iconClass:"switch-branch-button",svgClass:"sm"})),l=(a.appendChild(l),s.appendChild(a),document.createElement("div"));l.id=e.replace(/\s/g,""),l.className="lexbranchcontent",s.appendChild(l),this.content=l,this._addBranchSeparator(),t.closed&&(a.classList.add("closed"),s.classList.add("closed"),this.grabber.setAttribute("hidden",!0),N(()=>{this.content.setAttribute("hidden",!0)},10)),this.onclick=function(e){this.classList.toggle("closed"),this.parentElement.classList.toggle("closed"),i.content.toggleAttribute("hidden"),i.grabber.toggleAttribute("hidden"),z.emit("@on_branch_closed",this.classList.contains("closed"))},this.oncontextmenu=function(t){t.preventDefault(),t.stopPropagation(),this.parentElement.classList.contains("dialog")||T("Dock",t,e=>{t.preventDefault(),e.add("Floating",i._onMakeFloating.bind(i))},{icon:"WindowRestore"})},a.addEventListener("click",this.onclick),a.addEventListener("contextmenu",this.oncontextmenu)}_onMakeFloating(){new S(this.name,e=>{for(var t of this.widgets)e.root.appendChild(t.root)}).widgets=this.widgets;var e=this.root.parentElement,t=(this.root.remove(),e.querySelector(".lexbranch")),t=(t&&t.classList.add("first"),e.querySelectorAll(".lexbranch"));t.length&&t[t.length-1].classList.add("last")}_addBranchSeparator(){var e=document.createElement("div");e.className="lexwidgetseparator",e.style.width="100%",e.style.background="none";let s=document.createElement("div"),i=(s.innerHTML="▾",e.appendChild(s),N(()=>{s.style.marginLeft=parseFloat(z.DEFAULT_NAME_WIDTH)/100*this.content.offsetWidth+"px"},10),document.createElement("div"));i.style.width="1px",i.style.marginLeft="6px",i.style.marginTop="2px",i.style.height="0px",s.appendChild(i),s.addEventListener("mousedown",function(e){var t=a.root.ownerDocument;t.addEventListener("mouseup",n),t.addEventListener("mousemove",l),e.stopPropagation(),e.preventDefault();t=a.root.offsetHeight-a.root.children[0].offsetHeight;i.style.height=t-3+"px",document.body.classList.add("nocursor")}),this.grabber=s;let a=this;function l(e){var t,e=e.movementX;0!=e&&(t=parseFloat(s.style.marginLeft),s.style.marginLeft=g(t+e,32,a.content.offsetWidth-32)+"px")}function n(e){a._updateWidgets(),i.style.height="0px";var t=a.root.ownerDocument;t.removeEventListener("mouseup",n),t.removeEventListener("mousemove",l),document.body.classList.remove("nocursor")}this.content.appendChild(e)}_updateWidgets(){var t=this.grabber.style.marginLeft;for(let e=0;e<this.widgets.length;e++){var s=this.widgets[e],i=s.root;if(!(i.children.length<2)){var a=i.children[0],i=i.children[1];switch(a.style.width=t,a.style.minWidth=t,s.type){case w.CUSTOM:case w.ARRAY:continue}i.style.width="-moz-calc( 100% - "+t+" )",i.style.width="-webkit-calc( 100% - "+t+" )",i.style.width="calc( 100% - "+t+" )"}}}}z.Branch=Le;z.Footer=class{constructor(e={}){var t=document.createElement("footer"),s=(t.className="lexfooter "+(e.className??""),document.createElement("div"));if(s.style.minHeight="48px",s.className="w-full",t.appendChild(s),e.columns&&e.columns.constructor==Array){var i,a=document.createElement("div");a.className="columns",a.style.gridTemplateColumns="1fr ".repeat(e.columns.length),s.appendChild(a);for(i of e.columns){var l=document.createElement("div"),n=(l.className="col",a.appendChild(l),document.createElement("h2"));if(n.innerHTML=i.title,l.appendChild(n),i.items&&i.items.length){var o,r=document.createElement("ul");l.appendChild(r);for(o of i.items){var c=document.createElement("li");c.innerHTML=`<a class="" href="${o.link}">${o.title}</a>`,r.appendChild(c)}}}}if(e.credits||e.socials){var d=document.createElement("div");if(d.className="credits-and-socials",s.appendChild(d),e.credits&&((s=document.createElement("p")).innerHTML=e.credits,d.appendChild(s)),e.socials){var h,u=document.createElement("div");u.className="socials flex flex-row gap-1 my-2 justify-end";for(h of e.socials){var p=z.makeIcon(h.icon,{title:h.title,svgClass:"xl"});p.href=h.link,p.target="_blank",u.appendChild(p)}d.appendChild(u)}}(e.parent??document.body).appendChild(t),t.previousElementSibling.style.flexGrow="1",this.root=t}};class S{static _last_id=0;constructor(n,e,t={}){e||console.warn("Content is empty, add some widgets using 'callback' parameter!"),this._oncreate=e,this.id=L();let s=t.size??[],i=t.position??[],a=t.draggable??!0,l=t.modal??!1,o=document.createElement("dialog"),r=(o.className="lexdialog "+(t.className??""),o.id=t.id??"dialog"+S._last_id++,z.root.appendChild(o),N(()=>{l?o.showModal():o.show()},10),this);var c=document.createElement("div"),d=(n&&(c.className="lexdialogtitle",c.innerHTML=n,c.setAttribute("draggable",!1),c.oncontextmenu=function(l){l.preventDefault(),l.stopPropagation(),z.main_area&&"horizontal"===z.main_area.type&&T("Dock",l,e=>{l.preventDefault();function i(e){let t=e.panels[0];if(t)return t;for(var s of e.sections)if(t=i(s))return t}function t(e){let t=e.branches.find(e=>e.name===n);t?e.root.appendChild(t.root):(e.branch(n),t=e.branches.find(e=>e.name===n));for(var s of r.widgets)t.content.appendChild(s.root);t.widgets=r.widgets,e.root.querySelectorAll(".lexbranch.last").forEach(e=>{e.classList.remove("last")}),t.root.classList.add("last"),o.remove()}let s=i(z.main_area.sections[1]),a=(e.add('<i class="This goes to the right">',{icon:"PanelRightDashed",disabled:!s,id:"dock_options0",callback:()=>{t(s)}}),i(z.main_area.sections[0]));e.add('<i class="This goes to the left">',{icon:"PanelLeftDashed",disabled:!a,id:"dock_options1",callback:()=>{t(a)}})},{icon:"WindowRestore"})},o.appendChild(c)),(t.closable??!0)&&(this.close=()=>{t.onBeforeClose&&t.onBeforeClose(this),t.onclose?t.onclose(this.root):(o.close(),N(()=>{r.panel.clear(),o.remove()},150))},(d=z.makeIcon("X",{title:"Close",iconClass:"lexdialogcloser"})).addEventListener("click",this.close),(n?c:(d.classList.add("notitle"),o)).appendChild(d)),new P);d.root.classList.add("lexdialogcontent"),n||d.root.classList.add("notitle"),e&&e.call(this,d),o.appendChild(d.root),d.root.querySelectorAll(".lexbranch").forEach(e=>e.classList.add("dialog")),this.panel=d,this.root=o,this.title=c,a&&h(o,Object.assign({targetClass:"lexdialogtitle"},t)),s.length&&"string"!=typeof s[0]&&(s[0]+="px"),s.length&&"string"!=typeof s[1]&&(s[1]+="px"),o.style.width=s[0]||"25%",o.style.height=s[1]||"auto",o.style.translate=t.position?"unset":"-50% -50%",t.size&&(this.size=s),o.style.left=i[0]??"50%",o.style.top=i[1]??"50%",d.root.style.height=n?"calc( 100% - "+(c.offsetHeight+30)+"px )":"calc( 100% - 51px )"}destroy(){this.root.remove()}refresh(){this.panel.root.innerHTML="",this._oncreate.call(this,this.panel)}setPosition(e,t){this.root.style.left=e+"px",this.root.style.top=t+"px"}setTitle(e){var t=this.root.querySelector(".lexdialogtitle");t&&(t.innerText=e)}}z.Dialog=S;class r extends S{static TOP=0;static BOTTOM=1;constructor(e,t,s={}){s.draggable=s.draggable??!1,s.closable=s.closable??!1;super(e,t,s);let i=this;if(z.addSignal("@on_branch_closed",this.panel,e=>{this.dock_pos==r.BOTTOM&&(this.root.style.top="calc(100% - "+(this.root.offsetHeight+3)+"px)")}),this.root.classList.add("pocket"),this.root.style.translate="none",this.root.style.top="0",this.root.style.left="unset",s.position||(this.root.style.right="3px",this.root.style.top="3px"),this.panel.root.style.width="100%",this.panel.root.style.height="100%",this.dock_pos=r.TOP,this.minimized=!1,this.title.tabIndex=-1,this.title.addEventListener("click",e=>{this.title.eventCatched?this.title.eventCatched=!1:(this.size&&(this.minimized?this.root.style.height=this.size[1]:this.root.style.height="auto"),this.root.classList.toggle("minimized"),this.minimized=!this.minimized,this.dock_pos==r.BOTTOM&&(i.root.style.top=this.root.classList.contains("minimized")?"calc(100% - "+(i.title.offsetHeight+6)+"px)":"calc(100% - "+(i.root.offsetHeight+3)+"px)"))}),!s.draggable){var a=s.float;if(a)for(let e=0;e<a.length;e++)switch(a[e]){case"b":this.root.style.top="calc(100% - "+(this.root.offsetHeight+3)+"px)";break;case"l":this.root.style.right="unset",this.root.style.left=s.position?s.position[1]:"3px"}this.root.classList.add("dockable"),this.title.addEventListener("keydown",function(e){e.ctrlKey&&(i.root.style.right="unset","ArrowLeft"==e.key?i.root.style.left="0px":"ArrowRight"==e.key?i.root.style.left="calc(100% - "+(i.root.offsetWidth+3)+"px)":"ArrowUp"==e.key?(i.root.style.top="0px",i.dock_pos=r.TOP):"ArrowDown"==e.key&&(i.root.style.top="calc(100% - "+(i.root.offsetHeight+3)+"px)",i.dock_pos=r.BOTTOM))})}}}z.PocketDialog=r;class be{constructor(e,t,s={}){document.body.querySelectorAll(".lexcontextmenu").forEach(e=>e.remove()),this.root=document.createElement("div"),this.root.className="lexcontextmenu",this.root.style.left=e.x-48+"px",this.root.style.top=e.y-8+"px",this.root.addEventListener("mouseleave",function(){this.remove()}),this.items=[],this.colors={},t&&((e={})[t]=[],e.className="cmtitle",e.icon=s.icon,this.items.push(e))}_adjustPosition(e,t,s=!1){var i=e.getBoundingClientRect();s?((s=window.innerWidth-i.right)<0&&(e.style.left=e.offsetLeft+(s-t)+"px"),(s=window.innerHeight-(i.top+i.height))<0&&(e.style.top=e.offsetTop+(s-t+20)+"px")):(s=i.width,i.left<0?e.style.left=t+"px":window.innerWidth-i.right<0&&(e.style.left=window.innerWidth-s-t+"px"),i.top<0?e.style.top=t+"px":i.top+i.height>window.innerHeight&&(e.style.top=window.innerHeight-i.height-t+"px"))}_createSubmenu(t,s,e,i){this.root.querySelectorAll(".lexcontextmenu").forEach(e=>e.remove());var a=document.createElement("div");a.className="lexcontextmenu",e.appendChild(a);for(let e=0;e<t[s].length;++e){var l=t[s][e],n=Object.keys(l)[0];this._createEntry(l,n,a,i)}e=e.getBoundingClientRect();a.style.left=e.x+e.width+"px",a.style.marginTop="-31px",this._adjustPosition(a,6)}_createEntry(t,s,e,i){let a=t[s].length,l=document.createElement("div");l.className="lexmenuboxentry"+(t.className?" "+t.className:""),l.id=t.id??"eId"+d(s),l.innerHTML="";var n=t.icon;n&&l.appendChild(z.makeIcon(n,{svgClass:"sm"}));let o=t.disabled;l.innerHTML+="<div class='lexentryname"+(o?" disabled":"")+"'>"+s+"</div>",e.appendChild(l),this.colors[s]&&(l.style.borderColor=this.colors[s]),""==s?l.className+=" cmseparator":(l.addEventListener("click",e=>{e.stopPropagation(),e.stopImmediatePropagation(),o||((e=t.callback)&&(e.call(this,s,l),this.root.remove()),a&&"click"==z.OPEN_CONTEXTMENU_ENTRY&&this._createSubmenu(t,s,l,++i))}),a&&(n=z.makeIcon("Menu",{svgClass:"sm"}),l.appendChild(n),"mouseover"==z.OPEN_CONTEXTMENU_ENTRY&&l.addEventListener("mouseover",e=>{l.built||(l.built=!0,this._createSubmenu(t,s,l,++i),e.stopPropagation())}),l.addEventListener("mouseleave",()=>{i=-1,e.querySelectorAll(".lexcontextmenu").forEach(e=>e.remove())})))}onCreate(){N(()=>this._adjustPosition(this.root,6))}add(e,l={}){l.constructor==Function&&(l={callback:l});let n=(e+="").split("/");var t,s,e=n[n.length-1];this.colors[e]=l.color;let o=0,r=(i,e)=>{if(null!=i){let s=null;var t,a;e.forEach(e=>{var t=Object.keys(e).find(e=>e==i);t&&(s=e[t])}),s?r(n[o++],s):((t={})[i]=[],(a=n[o++])||(t.id=l.id,t.icon=l.icon,t.callback=l.callback,t.disabled=l.disabled??!1),e.push(t),r(a,t[i]))}},c=(r(n[o++],this.items),e=>{let t=Object.keys(e)[0];var s,i=e[t];if(i.length){null==i.find(e=>Object.keys(e)[0]==t)&&((i={})[t]=[],i.className="cmtitle",e[t].unshift(i));for(s of e[t]){var a=Object.keys(s)[0];for(let e=0;e<s[a].length;++e)c(s)}}});for(t of this.items)c(t);for(s of this.items){var i=Object.keys(s)[0],a="eId"+d(i),a="#"+(s.id??a);this.root.querySelector(a)||this._createEntry(s,i,this.root,-1)}}setColor(e,t){"#"!==t[0]&&(t=s(t)),this.colors[e]=t}}function T(e,t,s,i){t=new be(t,e,i);return z.root.appendChild(t.root),s&&s(t),t.onCreate(),t}z.ContextMenu=be,z.addContextMenu=T;class Ee{constructor(e,s={}){let o=document.createElement("div"),r=(o.className="curve "+(s.className||""),o.style.minHeight="50px",o.style.width=s.width||"100%",o.style.minWidth="50px",o.style.minHeight="20px",o.bgcolor=s.bgColor||z.getThemeColor("global-intense-background"),o.pointscolor=s.pointsColor||z.getThemeColor("global-color-accent"),o.activepointscolor=s.activePointsColor||z.getThemeColor("global-color-accent-light"),o.linecolor=s.lineColor||"#555",o.value=e||[],o.xrange=s.xrange||[0,1],o.yrange=s.yrange||[0,1],o.defaulty=null!=s.defaulty?s.defaulty:0,o.no_overlap=s.noOverlap||!1,o.show_samples=s.showSamples||0,o.allow_add_values=s.allowAddValues??!0,o.draggable_x=s.draggableX??!0,o.draggable_y=s.draggableY??!0,o.smooth=(s.smooth&&"number"==typeof s.smooth?s.smooth:.3)||!1,o.move_out=s.moveOutAction??z.CURVE_MOVEOUT_DELETE,z.addSignal("@on_new_color_scheme",(e,t)=>{o.bgcolor=s.bgColor||z.getThemeColor("global-intense-background"),o.pointscolor=s.pointsColor||z.getThemeColor("global-color-accent"),o.activepointscolor=s.activePointsColor||z.getThemeColor("global-color-accent-light"),this.redraw()}),this.element=o,document.createElement("canvas"));function n(e){return[r.width*(e[0]-o.xrange[0])/o.xrange[1],r.height*(e[1]-o.yrange[0])/o.yrange[1]]}function c(e){return[e[0]*o.xrange[1]/r.width+o.xrange[0],e[1]*o.yrange[1]/r.height+o.yrange[0]]}r.width=s.width||200,r.height=s.height||50,o.appendChild(r),this.canvas=r,o.addEventListener("mousedown",function(e){document.addEventListener("mousemove",a),document.addEventListener("mouseup",u);var t=r.getBoundingClientRect(),s=e.clientX-t.left,t=e.clientY-t.top;{var i;d=((e,t)=>{for(var s=1e5,i=-1,a=0;a<o.value.length;a++){var l=n(o.value[a]),l=m([e,t],l);l<s&&l<8&&(s=l,i=a)}return i})(s,r.height-t),e.button==z.MOUSE_LEFT_CLICK&&-1==d&&o.allow_add_values&&(i=c([s,r.height-t]),o.value.push(i),g(),d=o.value.indexOf(i))}h=[s,t],o.redraw(),e.preventDefault(),e.stopPropagation()}),o.getValueAt=function(t){if(t<o.xrange[0]||t>o.xrange[1])return o.defaulty;let s=[o.xrange[0],o.defaulty],i=0;for(let e=0;e<o.value.length;e+=1){var a=o.value[e];if(t==a[0])return a[1];if(t<a[0])return i=(t-s[0])/(a[0]-s[0]),s[1]*(1-i)+a[1]*i;s=a}return v=[o.xrange[1],o.defaulty],i=(t-s[0])/(v[0]-s[0]),s[1]*(1-i)+v[1]*i},o.resample=function(e){var t=[],s=(o.xrange[1]-o.xrange[0])/e;for(let e=o.xrange[0];e<=o.xrange[1];e+=s)t.push(o.getValueAt(e));return t},o.addValue=function(t){for(let e=0;e<o.value;e++){var s=o.value[e];if(!(s[0]<t[0]))return o.value.splice(e,0,t),void redraw()}o.value.push(t),redraw()};let d=-1;o.redraw=function(e={}){e.value&&(o.value=e.value),e.xrange&&(o.xrange=e.xrange),e.yrange&&(o.yrange=e.yrange),e.smooth&&(o.smooth=e.smooth);var t=r.getContext("2d"),s=(t.setTransform(1,0,0,1,0,0),t.translate(0,r.height),t.scale(1,-1),t.fillStyle=o.bgcolor,t.fillRect(0,0,r.width,r.height),t.strokeStyle=o.linecolor,t.beginPath(),n([o.xrange[0],o.defaulty])),i=(t.moveTo(s[0],s[1]),[s[0],s[1]]);for(a in o.value){s=n(o.value[a]);i.push(s[0]),i.push(s[1]),o.smooth||t.lineTo(s[0],s[1])}s=n([o.xrange[1],o.defaulty]),i.push(s[0]),i.push(s[1]),o.smooth?z.UTILS.drawSpline(t,i,o.smooth):(t.lineTo(s[0],s[1]),t.stroke());for(var a=0;a<o.value.length;a+=1)s=n(o.value[a]),d==a?t.fillStyle=o.activepointscolor:t.fillStyle=o.pointscolor,t.beginPath(),t.arc(s[0],s[1],d==a?4:3,0,2*Math.PI),t.fill();if(o.show_samples){var l=o.resample(o.show_samples);t.fillStyle="#888";for(a=0;a<l.length;a+=1)s=n([a*((o.xrange[1]-o.xrange[0])/o.show_samples)+o.xrange[0],l[a]]),t.beginPath(),t.arc(s[0],s[1],2,0,2*Math.PI),t.fill()}};var h=[0,0];function a(e){var t,s,i,a=r.getBoundingClientRect(),l=e.clientX-a.left,n=e.clientY-a.top,a=(l<0?l=0:l>r.width&&(l=r.width),n<0?n=0:n>r.height&&(n=r.height),[e.clientX-a.left,e.clientY-a.top]);-1!=d&&m(a,[l,n])>.5*r.height?(o.move_out==z.CURVE_MOVEOUT_DELETE?o.value.splice(d,1):(a=[a[0]-l,a[1]-n],(t=o.value[d])[0]=0==a[0]?t[0]:a[0]<0?o.xrange[0]:o.xrange[1],t[1]=0==a[1]?t[1]:a[1]<0?o.yrange[1]:o.yrange[0]),u(e)):(t=c([-(o.draggable_x?h[0]-l:0),o.draggable_y?h[1]-n:0]),-1!=d&&(a=o.xrange[0],s=o.xrange[1],o.no_overlap&&(0<d&&(a=o.value[d-1][0]),d<o.value.length-1)&&(s=o.value[d+1][0]),(i=o.value[d])[0]+=t[0],i[1]+=t[1],i[0]<a?i[0]=a:i[0]>s&&(i[0]=s),i[1]<o.yrange[0]?i[1]=o.yrange[0]:i[1]>o.yrange[1]&&(i[1]=o.yrange[1])),g(),o.redraw(),h[0]=l,h[1]=n,p(e),e.preventDefault(),e.stopPropagation())}function u(e){d=-1,o.redraw(),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",u),p(e),e.preventDefault(),e.stopPropagation()}function p(e){s.callback&&s.callback.call(o,o.value,e)}function m(e,t){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function g(){var e=null;-1!=d&&(e=o.value[d]),o.value.sort(function(e,t){return e[0]-t[0]}),e&&(d=o.value.indexOf(e))}return o.redraw(),this}redraw(e={}){this.element.redraw(e)}}z.CanvasCurve=Ee;class xe{constructor(e,t,s={}){let o=document.createElement("div"),r=(o.className="dial "+(s.className||""),o.style.width=o.style.height=s.size||"100%",o.style.minWidth=o.style.minHeight="50px",o.bgcolor=s.bgColor||z.getThemeColor("global-dark-background"),o.pointscolor=s.pointsColor||z.getThemeColor("global-color-accent-light"),o.linecolor=s.lineColor||"#555",o.value=t||[],o.xrange=s.xrange||[0,1],o.yrange=s.yrange||[0,1],o.defaulty=null!=s.defaulty?s.defaulty:0,o.no_overlap=s.noOverlap||!1,o.show_samples=s.showSamples||0,o.allow_add_values=s.allowAddValues??!0,o.draggable_x=s.draggableX??!0,o.draggable_y=s.draggableY??!0,o.smooth=(s.smooth&&"number"==typeof s.smooth?s.smooth:.3)||!1,o.move_out=s.moveOutAction??z.CURVE_MOVEOUT_DELETE,this.element=o,document.createElement("canvas"));function n(e){return Math.pow(e[0],2),[r.width*(e[0]-o.xrange[0])/o.xrange[1],r.height*(e[1]-o.yrange[0])/o.yrange[1]]}function c(e){return[e[0]*o.xrange[1]/r.width+o.xrange[0],e[1]*o.yrange[1]/r.height+o.yrange[0]]}r.width=r.height=s.size||200,o.appendChild(r),this.canvas=r,o.addEventListener("mousedown",function(e){document.addEventListener("mousemove",a),document.addEventListener("mouseup",u);var t=r.getBoundingClientRect(),s=e.clientX-t.left,t=e.clientY-t.top;{var i;d=((e,t)=>{for(var s=1e5,i=-1,a=0;a<o.value.length;a++){var l=n(o.value[a]),l=m([e,t],l);l<s&&l<8&&(s=l,i=a)}return i})(s,r.height-t),e.button==z.MOUSE_LEFT_CLICK&&-1==d&&o.allow_add_values&&(i=c([s,r.height-t]),o.value.push(i),g(),d=o.value.indexOf(i))}h=[s,t],o.redraw(),e.preventDefault(),e.stopPropagation()}),o.getValueAt=function(e){if(e<o.xrange[0]||e>o.xrange[1])return o.defaulty;for(var t=[o.xrange[0],o.defaulty],s=0,i=0;i<o.value.length;i+=1){var a=o.value[i];if(e==a[0])return a[1];if(e<a[0])return s=(e-t[0])/(a[0]-t[0]),t[1]*(1-s)+a[1]*s;t=a}return a=[o.xrange[1],o.defaulty],s=(e-t[0])/(a[0]-t[0]),t[1]*(1-s)+a[1]*s},o.resample=function(e){for(var t=[],s=(o.xrange[1]-o.xrange[0])/e,i=o.xrange[0];i<=o.xrange[1];i+=s)t.push(o.getValueAt(i));return t},o.addValue=function(e){for(var t=0;t<o.value;t++){var s=o.value[t];if(!(s[0]<e[0]))return o.value.splice(t,0,e),void redraw()}o.value.push(e),redraw()};var d=-1,h=(o.redraw=function(e={}){e.value&&(o.value=e.value),e.xrange&&(o.xrange=e.xrange),e.yrange&&(o.yrange=e.yrange),e.smooth&&(o.smooth=e.smooth);var t=r.getContext("2d"),s=(t.setTransform(1,0,0,1,0,0),t.translate(0,r.height),t.scale(1,-1),t.fillStyle=o.bgcolor,t.fillRect(0,0,r.width,r.height),t.strokeStyle=o.linecolor,t.beginPath(),n([o.xrange[0],o.defaulty])),i=(t.moveTo(s[0],s[1]),[s[0],s[1]]);for(a in o.value){s=n(o.value[a]);i.push(s[0]),i.push(s[1])}s=n([o.xrange[1],o.defaulty]),i.push(s[0]),i.push(s[1]);s=n([0,0]),t.fillStyle="gray",t.beginPath(),t.arc(s[0],s[1],3,0,2*Math.PI),t.fill();for(var a=0;a<o.value.length;a+=1)s=n(o.value[a]),t.fillStyle=d==a?"white":o.pointscolor,t.beginPath(),t.arc(s[0],s[1],d==a?4:3,0,2*Math.PI),t.fill();if(o.show_samples){var l=o.resample(o.show_samples);t.fillStyle="#888";for(a=0;a<l.length;a+=1)s=n([a*((o.xrange[1]-o.xrange[0])/o.show_samples)+o.xrange[0],l[a]]),t.beginPath(),t.arc(s[0],s[1],2,0,2*Math.PI),t.fill()}},[0,0]);function a(e){var t,s,i,a=r.getBoundingClientRect(),l=e.clientX-a.left,n=e.clientY-a.top,a=(l<0?l=0:l>r.width&&(l=r.width),n<0?n=0:n>r.height&&(n=r.height),[e.clientX-a.left,e.clientY-a.top]);-1!=d&&m(a,[l,n])>.5*r.height?(o.move_out==z.CURVE_MOVEOUT_DELETE?o.value.splice(d,1):(a=[a[0]-l,a[1]-n],(t=o.value[d])[0]=0==a[0]?t[0]:a[0]<0?o.xrange[0]:o.xrange[1],t[1]=0==a[1]?t[1]:a[1]<0?o.yrange[1]:o.yrange[0]),u(e)):(t=c([-(o.draggable_x?h[0]-l:0),o.draggable_y?h[1]-n:0]),-1!=d&&(a=o.xrange[0],s=o.xrange[1],o.no_overlap&&(0<d&&(a=o.value[d-1][0]),d<o.value.length-1)&&(s=o.value[d+1][0]),(i=o.value[d])[0]+=t[0],i[1]+=t[1],i[0]<a?i[0]=a:i[0]>s&&(i[0]=s),i[1]<o.yrange[0]?i[1]=o.yrange[0]:i[1]>o.yrange[1]&&(i[1]=o.yrange[1])),g(),o.redraw(),h[0]=l,h[1]=n,p(e),e.preventDefault(),e.stopPropagation())}function u(e){d=-1,o.redraw(),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",u),p(e),e.preventDefault(),e.stopPropagation()}function p(e){s.callback&&s.callback.call(o,o.value,e)}function m(e,t){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function g(){var e=null;-1!=d&&(e=o.value[d]),o.value.sort(function(e,t){return e[0]-t[0]}),e&&(d=o.value.indexOf(e))}return o.redraw(),this}redraw(e={}){this.element.redraw(e)}}z.Dial=J;class I{static NONE=0;static ASSET_SELECTED=1;static ASSET_DELETED=2;static ASSET_RENAMED=3;static ASSET_CLONED=4;static ASSET_DBLCLICKED=5;static ENTER_FOLDER=6;static ASSET_CHECKED=7;constructor(e,t,s){this.type=e||E.NONE,this.item=t,this.value=s,this.multiple=!1}string(){switch(this.type){case I.NONE:return"assetview_event_none";case I.ASSET_SELECTED:return"assetview_event_selected";case I.ASSET_DELETED:return"assetview_event_deleted";case I.ASSET_RENAMED:return"assetview_event_renamed";case I.ASSET_CLONED:return"assetview_event_cloned";case I.ASSET_DBLCLICKED:return"assetview_event_dblclicked";case I.ENTER_FOLDER:return"assetview_event_enter_folder";case I.ASSET_CHECKED:return"assetview_event_checked"}}}z.AssetViewEvent=I;class R{static LAYOUT_CONTENT=0;static LAYOUT_LIST=1;static MAX_PAGE_ELEMENTS=50;constructor(e={}){this.rootPath="https://raw.githubusercontent.com/jxarco/lexgui.js/master/",this.layout=e.layout??R.LAYOUT_CONTENT,this.contentPage=1,e.rootPath&&(e.rootPath.constructor!==String?console.warn("Asset Root Path must be a String (now is "+path.constructor.name+")"):this.rootPath=e.rootPath);var t=document.createElement("div"),s=(t.className="lexassetbrowser",this.root=t,new z.Area({width:"100%",height:"100%"}));t.appendChild(s.root);let i,a,l=s;this.skipBrowser=e.skipBrowser??!1,this.skipPreview=e.skipPreview??!1,this.useNativeTitle=e.useNativeTitle??!1,this.onlyFolders=e.onlyFolders??!0,this.allowMultipleSelection=e.allowMultipleSelection??!1,this.previewActions=e.previewActions??[],this.contextMenu=e.contextMenu??[],this.onRefreshContent=e.onRefreshContent,document.body.appendChild(this.root),this.skipBrowser||([i,a]=s.split({type:"horizontal",sizes:["15%","85%"]}),l=a,i.setLimitBox(210,0),a.setLimitBox(512,0)),this.skipPreview||([l,a]=l.split({type:"horizontal",sizes:["80%","20%"]})),this.allowedTypes=e.allowedTypes||["None","Image","Mesh","Script","JSON","Clip"],this.prevData=[],this.nextData=[],this.data=[],this._processData(this.data,null),this.currentData=this.data,this.path=["@"],this.skipBrowser||this._createTreePanel(i),this._createContentPanel(l),this.skipPreview||(this.previewPanel=a.addPanel({className:"lexassetcontentpanel",style:{overflow:"scroll"}})),document.body.removeChild(this.root)}load(e,t){this.prevData.length=0,this.nextData.length=0,this.data=e,this._processData(this.data,null),this.currentData=this.data,this.path=["@"],this.skipBrowser||this._createTreePanel(this.area),this._refreshContent(),this.onevent=t}clear(){this.previewPanel&&this.previewPanel.clear(),this.leftPanel&&this.leftPanel.clear(),this.rightPanel&&this.rightPanel.clear()}_processData(e,t){e.constructor!==Array&&(e.folder=t,e.children=e.children??[]);for(var s=e.constructor===Array?e:e.children,i=0;i<s.length;++i)this._processData(s[i],e)}_updatePath(e){this.path.length=0;let t=e=>{e&&(e=(e.children||e)[0])&&e.folder&&(this.path.push(e.folder.id??"@"),t(e.folder.folder))};t(e),z.emit("@on_folder_change",this.path.reverse().join("/"))}_createTreePanel(e){this.leftPanel?this.leftPanel.clear():this.leftPanel=e.addPanel({className:"lexassetbrowserpanel"});e={id:"/",children:this.data},e=this.leftPanel.addTree("Content Browser",e,{filter:!1,onlyFolders:this.onlyFolders,onevent:e=>{var t=e.node,s=e.value;switch(e.type){case z.TreeEvent.NODE_SELECTED:e.multiple||this._enterFolder(t),t.parent||(this.prevData.push(this.currentData),this.currentData=this.data,this._refreshContent(),this.path=["@"],z.emit("@on_folder_change",this.path.join("/")));break;case z.TreeEvent.NODE_DRAGGED:t.folder=s,this._refreshContent()}}});this.tree=e.innerTree}_setContentLayout(e){this.layout=e,this._refreshContent()}_createContentPanel(e){this.rightPanel?this.rightPanel.clear():this.rightPanel=e.addPanel({className:"lexassetcontentpanel flex flex-col overflow-hidden"});e=(e,t)=>{var s;this.allowNextPage&&(s=this.contentPage,this.contentPage+=e,this.contentPage=Math.min(this.contentPage,1+((this.currentData.length-1)/R.MAX_PAGE_ELEMENTS|0)),this.contentPage=Math.max(this.contentPage,1),s!=this.contentPage)&&this._refreshContent()},this.rightPanel.sameLine(),this.rightPanel.addSelect("Filter",this.allowedTypes,this.allowedTypes[0],e=>this._refreshContent.call(this,null,e),{width:"30%",minWidth:"128px"}),this.rightPanel.addText(null,this.searchValue??"",e=>this._refreshContent.call(this,e,null),{placeholder:"Search assets.."}),this.rightPanel.addButton(null,"",((e,t)=>{var t=T("Sort by",t,e=>{e.add("Name",()=>this._sortData("id")),e.add("Type",()=>this._sortData("type")),e.add(""),e.add("Ascending",()=>this._sortData()),e.add("Descending",()=>this._sortData(null,!0))}),s=this.parent.root.parentElement;s.classList.contains("lexdialog")&&(t.root.style.zIndex=+getComputedStyle(s).zIndex+1)}).bind(this),{title:"Sort",icon:"ArrowUpNarrowWide"}),this.rightPanel.addButton(null,"",((e,t)=>{var t=T("Layout",t,e=>{e.add("Content",()=>this._setContentLayout(R.LAYOUT_CONTENT)),e.add(""),e.add("List",()=>this._setContentLayout(R.LAYOUT_LIST))}),s=this.parent.root.parentElement;s.classList.contains("lexdialog")&&(t.root.style.zIndex=+getComputedStyle(s).zIndex+1)}).bind(this),{title:"View",icon:"GripHorizontal"}),this.rightPanel.addButton(null,"",e.bind(this,-1),{title:"Previous Page",icon:"ChevronsLeft",className:"ml-auto"}),this.rightPanel.addButton(null,"",e.bind(this,1),{title:"Next Page",icon:"ChevronsRight"}),e="Page "+this.contentPage+" / "+(1+((this.currentData.length-1)/R.MAX_PAGE_ELEMENTS|0));this.rightPanel.addText(null,e,null,{inputClass:"nobg",disabled:!0,signal:"@on_page_change",maxWidth:"16ch"}),this.rightPanel.endLine(),this.skipBrowser||(this.rightPanel.sameLine(),this.rightPanel.addComboButtons(null,[{value:"Left",icon:"ArrowLeft",callback:e=>{this.prevData.length&&(this.nextData.push(this.currentData),this.currentData=this.prevData.pop(),this._refreshContent(),this._updatePath(this.currentData))}},{value:"Right",icon:"ArrowRight",callback:e=>{this.nextData.length&&(this.prevData.push(this.currentData),this.currentData=this.nextData.pop(),this._refreshContent(),this._updatePath(this.currentData))}},{value:"Refresh",icon:"Refresh",callback:e=>{this._refreshContent()}}],{noSelection:!0}),this.rightPanel.addText(null,this.path.join("/"),null,{inputClass:"nobg",disabled:!0,signal:"@on_folder_change",style:{fontWeight:"600",fontSize:"15px"}}),this.rightPanel.endLine()),this.content=document.createElement("ul"),this.content.className="lexassetscontent",this.rightPanel.root.appendChild(this.content),this.content.addEventListener("dragenter",function(e){e.preventDefault(),this.classList.add("dragging")}),this.content.addEventListener("dragleave",function(e){e.preventDefault(),this.classList.remove("dragging")}),this.content.addEventListener("drop",e=>{e.preventDefault(),this._processDrop(e)}),this.content.addEventListener("click",function(){this.querySelectorAll(".lexassetitem").forEach(e=>e.classList.remove("selected"))}),this._refreshContent()}_refreshContent(s,i){let r=this.layout==R.LAYOUT_CONTENT,l=(this.filter=i??this.filter??"None",this.searchValue=s??this.searchValue??"",this.content.innerHTML="",this.content.className=r?"lexassetscontent":"lexassetscontent list",this);let a=new FileReader;var n=this.currentData.filter(e=>("None"==this.filter||e.type.toLowerCase()==this.filter.toLowerCase())&&e.id.toLowerCase().includes(this.searchValue.toLowerCase())),t=((i||s)&&(this.contentPage=1),(this.contentPage-1)*R.MAX_PAGE_ELEMENTS),o=Math.min(t+R.MAX_PAGE_ELEMENTS,n.length);for(let e=t;e<o;++e){let t=n[e];t.path?z.request({url:t.path,dataType:"blob",success:e=>{t.bytesize=e.size,a.readAsDataURL(e),a.onload=e=>{t.src=e.currentTarget.result,t._path=t.path,delete t.path,this._refreshContent(s,i)}}}):t.domEl=(i=>{var e=i.type.charAt(0).toUpperCase()+i.type.slice(1),t=c(i.id);let s="Folder"===e,o=document.createElement("li");if(o.className="lexassetitem "+i.type.toLowerCase(),o.tabIndex=-1,l.content.appendChild(o),l.useNativeTitle)o.title=e+": "+i.id;else{let n=document.createElement("span");n.className="lexitemdesc",n.innerHTML="File: "+i.id+"<br>Type: "+e,l.content.appendChild(n),o.addEventListener("mousemove",t=>{if(r){var s=o.getBoundingClientRect(),i=t.target.getBoundingClientRect(),a=n.parentElement.getBoundingClientRect(),l=i.x-a.x-(i.x-s.x);let e=i.y-a.y-(i.y-s.y);t.target.classList.contains("lexassettitle")&&(e+=i.y-s.y),n.style.left=l+t.offsetX+12+"px",n.style.top=e+t.offsetY+"px"}}),o.addEventListener("mouseenter",()=>{r&&(n.style.display="unset")}),o.addEventListener("mouseleave",()=>{r&&setTimeout(()=>{n.style.display="none"},100)})}l.allowMultipleSelection&&((a=document.createElement("input")).type="checkbox",a.className="lexcheckbox",a.checked=i.selected,a.addEventListener("change",(e,t)=>{var s;i.selected=!i.selected,l.onevent&&((s=new I(I.ASSET_CHECKED,e.shiftKey?[i]:i)).multiple=!!e.shiftKey,l.onevent(s)),e.stopPropagation(),e.stopImmediatePropagation()}),o.appendChild(a));var a=document.createElement("span");if(a.className="lexassettitle",a.innerText=i.id,o.appendChild(a),!l.skipPreview){let e=null;i.src&&(-1<["png","jpg"].indexOf(c(i.src))||i.src.includes("data:image/"))||s||!r?(e=document.createElement("img"),a=i.unknown_extension?l.rootPath+"images/file.png":s?l.rootPath+"images/folder.png":i.src,e.src=r||s?a:l.rootPath+"images/file.png",o.appendChild(e)):((e=document.createElement("svg")).className="asset-file-preview",o.appendChild(e),a=document.createElement("text"),e.appendChild(a),a.innerText=t&&t!=i.id?"."+t.toUpperCase():i.type.toUpperCase(),(t=2.5/a.innerText.length)<1&&(a.style.fontSize=64*t+"px",e.style.paddingTop="calc(50% - "+(.5*a.offsetHeight+10)+"px)"))}return s||((t=document.createElement("span")).className="lexassetinfo",t.innerText=e,o.appendChild(t)),o.addEventListener("click",function(e){e.stopImmediatePropagation(),e.stopPropagation();var t=e.detail==z.MOUSE_DOUBLE_CLICK;if(t){if(s)return void l._enterFolder(i)}else e.shiftKey||l.content.querySelectorAll(".lexassetitem").forEach(e=>e.classList.remove("selected")),this.classList.add("selected"),l.selectedItem=i,l.skipPreview||l._previewAsset(i);l.onevent&&((t=new I(t?I.ASSET_DBLCLICKED:I.ASSET_SELECTED,e.shiftKey?[i]:i)).multiple=!!e.shiftKey,l.onevent(t))}),l.contextMenu&&o.addEventListener("contextmenu",function(e){e.preventDefault();let t=l.content.querySelectorAll(".selected").length;z.addContextMenu(1<t?t+" selected":s?i.id:i.type,e,e=>{t<=1&&e.add("Rename"),s||e.add("Clone",l._cloneItem.bind(l,i)),t<=1&&e.add("Properties"),e.add(""),e.add("Delete",l._deleteItem.bind(l,i))})}),o.addEventListener("dragstart",function(e){e.preventDefault()},!1),o})(t)}this.allowNextPage=n.length-1>R.MAX_PAGE_ELEMENTS;t="Page "+this.contentPage+" / "+(1+((n.length-1)/R.MAX_PAGE_ELEMENTS|0));z.emit("@on_page_change",t),this.onRefreshContent&&this.onRefreshContent(s,i)}_previewAsset(e){var t,s=e.src&&e.src.includes("data:image/"),s=(this.previewPanel.clear(),this.previewPanel.branch("Asset"),("image"==e.type||e.src)&&(-1<["png","jpg"].indexOf(c(e.src))||s)&&this.previewPanel.addImage(null,e.src,{style:{width:"100%"}}),{disabled:!0}),s=(this.previewPanel.addText("Filename",e.id,null,s),e.lastModified&&this.previewPanel.addText("Last Modified",new Date(e.lastModified).toLocaleString(),null,s),(e._path||e.src)&&this.previewPanel.addText("URL",e._path||e.src,null,s),this.previewPanel.addText("Path",this.path.join("/"),null,s),this.previewPanel.addText("Type",e.type,null,s),e.bytesize&&this.previewPanel.addText("Size",(e.bytesize/1024).toPrecision(3)+" KBs",null,s),"folder"==e.type&&this.previewPanel.addText("Files",e.children?e.children.length.toString():"0",null,s),this.previewPanel.addSeparator(),[...this.previewActions]);s.length||s.push({name:"Download",callback:()=>z.downloadURL(e.src,e.id)});for(t of s)t.type&&t.type!==e.type||t.path&&t.path!==this.path.join("/")||this.previewPanel.addButton(null,t.name,t.callback.bind(this,e));this.previewPanel.merge()}_processDrop(e){var t=new FileReader;let l=e.dataTransfer.files.length;for(let a=0;a<e.dataTransfer.files.length;++a){let i=e.dataTransfer.files[a];this.currentData.find(e=>e.id===i.name)||(t.readAsDataURL(i),t.onload=e=>{var t=i.name.substr(i.name.lastIndexOf(".")+1).toLowerCase(),s={id:i.name,src:e.currentTarget.result,extension:t,lastModified:i.lastModified};switch(t){case"png":case"jpg":s.type="image";break;case"js":case"css":s.type="script";break;case"json":s.type="json";break;case"obj":s.type="mesh";break;default:s.type=t,s.unknown_extension=!0}this.currentData.push(s),a==l-1&&(this._refreshContent(),this.skipBrowser||this.tree.refresh())})}}_sortData(i,a=!1){i=i??this._lastSortBy??"id",this.currentData=this.currentData.sort((e,t)=>{var s=a?t[i].localeCompare(e[i]):e[i].localeCompare(t[i]);return s=0==s?a?t.id.localeCompare(e.id):e.id.localeCompare(t.id):s}),this._lastSortBy=i,this._refreshContent()}_enterFolder(e){this.prevData.push(this.currentData),this.currentData=e.children,this.contentPage=1,this._refreshContent(),this._updatePath(this.currentData),this.onevent&&(e=new I(I.ENTER_FOLDER,e),this.onevent(e))}_deleteItem(e){var t=this.currentData.indexOf(e);t<0?console.error("[AssetView Error] Cannot delete. Item not found."):(this.currentData.splice(t,1),this._refreshContent(this.searchValue,this.filter),this.onevent&&(t=new I(I.ASSET_DELETED,e),this.onevent(t)),this.tree.refresh(),this._processData(this.data))}_cloneItem(e){var t,s=this.currentData.indexOf(e);s<0||(delete e.domEl,delete e.folder,t=y(e),this.currentData.splice(s,0,t),this._refreshContent(this.searchValue,this.filter),this.onevent&&(s=new I(I.ASSET_CLONED,e),this.onevent(s)),this._processData(this.data))}}z.AssetView=R,Object.assign(z,{request(i){var e=i.dataType||"text",t=("json"==e||"xml"==e?e="text":"binary"==e&&(e="arraybuffer",i.mimeType="application/octet-stream"),new XMLHttpRequest),s=(t.open(i.data?"POST":"GET",i.url,!0),e&&(t.responseType=e),i.mimeType&&t.overrideMimeType(i.mimeType),i.nocache&&t.setRequestHeader("Cache-Control","no-cache"),t.onload=function(e){var t,s=this.response;if(200!=this.status)t="Error "+this.status,i.error&&i.error(t);else{if("json"==i.dataType)try{s=JSON.parse(s)}catch(t){if(!i.error)throw t;i.error(t)}else if("xml"==i.dataType)try{s=(new DOMParser).parseFromString(s,"text/xml")}catch(t){if(!i.error)throw t;i.error(t)}i.success&&i.success.call(this,s,this)}},t.onerror=function(e){i.error&&i.error(e)},new FormData);if(i.data)for(var a in i.data)s.append(a,i.data[a]);return t.send(s),t},requestText(e,t,s){return this.request({url:e,dataType:"text",success:t,error:s})},requestJSON(e,t,s){return this.request({url:e,dataType:"json",success:t,error:s})},requestBinary(e,t,s){return this.request({url:e,dataType:"binary",success:t,error:s})},requireScript(e,t,s,i,a){if(!e)throw"invalid URL";var l,n=(e=e.constructor===String?[e]:e).length,o=[];for(l in e){var r=document.createElement("script");r.num=l,r.type="text/javascript",r.src=e[l]+(a?"?version="+a:""),r.original_src=e[l],r.async=!1,r.onload=function(e){n--,o.push(this),n?i&&i(this.original_src,this.num):t&&t(o)},s&&(r.onerror=function(e){s(e,this.original_src,this.num)}),document.getElementsByTagName("head")[0].appendChild(r)}},loadScriptSync(i){return new Promise((e,t)=>{var s=document.createElement("script");s.src=i,s.async=!1,s.onload=()=>e(),s.onerror=()=>t(new Error("Failed to load "+i)),document.head.appendChild(s)})},downloadURL(e,s){function t(e){var t=document.createElement("a");t.href=e,t.download=s,document.body.appendChild(t),t.click(),document.body.removeChild(t)}let i=new FileReader;e.includes("http")?z.request({url:e,dataType:"blob",success:e=>{i.readAsDataURL(e),i.onload=e=>{t(e.currentTarget.result)}}}):t(e)},downloadFile:function(e,t,s){var i,a;t?(s=s||(t.constructor===String?"text/plain":"application/octet-stream"),i=null,i=t.constructor!==File&&t.constructor!==Blob?new Blob([t],{type:s}):t,a=URL.createObjectURL(i),(s=document.createElement("a")).setAttribute("href",a),s.setAttribute("download",e),s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s),setTimeout(function(){URL.revokeObjectURL(a)},6e4)):console.warn("No file provided to download")}}),Object.defineProperty(String.prototype,"lastChar",{get:function(){return this[this.length-1]},enumerable:!0,configurable:!0}),Element.prototype.insertChildAtIndex=function(e,t=1/0){t>=this.children.length?this.appendChild(e):this.insertBefore(e,this.children[t])},Element.prototype.hasClass=function(e){return!!(e=[].concat(e)).filter(e=>this.classList.contains(e)).length},Element.prototype.addClass=function(e){e&&this.classList.add(e)},Element.prototype.getComputedSize=function(){return{width:this.offsetWidth,height:this.offsetHeight}},Element.prototype.getParentArea=function(){let e=this.parentElement;for(;e;){if(e.classList.contains("lexarea"))return e;e=e.parentElement}},Element.prototype.listen=function(e,t,s){this[s=s??"_on"+e]=t,this.addEventListener(e,t)},Element.prototype.ignore=function(e,t){t=this[t=t??"_on"+e];this.removeEventListener(e,t)},z.UTILS={getTime(){return(new Date).getTime()},compareThreshold(e,t,s,i){return Math.abs(e-t)>=i||Math.abs(e-s)>=i},compareThresholdRange(e,t,s,i){return s<=e&&e<=i||s<=t&&t<=i||e<=s&&i<=t},uidGenerator:L,deleteElement(e){e&&e.remove()},flushCss(e){e.offsetHeight},getControlPoints(e,t,s,i,a,l,n){var o=Math.sqrt(Math.pow(s-e,2)+Math.pow(i-t,2)),o=n*o/(o+Math.sqrt(Math.pow(a-s,2)+Math.pow(l-i,2))),n=n-o;return[s+o*(e-a),i+o*(t-l),s-n*(e-a),i-n*(t-l)]},drawSpline(e,t,s){e.save();for(var i=[],a=t.length,l=0;l<a-4;l+=2)i=i.concat(z.UTILS.getControlPoints(t[l],t[l+1],t[l+2],t[l+3],t[l+4],t[l+5],s));for(l=2;l<t.length-5;l+=2)e.beginPath(),e.moveTo(t[l],t[l+1]),e.bezierCurveTo(i[2*l-2],i[2*l-1],i[2*l],i[2*l+1],t[l+2],t[l+3]),e.stroke(),e.closePath();e.beginPath(),e.moveTo(t[0],t[1]),e.quadraticCurveTo(i[0],i[1],t[2],t[3]),e.stroke(),e.closePath(),e.beginPath(),e.moveTo(t[a-2],t[a-1]),e.quadraticCurveTo(i[2*a-10],i[2*a-9],t[a-4],t[a-3]),e.stroke(),e.closePath(),e.restore()}},z.ICONS={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"],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"],Paste:[512,512,[],"regular","M104.6 48L64 48C28.7 48 0 76.7 0 112L0 384c0 35.3 28.7 64 64 64l96 0 0-48-96 0c-8.8 0-16-7.2-16-16l0-272c0-8.8 7.2-16 16-16l16 0c0 17.7 14.3 32 32 32l72.4 0C202 108.4 227.6 96 256 96l62 0c-7.1-27.6-32.2-48-62-48l-40.6 0C211.6 20.9 188.2 0 160 0s-51.6 20.9-55.4 48zM144 56a16 16 0 1 1 32 0 16 16 0 1 1 -32 0zM448 464l-192 0c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l140.1 0L464 243.9 464 448c0 8.8-7.2 16-16 16zM256 512l192 0c35.3 0 64-28.7 64-64l0-204.1c0-12.7-5.1-24.9-14.1-33.9l-67.9-67.9c-9-9-21.2-14.1-33.9-14.1L256 128c-35.3 0-64 28.7-64 64l0 256c0 35.3 28.7 64 64 64z"],Trash3:[448,512,[],"regular","M170.5 51.6L151.5 80l145 0-19-28.4c-1.5-2.2-4-3.6-6.7-3.6l-93.7 0c-2.7 0-5.2 1.3-6.7 3.6zm147-26.6L354.2 80 368 80l48 0 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-8 0 0 304c0 44.2-35.8 80-80 80l-224 0c-44.2 0-80-35.8-80-80l0-304-8 0c-13.3 0-24-10.7-24-24S10.7 80 24 80l8 0 48 0 13.8 0 36.7-55.1C140.9 9.4 158.4 0 177.1 0l93.7 0c18.7 0 36.2 9.4 46.6 24.9zM80 128l0 304c0 17.7 14.3 32 32 32l224 0c17.7 0 32-14.3 32-32l0-304L80 128zm80 64l0 208c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-208c0-8.8 7.2-16 16-16s16 7.2 16 16zm80 0l0 208c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-208c0-8.8 7.2-16 16-16s16 7.2 16 16zm80 0l0 208c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-208c0-8.8 7.2-16 16-16s16 7.2 16 16z"],FilePdf:[512,512,[],"regular","M64 464l48 0 0 48-48 0c-35.3 0-64-28.7-64-64L0 64C0 28.7 28.7 0 64 0L229.5 0c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3L384 304l-48 0 0-144-80 0c-17.7 0-32-14.3-32-32l0-80L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16zM176 352l32 0c30.9 0 56 25.1 56 56s-25.1 56-56 56l-16 0 0 32c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-48 0-80c0-8.8 7.2-16 16-16zm32 80c13.3 0 24-10.7 24-24s-10.7-24-24-24l-16 0 0 48 16 0zm96-80l32 0c26.5 0 48 21.5 48 48l0 64c0 26.5-21.5 48-48 48l-32 0c-8.8 0-16-7.2-16-16l0-128c0-8.8 7.2-16 16-16zm32 128c8.8 0 16-7.2 16-16l0-64c0-8.8-7.2-16-16-16l-16 0 0 96 16 0zm80-112c0-8.8 7.2-16 16-16l48 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0 0 32 32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0 0 48c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-64 0-64z"],FileWord:[384,512,[],"regular","M48 448L48 64c0-8.8 7.2-16 16-16l160 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm55 241.1c-3.8-12.7-17.2-19.9-29.9-16.1s-19.9 17.2-16.1 29.9l48 160c3 10.2 12.4 17.1 23 17.1s19.9-7 23-17.1l25-83.4 25 83.4c3 10.2 12.4 17.1 23 17.1s19.9-7 23-17.1l48-160c3.8-12.7-3.4-26.1-16.1-29.9s-26.1 3.4-29.9 16.1l-25 83.4-25-83.4c-3-10.2-12.4-17.1-23-17.1s-19.9 7-23 17.1l-25 83.4-25-83.4z"],FilePowerpoint:[384,512,[],"regular","M64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16l160 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm72 208c-13.3 0-24 10.7-24 24l0 104 0 56c0 13.3 10.7 24 24 24s24-10.7 24-24l0-32 44 0c42 0 76-34 76-76s-34-76-76-76l-68 0zm68 104l-44 0 0-56 44 0c15.5 0 28 12.5 28 28s-12.5 28-28 28z"],FileExcel:[384,512,[],"regular","M48 448L48 64c0-8.8 7.2-16 16-16l160 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm90.9 233.3c-8.1-10.5-23.2-12.3-33.7-4.2s-12.3 23.2-4.2 33.7L161.6 320l-44.5 57.3c-8.1 10.5-6.3 25.5 4.2 33.7s25.5 6.3 33.7-4.2L192 359.1l37.1 47.6c8.1 10.5 23.2 12.3 33.7 4.2s12.3-23.2 4.2-33.7L222.4 320l44.5-57.3c8.1-10.5 6.3-25.5-4.2-33.7s-25.5-6.3-33.7 4.2L192 280.9l-37.1-47.6z"],Settings3:[640,512,[],"solid","M308.5 135.3c7.1-6.3 9.9-16.2 6.2-25c-2.3-5.3-4.8-10.5-7.6-15.5L304 89.4c-3-5-6.3-9.9-9.8-14.6c-5.7-7.6-15.7-10.1-24.7-7.1l-28.2 9.3c-10.7-8.8-23-16-36.2-20.9L199 27.1c-1.9-9.3-9.1-16.7-18.5-17.8C173.9 8.4 167.2 8 160.4 8l-.7 0c-6.8 0-13.5 .4-20.1 1.2c-9.4 1.1-16.6 8.6-18.5 17.8L115 56.1c-13.3 5-25.5 12.1-36.2 20.9L50.5 67.8c-9-3-19-.5-24.7 7.1c-3.5 4.7-6.8 9.6-9.9 14.6l-3 5.3c-2.8 5-5.3 10.2-7.6 15.6c-3.7 8.7-.9 18.6 6.2 25l22.2 19.8C32.6 161.9 32 168.9 32 176s.6 14.1 1.7 20.9L11.5 216.7c-7.1 6.3-9.9 16.2-6.2 25c2.3 5.3 4.8 10.5 7.6 15.6l3 5.2c3 5.1 6.3 9.9 9.9 14.6c5.7 7.6 15.7 10.1 24.7 7.1l28.2-9.3c10.7 8.8 23 16 36.2 20.9l6.1 29.1c1.9 9.3 9.1 16.7 18.5 17.8c6.7 .8 13.5 1.2 20.4 1.2s13.7-.4 20.4-1.2c9.4-1.1 16.6-8.6 18.5-17.8l6.1-29.1c13.3-5 25.5-12.1 36.2-20.9l28.2 9.3c9 3 19 .5 24.7-7.1c3.5-4.7 6.8-9.5 9.8-14.6l3.1-5.4c2.8-5 5.3-10.2 7.6-15.5c3.7-8.7 .9-18.6-6.2-25l-22.2-19.8c1.1-6.8 1.7-13.8 1.7-20.9s-.6-14.1-1.7-20.9l22.2-19.8zM112 176a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM504.7 500.5c6.3 7.1 16.2 9.9 25 6.2c5.3-2.3 10.5-4.8 15.5-7.6l5.4-3.1c5-3 9.9-6.3 14.6-9.8c7.6-5.7 10.1-15.7 7.1-24.7l-9.3-28.2c8.8-10.7 16-23 20.9-36.2l29.1-6.1c9.3-1.9 16.7-9.1 17.8-18.5c.8-6.7 1.2-13.5 1.2-20.4s-.4-13.7-1.2-20.4c-1.1-9.4-8.6-16.6-17.8-18.5L583.9 307c-5-13.3-12.1-25.5-20.9-36.2l9.3-28.2c3-9 .5-19-7.1-24.7c-4.7-3.5-9.6-6.8-14.6-9.9l-5.3-3c-5-2.8-10.2-5.3-15.6-7.6c-8.7-3.7-18.6-.9-25 6.2l-19.8 22.2c-6.8-1.1-13.8-1.7-20.9-1.7s-14.1 .6-20.9 1.7l-19.8-22.2c-6.3-7.1-16.2-9.9-25-6.2c-5.3 2.3-10.5 4.8-15.6 7.6l-5.2 3c-5.1 3-9.9 6.3-14.6 9.9c-7.6 5.7-10.1 15.7-7.1 24.7l9.3 28.2c-8.8 10.7-16 23-20.9 36.2L315.1 313c-9.3 1.9-16.7 9.1-17.8 18.5c-.8 6.7-1.2 13.5-1.2 20.4s.4 13.7 1.2 20.4c1.1 9.4 8.6 16.6 17.8 18.5l29.1 6.1c5 13.3 12.1 25.5 20.9 36.2l-9.3 28.2c-3 9-.5 19 7.1 24.7c4.7 3.5 9.5 6.8 14.6 9.8l5.4 3.1c5 2.8 10.2 5.3 15.5 7.6c8.7 3.7 18.6 .9 25-6.2l19.8-22.2c6.8 1.1 13.8 1.7 20.9 1.7s14.1-.6 20.9-1.7l19.8 22.2zM464 304a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"],MessagesCircle:[640,512,[],"regular","M88.2 309.1c9.8-18.3 6.8-40.8-7.5-55.8C59.4 230.9 48 204 48 176c0-63.5 63.8-128 160-128s160 64.5 160 128s-63.8 128-160 128c-13.1 0-25.8-1.3-37.8-3.6c-10.4-2-21.2-.6-30.7 4.2c-4.1 2.1-8.3 4.1-12.6 6c-16 7.2-32.9 13.5-49.9 18c2.8-4.6 5.4-9.1 7.9-13.6c1.1-1.9 2.2-3.9 3.2-5.9zM208 352c114.9 0 208-78.8 208-176S322.9 0 208 0S0 78.8 0 176c0 41.8 17.2 80.1 45.9 110.3c-.9 1.7-1.9 3.5-2.8 5.1c-10.3 18.4-22.3 36.5-36.6 52.1c-6.6 7-8.3 17.2-4.6 25.9C5.8 378.3 14.4 384 24 384c43 0 86.5-13.3 122.7-29.7c4.8-2.2 9.6-4.5 14.2-6.8c15.1 3 30.9 4.5 47.1 4.5zM432 480c16.2 0 31.9-1.6 47.1-4.5c4.6 2.3 9.4 4.6 14.2 6.8C529.5 498.7 573 512 616 512c9.6 0 18.2-5.7 22-14.5c3.8-8.8 2-19-4.6-25.9c-14.2-15.6-26.2-33.7-36.6-52.1c-.9-1.7-1.9-3.4-2.8-5.1C622.8 384.1 640 345.8 640 304c0-94.4-87.9-171.5-198.2-175.8c4.1 15.2 6.2 31.2 6.2 47.8l0 .6c87.2 6.7 144 67.5 144 127.4c0 28-11.4 54.9-32.7 77.2c-14.3 15-17.3 37.6-7.5 55.8c1.1 2 2.2 4 3.2 5.9c2.5 4.5 5.2 9 7.9 13.6c-17-4.5-33.9-10.7-49.9-18c-4.3-1.9-8.5-3.9-12.6-6c-9.5-4.8-20.3-6.2-30.7-4.2c-12.1 2.4-24.8 3.6-37.8 3.6c-61.7 0-110-26.5-136.8-62.3c-16 5.4-32.8 9.4-50 11.8C279 439.8 350 480 432 480z"],LinkOff:[640,512,["ChainBroken","ChainOff","Unlink"],"solid","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L489.3 358.2l90.5-90.5c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114l-96 96-31.9-25C430.9 239.6 420.1 175.1 377 132c-52.2-52.3-134.5-56.2-191.3-11.7L38.8 5.1zM239 162c30.1-14.9 67.7-9.9 92.8 15.3c20 20 27.5 48.3 21.7 74.5L239 162zM406.6 416.4L220.9 270c-2.1 39.8 12.2 80.1 42.2 110c38.9 38.9 94.4 51 143.6 36.3zm-290-228.5L60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5l61.8-61.8-50.6-39.9z"],StreetView:[512,512,[],"solid","M320 64A64 64 0 1 0 192 64a64 64 0 1 0 128 0zm-96 96c-35.3 0-64 28.7-64 64l0 48c0 17.7 14.3 32 32 32l1.8 0 11.1 99.5c1.8 16.2 15.5 28.5 31.8 28.5l38.7 0c16.3 0 30-12.3 31.8-28.5L318.2 304l1.8 0c17.7 0 32-14.3 32-32l0-48c0-35.3-28.7-64-64-64l-64 0zM132.3 394.2c13-2.4 21.7-14.9 19.3-27.9s-14.9-21.7-27.9-19.3c-32.4 5.9-60.9 14.2-82 24.8c-10.5 5.3-20.3 11.7-27.8 19.6C6.4 399.5 0 410.5 0 424c0 21.4 15.5 36.1 29.1 45c14.7 9.6 34.3 17.3 56.4 23.4C130.2 504.7 190.4 512 256 512s125.8-7.3 170.4-19.6c22.1-6.1 41.8-13.8 56.4-23.4c13.7-8.9 29.1-23.6 29.1-45c0-13.5-6.4-24.5-14-32.6c-7.5-7.9-17.3-14.3-27.8-19.6c-21-10.6-49.5-18.9-82-24.8c-13-2.4-25.5 6.3-27.9 19.3s6.3 25.5 19.3 27.9c30.2 5.5 53.7 12.8 69 20.5c3.2 1.6 5.8 3.1 7.9 4.5c3.6 2.4 3.6 7.2 0 9.6c-8.8 5.7-23.1 11.8-43 17.3C374.3 457 318.5 464 256 464s-118.3-7-157.7-17.9c-19.9-5.5-34.2-11.6-43-17.3c-3.6-2.4-3.6-7.2 0-9.6c2.1-1.4 4.8-2.9 7.9-4.5c15.3-7.7 38.8-14.9 69-20.5z"],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"],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"],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"],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"],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"],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"],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"],PersonWalkingArrowRight:[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-80z"],ClapperboardClosed:[512,512,[],"solid","M448 32l-86.1 0-1 1-127 127 92.1 0 1-1L453.8 32.3c-1.9-.2-3.8-.3-5.8-.3zm64 128l0-64c0-15.1-5.3-29.1-14-40l-104 104L512 160zM294.1 32l-92.1 0-1 1L73.9 160l92.1 0 1-1 127-127zM64 32C28.7 32 0 60.7 0 96l0 64 6.1 0 1-1 127-127L64 32zM512 192L0 192 0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-224z"],UserOff:[640,512,[],"solid","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L381.9 274c48.5-23.2 82.1-72.7 82.1-130C464 64.5 399.5 0 320 0C250.4 0 192.4 49.3 178.9 114.9L38.8 5.1zM545.5 512L528 512 284.3 320l-59 0C136.2 320 64 392.2 64 481.3c0 17 13.8 30.7 30.7 30.7l450.6 0 .3 0z"],PhotoFilm:[640,512,["Media"],"solid","M256 0L576 0c35.3 0 64 28.7 64 64l0 224c0 35.3-28.7 64-64 64l-320 0c-35.3 0-64-28.7-64-64l0-224c0-35.3 28.7-64 64-64zM476 106.7C471.5 100 464 96 456 96s-15.5 4-20 10.7l-56 84L362.7 169c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6l80 0 48 0 144 0c8.9 0 17-4.9 21.2-12.7s3.7-17.3-1.2-24.6l-96-144zM336 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM64 128l96 0 0 256 0 32c0 17.7 14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-32 160 0 0 64c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 192c0-35.3 28.7-64 64-64zm8 64c-8.8 0-16 7.2-16 16l0 16c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-16 0zm0 104c-8.8 0-16 7.2-16 16l0 16c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-16 0zm0 104c-8.8 0-16 7.2-16 16l0 16c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-16 0zm336 16l0 16c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-16 0c-8.8 0-16 7.2-16 16z"],Chart:[448,512,[],"solid","M160 80c0-26.5 21.5-48 48-48l32 0c26.5 0 48 21.5 48 48l0 352c0 26.5-21.5 48-48 48l-32 0c-26.5 0-48-21.5-48-48l0-352zM0 272c0-26.5 21.5-48 48-48l32 0c26.5 0 48 21.5 48 48l0 160c0 26.5-21.5 48-48 48l-32 0c-26.5 0-48-21.5-48-48L0 272zM368 96l32 0c26.5 0 48 21.5 48 48l0 288c0 26.5-21.5 48-48 48l-32 0c-26.5 0-48-21.5-48-48l0-288c0-26.5 21.5-48 48-48z"],HandsAslInterpreting:[640,512,["ASL"],"solid","M156.6 46.3c7.9-15.8 1.5-35-14.3-42.9s-35-1.5-42.9 14.3L13.5 189.4C4.6 207.2 0 226.8 0 246.7L0 256c0 70.7 57.3 128 128 128l72 0 8 0 0-.3c35.2-2.7 65.4-22.8 82.1-51.7c8.8-15.3 3.6-34.9-11.7-43.7s-34.9-3.6-43.7 11.7c-7 12-19.9 20-34.7 20c-22.1 0-40-17.9-40-40s17.9-40 40-40c14.8 0 27.7 8 34.7 20c8.8 15.3 28.4 20.5 43.7 11.7s20.5-28.4 11.7-43.7c-12.8-22.1-33.6-39.1-58.4-47.1l80.8-22c17-4.6 27.1-22.2 22.5-39.3s-22.2-27.1-39.3-22.5L194.9 124.6l81.6-68c13.6-11.3 15.4-31.5 4.1-45.1S249.1-3.9 235.5 7.4L133.6 92.3l23-46zM483.4 465.7c-7.9 15.8-1.5 35 14.3 42.9s35 1.5 42.9-14.3l85.9-171.7c8.9-17.8 13.5-37.4 13.5-57.2l0-9.3c0-70.7-57.3-128-128-128l-72 0-8 0 0 .3c-35.2 2.7-65.4 22.8-82.1 51.7c-8.9 15.3-3.6 34.9 11.7 43.7s34.9 3.6 43.7-11.7c7-12 19.9-20 34.7-20c22.1 0 40 17.9 40 40s-17.9 40-40 40c-14.8 0-27.7-8-34.7-20c-8.9-15.3-28.4-20.5-43.7-11.7s-20.5 28.4-11.7 43.7c12.8 22.1 33.6 39.1 58.4 47.1l-80.8 22c-17.1 4.7-27.1 22.2-22.5 39.3s22.2 27.1 39.3 22.5l100.7-27.5-81.6 68c-13.6 11.3-15.4 31.5-4.1 45.1s31.5 15.4 45.1 4.1l101.9-84.9-23 46z"],HandPointRight:[512,512,[],"regular","M448 128l-177.6 0c1 5.2 1.6 10.5 1.6 16l0 16 32 0 144 0c8.8 0 16-7.2 16-16s-7.2-16-16-16zM224 144c0-17.7-14.3-32-32-32c0 0 0 0 0 0l-24 0c-66.3 0-120 53.7-120 120l0 48c0 52.5 33.7 97.1 80.7 113.4c-.5-3.1-.7-6.2-.7-9.4c0-20 9.2-37.9 23.6-49.7c-4.9-9-7.6-19.4-7.6-30.3c0-15.1 5.3-29 14-40c-8.8-11-14-24.9-14-40l0-40c0-13.3 10.7-24 24-24s24 10.7 24 24l0 40c0 8.8 7.2 16 16 16s16-7.2 16-16l0-40 0-40zM192 64s0 0 0 0c18 0 34.6 6 48 16l208 0c35.3 0 64 28.7 64 64s-28.7 64-64 64l-82 0c1.3 5.1 2 10.5 2 16c0 25.3-14.7 47.2-36 57.6c2.6 7 4 14.5 4 22.4c0 20-9.2 37.9-23.6 49.7c4.9 9 7.6 19.4 7.6 30.3c0 35.3-28.7 64-64 64l-64 0-24 0C75.2 448 0 372.8 0 280l0-48C0 139.2 75.2 64 168 64l24 0zm64 336c8.8 0 16-7.2 16-16s-7.2-16-16-16l-48 0-16 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l64 0zm16-176c0 5.5-.7 10.9-2 16l2 0 32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0 0 16zm-24 64l-40 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l48 0 16 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-24 0z"],HandPointUp:[384,512,[],"regular","M64 64l0 177.6c5.2-1 10.5-1.6 16-1.6l16 0 0-32L96 64c0-8.8-7.2-16-16-16s-16 7.2-16 16zM80 288c-17.7 0-32 14.3-32 32c0 0 0 0 0 0l0 24c0 66.3 53.7 120 120 120l48 0c52.5 0 97.1-33.7 113.4-80.7c-3.1 .5-6.2 .7-9.4 .7c-20 0-37.9-9.2-49.7-23.6c-9 4.9-19.4 7.6-30.3 7.6c-15.1 0-29-5.3-40-14c-11 8.8-24.9 14-40 14l-40 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l40 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-40 0-40 0zM0 320s0 0 0 0c0-18 6-34.6 16-48L16 64C16 28.7 44.7 0 80 0s64 28.7 64 64l0 82c5.1-1.3 10.5-2 16-2c25.3 0 47.2 14.7 57.6 36c7-2.6 14.5-4 22.4-4c20 0 37.9 9.2 49.7 23.6c9-4.9 19.4-7.6 30.3-7.6c35.3 0 64 28.7 64 64l0 64 0 24c0 92.8-75.2 168-168 168l-48 0C75.2 512 0 436.8 0 344l0-24zm336-64c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 48 0 16c0 8.8 7.2 16 16 16s16-7.2 16-16l0-64zM160 240c5.5 0 10.9 .7 16 2l0-2 0-32c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 32 16 0zm64 24l0 40c0 8.8 7.2 16 16 16s16-7.2 16-16l0-48 0-16c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 24z"],HandPointDown:[384,512,[],"regular","M64 448l0-177.6c5.2 1 10.5 1.6 16 1.6l16 0 0 32 0 144c0 8.8-7.2 16-16 16s-16-7.2-16-16zM80 224c-17.7 0-32-14.3-32-32c0 0 0 0 0 0l0-24c0-66.3 53.7-120 120-120l48 0c52.5 0 97.1 33.7 113.4 80.7c-3.1-.5-6.2-.7-9.4-.7c-20 0-37.9 9.2-49.7 23.6c-9-4.9-19.4-7.6-30.3-7.6c-15.1 0-29 5.3-40 14c-11-8.8-24.9-14-40-14l-40 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l40 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-40 0-40 0zM0 192s0 0 0 0c0 18 6 34.6 16 48l0 208c0 35.3 28.7 64 64 64s64-28.7 64-64l0-82c5.1 1.3 10.5 2 16 2c25.3 0 47.2-14.7 57.6-36c7 2.6 14.5 4 22.4 4c20 0 37.9-9.2 49.7-23.6c9 4.9 19.4 7.6 30.3 7.6c35.3 0 64-28.7 64-64l0-64 0-24C384 75.2 308.8 0 216 0L168 0C75.2 0 0 75.2 0 168l0 24zm336 64c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-48 0-16c0-8.8 7.2-16 16-16s16 7.2 16 16l0 64zM160 272c5.5 0 10.9-.7 16-2l0 2 0 32c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-32 16 0zm64-24l0-40c0-8.8 7.2-16 16-16s16 7.2 16 16l0 48 0 16c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-24z"],HandPointLeft:[512,512,[],"regular","M64 128l177.6 0c-1 5.2-1.6 10.5-1.6 16l0 16-32 0L64 160c-8.8 0-16-7.2-16-16s7.2-16 16-16zm224 16c0-17.7 14.3-32 32-32c0 0 0 0 0 0l24 0c66.3 0 120 53.7 120 120l0 48c0 52.5-33.7 97.1-80.7 113.4c.5-3.1 .7-6.2 .7-9.4c0-20-9.2-37.9-23.6-49.7c4.9-9 7.6-19.4 7.6-30.3c0-15.1-5.3-29-14-40c8.8-11 14-24.9 14-40l0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-40 0-40zm32-80s0 0 0 0c-18 0-34.6 6-48 16L64 80C28.7 80 0 108.7 0 144s28.7 64 64 64l82 0c-1.3 5.1-2 10.5-2 16c0 25.3 14.7 47.2 36 57.6c-2.6 7-4 14.5-4 22.4c0 20 9.2 37.9 23.6 49.7c-4.9 9-7.6 19.4-7.6 30.3c0 35.3 28.7 64 64 64l64 0 24 0c92.8 0 168-75.2 168-168l0-48c0-92.8-75.2-168-168-168l-24 0zM256 400c-8.8 0-16-7.2-16-16s7.2-16 16-16l48 0 16 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-64 0zM240 224c0 5.5 .7 10.9 2 16l-2 0-32 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l32 0 0 16zm24 64l40 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-48 0-16 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l24 0z"],HandScissors:[512,512,[],"regular","M.2 276.3c-1.2-35.3 26.4-65 61.7-66.2l3.3-.1L57 208.1C22.5 200.5 .7 166.3 8.3 131.8S50.2 75.5 84.7 83.2l173 38.3c2.3-2.9 4.7-5.7 7.1-8.5l18.4-20.3C299.9 74.5 323.5 64 348.3 64l10.2 0c54.1 0 104.1 28.7 131.3 75.4l1.5 2.6c13.6 23.2 20.7 49.7 20.7 76.6L512 344c0 66.3-53.7 120-120 120l-8 0-96 0c-35.3 0-64-28.7-64-64c0-2.8 .2-5.6 .5-8.3c-19.4-11-32.5-31.8-32.5-55.7c0-.8 0-1.6 0-2.4L66.4 338c-35.3 1.2-65-26.4-66.2-61.7zm63.4-18.2c-8.8 .3-15.7 7.7-15.4 16.5s7.7 15.7 16.5 15.4l161.5-5.6c9.8-.3 18.7 5.3 22.7 14.2s2.2 19.3-4.5 26.4c-2.8 2.9-4.4 6.7-4.4 11c0 8.8 7.2 16 16 16c9.1 0 17.4 5.1 21.5 13.3s3.2 17.9-2.3 25.1c-2 2.7-3.2 6-3.2 9.6c0 8.8 7.2 16 16 16l96 0 8 0c39.8 0 72-32.2 72-72l0-125.4c0-18.4-4.9-36.5-14.2-52.4l-1.5-2.6c-18.6-32-52.8-51.6-89.8-51.6l-10.2 0c-11.3 0-22 4.8-29.6 13.1l-17.5-15.9 17.5 15.9-18.4 20.3c-.6 .6-1.1 1.3-1.7 1.9l57 13.2c8.6 2 14 10.6 12 19.2s-10.6 14-19.2 12l-85.6-19.7L74.3 130c-8.6-1.9-17.2 3.5-19.1 12.2s3.5 17.2 12.2 19.1l187.5 41.6c10.2 2.3 17.8 10.9 18.7 21.4l.1 1c.6 6.6-1.5 13.1-5.8 18.1s-10.6 7.9-17.2 8.2L63.6 258.1z"],HandSpock:[576,512,[],"regular","M170.2 80.8C161 47 180.8 12 214.6 2.4c34-9.6 69.4 10.2 79 44.2l30.3 107.1L337.1 84c6.6-34.7 40.1-57.5 74.8-50.9c31.4 6 53 33.9 52 64.9c10-2.6 20.8-2.8 31.5-.1c34.3 8.6 55.1 43.3 46.6 77.6L486.7 397.2C469.8 464.7 409.2 512 339.6 512l-33.7 0c-56.9 0-112.2-19-157.2-53.9l-92-71.6c-27.9-21.7-32.9-61.9-11.2-89.8s61.9-32.9 89.8-11.2l17 13.2L100.5 167.5c-13-32.9 3.2-70.1 36-83c11.1-4.4 22.7-5.4 33.7-3.7zm77.1-21.2c-2.4-8.5-11.2-13.4-19.7-11s-13.4 11.2-11 19.7l54.8 182.4c3.5 12.3-3.3 25.2-15.4 29.3s-25.3-2-30-13.9L174.9 138.1c-3.2-8.2-12.5-12.3-20.8-9s-12.3 12.5-9 20.8l73.3 185.6c12 30.3-23.7 57-49.4 37l-63.1-49.1c-7-5.4-17-4.2-22.5 2.8s-4.2 17 2.8 22.5l92 71.6c36.5 28.4 81.4 43.8 127.7 43.8l33.7 0c47.5 0 89-32.4 100.5-78.5l55.4-221.6c2.1-8.6-3.1-17.3-11.6-19.4s-17.3 3.1-19.4 11.6l-26 104C435.6 271.8 425 280 413 280c-16.5 0-28.9-15-25.8-31.2L415.7 99c1.7-8.7-4-17.1-12.7-18.7s-17.1 4-18.7 12.7L352.5 260c-2.2 11.6-12.4 20-24.2 20c-11 0-20.7-7.3-23.7-17.9L247.4 59.6z"],HandBackFist:[448,512,["HandRock"],"regular","M144 64c0-8.8 7.2-16 16-16s16 7.2 16 16c0 9.1 5.1 17.4 13.3 21.5s17.9 3.2 25.1-2.3c2.7-2 6-3.2 9.6-3.2c8.8 0 16 7.2 16 16c0 9.1 5.1 17.4 13.3 21.5s17.9 3.2 25.1-2.3c2.7-2 6-3.2 9.6-3.2c8.8 0 16 7.2 16 16c0 9.1 5.1 17.4 13.3 21.5s17.9 3.2 25.1-2.3c2.7-2 6-3.2 9.6-3.2c8.8 0 16 7.2 16 16l0 104c0 31.3-20 58-48 67.9c-9.6 3.4-16 12.5-16 22.6L304 488c0 13.3 10.7 24 24 24s24-10.7 24-24l0-117.8c38-20.1 64-60.1 64-106.2l0-104c0-35.3-28.7-64-64-64c-2.8 0-5.6 .2-8.3 .5C332.8 77.1 311.9 64 288 64c-2.8 0-5.6 .2-8.3 .5C268.8 45.1 247.9 32 224 32c-2.8 0-5.6 .2-8.3 .5C204.8 13.1 183.9 0 160 0C124.7 0 96 28.7 96 64l0 64.3c-11.7 7.4-22.5 16.4-32 26.9l17.8 16.1L64 155.2l-9.4 10.5C40 181.8 32 202.8 32 224.6l0 12.8c0 49.6 24.2 96.1 64.8 124.5l13.8-19.7L96.8 361.9l8.9 6.2c6.9 4.8 14.4 8.6 22.3 11.3L128 488c0 13.3 10.7 24 24 24s24-10.7 24-24l0-128.1c0-12.6-9.8-23.1-22.4-23.9c-7.3-.5-14.3-2.9-20.3-7.1l-13.1 18.7 13.1-18.7-8.9-6.2C96.6 303.1 80 271.3 80 237.4l0-12.8c0-9.9 3.7-19.4 10.3-26.8l9.4-10.5c3.8-4.2 7.9-8.1 12.3-11.6l0 32.3c0 8.8 7.2 16 16 16s16-7.2 16-16l0-65.7 0-14.3 0-64z"],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"],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"],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"],CircleRight:[512,512,[],"solid","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"],CircleUp:[512,512,[],"solid","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"],CircleLeft:[512,512,[],"solid","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"],CircleDown:[512,512,[],"solid","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"],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"],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"],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"],VrCardboard:[640,512,["VR"],"solid","M576 64L64 64C28.7 64 0 92.7 0 128L0 384c0 35.3 28.7 64 64 64l120.4 0c24.2 0 46.4-13.7 57.2-35.4l32-64c8.8-17.5 26.7-28.6 46.3-28.6s37.5 11.1 46.3 28.6l32 64c10.8 21.7 33 35.4 57.2 35.4L576 448c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64zM96 240a64 64 0 1 1 128 0A64 64 0 1 1 96 240zm384-64a64 64 0 1 1 0 128 64 64 0 1 1 0-128z"],C:[32,32,[],"solid","M29.86 8c-.224-.385-.532-.724-.871-.921L17.234.292c-.677-.391-1.787-.391-2.464 0L3.015 7.079C2.338 7.47 1.78 8.432 1.78 9.214v13.573c0 .391.14.828.364 1.213.219.385.532.724.871.917l11.749 6.791c.683.391 1.787.391 2.464 0l11.755-6.791c.339-.193.647-.532.871-.917s.359-.823.359-1.213V9.214c.005-.391-.135-.828-.353-1.213zM16 25.479c-5.229 0-9.479-4.249-9.479-9.479S10.77 6.521 16 6.521a9.51 9.51 0 0 1 8.208 4.733l-4.104 2.376A4.76 4.76 0 0 0 16 11.259c-2.615 0-4.74 2.125-4.74 4.74s2.125 4.74 4.74 4.74a4.76 4.76 0 0 0 4.104-2.371l4.104 2.376A9.51 9.51 0 0 1 16 25.479z",{svgClass:"stroke-none"}],CPlusPlus:[32,32,[],"solid","M29.86 8c-.224-.385-.532-.724-.871-.921L17.234.292c-.677-.391-1.787-.391-2.464 0L3.015 7.079C2.338 7.47 1.78 8.432 1.78 9.214v13.573c0 .391.14.828.364 1.213c.219.385.532.724.871.917l11.749 6.791c.683.391 1.787.391 2.464 0l11.755-6.791c.339-.193.647-.532.871-.917s.359-.823.359-1.213V9.214c.005-.391-.135-.828-.353-1.213zM16 25.479c-5.229 0-9.479-4.249-9.479-9.479S10.77 6.521 16 6.521a9.51 9.51 0 0 1 8.208 4.733l-4.104 2.376A4.76 4.76 0 0 0 16 11.259c-2.615 0-4.74 2.125-4.74 4.74s2.125 4.74 4.74 4.74a4.76 4.76 0 0 0 4.104-2.371l4.104 2.376A9.51 9.51 0 0 1 16 25.477zm9.479-8.952h-1.052v1.052H23.37v-1.052h-1.052v-1.053h1.052v-1.052h1.057v1.052h1.052zm3.948 0h-1.052v1.052h-1.052v-1.052h-1.052v-1.053h1.052v-1.052h1.052v1.052h1.052z",{svgClass:"stroke-none"}],Discord:[640,512,[],"solid","M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"],Google:[488,512,[],"solid","M488 261.8C488 403.3 391.1 504 248 504 110.8 504 0 393.2 0 256S110.8 8 248 8c66.8 0 123 24.5 166.3 64.9l-67.5 64.9C258.5 52.6 94.3 116.6 94.3 256c0 86.5 69.1 156.6 153.7 156.6 98.2 0 135-70.4 140.8-106.9H248v-85.3h236.1c2.3 12.7 3.9 24.9 3.9 41.4z"],Js:[32,32,[],"solid","M18.774 19.7a3.73 3.73 0 0 0 3.376 2.078c1.418 0 2.324-.709 2.324-1.688c0-1.173-.931-1.589-2.491-2.272l-.856-.367c-2.469-1.052-4.11-2.37-4.11-5.156c0-2.567 1.956-4.52 5.012-4.52A5.06 5.06 0 0 1 26.9 10.52l-2.665 1.711a2.33 2.33 0 0 0-2.2-1.467a1.49 1.49 0 0 0-1.638 1.467c0 1.027.636 1.442 2.1 2.078l.856.366c2.908 1.247 4.549 2.518 4.549 5.376c0 3.081-2.42 4.769-5.671 4.769a6.58 6.58 0 0 1-6.236-3.5ZM6.686 20c.538.954 1.027 1.76 2.2 1.76c1.124 0 1.834-.44 1.834-2.15V7.975h3.422v11.683c0 3.543-2.078 5.156-5.11 5.156A5.31 5.31 0 0 1 3.9 21.688Z"],Linux:[448,512,[],"regular","M220.8 123.3c1 .5 1.8 1.7 3 1.7 1.1 0 2.8-.4 2.9-1.5.2-1.4-1.9-2.3-3.2-2.9-1.7-.7-3.9-1-5.5-.1-.4.2-.8.7-.6 1.1.3 1.3 2.3 1.1 3.4 1.7zm-21.9 1.7c1.2 0 2-1.2 3-1.7 1.1-.6 3.1-.4 3.5-1.6.2-.4-.2-.9-.6-1.1-1.6-.9-3.8-.6-5.5.1-1.3.6-3.4 1.5-3.2 2.9.1 1 1.8 1.5 2.8 1.4zM420 403.8c-3.6-4-5.3-11.6-7.2-19.7-1.8-8.1-3.9-16.8-10.5-22.4-1.3-1.1-2.6-2.1-4-2.9-1.3-.8-2.7-1.5-4.1-2 9.2-27.3 5.6-54.5-3.7-79.1-11.4-30.1-31.3-56.4-46.5-74.4-17.1-21.5-33.7-41.9-33.4-72C311.1 85.4 315.7.1 234.8 0 132.4-.2 158 103.4 156.9 135.2c-1.7 23.4-6.4 41.8-22.5 64.7-18.9 22.5-45.5 58.8-58.1 96.7-6 17.9-8.8 36.1-6.2 53.3-6.5 5.8-11.4 14.7-16.6 20.2-4.2 4.3-10.3 5.9-17 8.3s-14 6-18.5 14.5c-2.1 3.9-2.8 8.1-2.8 12.4 0 3.9.6 7.9 1.2 11.8 1.2 8.1 2.5 15.7.8 20.8-5.2 14.4-5.9 24.4-2.2 31.7 3.8 7.3 11.4 10.5 20.1 12.3 17.3 3.6 40.8 2.7 59.3 12.5 19.8 10.4 39.9 14.1 55.9 10.4 11.6-2.6 21.1-9.6 25.9-20.2 12.5-.1 26.3-5.4 48.3-6.6 14.9-1.2 33.6 5.3 55.1 4.1.6 2.3 1.4 4.6 2.5 6.7v.1c8.3 16.7 23.8 24.3 40.3 23 16.6-1.3 34.1-11 48.3-27.9 13.6-16.4 36-23.2 50.9-32.2 7.4-4.5 13.4-10.1 13.9-18.3.4-8.2-4.4-17.3-15.5-29.7zM223.7 87.3c9.8-22.2 34.2-21.8 44-.4 6.5 14.2 3.6 30.9-4.3 40.4-1.6-.8-5.9-2.6-12.6-4.9 1.1-1.2 3.1-2.7 3.9-4.6 4.8-11.8-.2-27-9.1-27.3-7.3-.5-13.9 10.8-11.8 23-4.1-2-9.4-3.5-13-4.4-1-6.9-.3-14.6 2.9-21.8zM183 75.8c10.1 0 20.8 14.2 19.1 33.5-3.5 1-7.1 2.5-10.2 4.6 1.2-8.9-3.3-20.1-9.6-19.6-8.4.7-9.8 21.2-1.8 28.1 1 .8 1.9-.2-5.9 5.5-15.6-14.6-10.5-52.1 8.4-52.1zm-13.6 60.7c6.2-4.6 13.6-10 14.1-10.5 4.7-4.4 13.5-14.2 27.9-14.2 7.1 0 15.6 2.3 25.9 8.9 6.3 4.1 11.3 4.4 22.6 9.3 8.4 3.5 13.7 9.7 10.5 18.2-2.6 7.1-11 14.4-22.7 18.1-11.1 3.6-19.8 16-38.2 14.9-3.9-.2-7-1-9.6-2.1-8-3.5-12.2-10.4-20-15-8.6-4.8-13.2-10.4-14.7-15.3-1.4-4.9 0-9 4.2-12.3zm3.3 334c-2.7 35.1-43.9 34.4-75.3 18-29.9-15.8-68.6-6.5-76.5-21.9-2.4-4.7-2.4-12.7 2.6-26.4v-.2c2.4-7.6.6-16-.6-23.9-1.2-7.8-1.8-15 .9-20 3.5-6.7 8.5-9.1 14.8-11.3 10.3-3.7 11.8-3.4 19.6-9.9 5.5-5.7 9.5-12.9 14.3-18 5.1-5.5 10-8.1 17.7-6.9 8.1 1.2 15.1 6.8 21.9 16l19.6 35.6c9.5 19.9 43.1 48.4 41 68.9zm-1.4-25.9c-4.1-6.6-9.6-13.6-14.4-19.6 7.1 0 14.2-2.2 16.7-8.9 2.3-6.2 0-14.9-7.4-24.9-13.5-18.2-38.3-32.5-38.3-32.5-13.5-8.4-21.1-18.7-24.6-29.9s-3-23.3-.3-35.2c5.2-22.9 18.6-45.2 27.2-59.2 2.3-1.7.8 3.2-8.7 20.8-8.5 16.1-24.4 53.3-2.6 82.4.6-20.7 5.5-41.8 13.8-61.5 12-27.4 37.3-74.9 39.3-112.7 1.1.8 4.6 3.2 6.2 4.1 4.6 2.7 8.1 6.7 12.6 10.3 12.4 10 28.5 9.2 42.4 1.2 6.2-3.5 11.2-7.5 15.9-9 9.9-3.1 17.8-8.6 22.3-15 7.7 30.4 25.7 74.3 37.2 95.7 6.1 11.4 18.3 35.5 23.6 64.6 3.3-.1 7 .4 10.9 1.4 13.8-35.7-11.7-74.2-23.3-84.9-4.7-4.6-4.9-6.6-2.6-6.5 12.6 11.2 29.2 33.7 35.2 59 2.8 11.6 3.3 23.7.4 35.7 16.4 6.8 35.9 17.9 30.7 34.8-2.2-.1-3.2 0-4.2 0 3.2-10.1-3.9-17.6-22.8-26.1-19.6-8.6-36-8.6-38.3 12.5-12.1 4.2-18.3 14.7-21.4 27.3-2.8 11.2-3.6 24.7-4.4 39.9-.5 7.7-3.6 18-6.8 29-32.1 22.9-76.7 32.9-114.3 7.2zm257.4-11.5c-.9 16.8-41.2 19.9-63.2 46.5-13.2 15.7-29.4 24.4-43.6 25.5s-26.5-4.8-33.7-19.3c-4.7-11.1-2.4-23.1 1.1-36.3 3.7-14.2 9.2-28.8 9.9-40.6.8-15.2 1.7-28.5 4.2-38.7 2.6-10.3 6.6-17.2 13.7-21.1.3-.2.7-.3 1-.5.8 13.2 7.3 26.6 18.8 29.5 12.6 3.3 30.7-7.5 38.4-16.3 9-.3 15.7-.9 22.6 5.1 9.9 8.5 7.1 30.3 17.1 41.6 10.6 11.6 14 19.5 13.7 24.6zM173.3 148.7c2 1.9 4.7 4.5 8 7.1 6.6 5.2 15.8 10.6 27.3 10.6 11.6 0 22.5-5.9 31.8-10.8 4.9-2.6 10.9-7 14.8-10.4s5.9-6.3 3.1-6.6-2.6 2.6-6 5.1c-4.4 3.2-9.7 7.4-13.9 9.8-7.4 4.2-19.5 10.2-29.9 10.2s-18.7-4.8-24.9-9.7c-3.1-2.5-5.7-5-7.7-6.9-1.5-1.4-1.9-4.6-4.3-4.9-1.4-.1-1.8 3.7 1.7 6.5z"],SquareJs:[448,512,[],"solid","M448 96c0-35.3-28.7-64-64-64H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96zM180.9 444.9c-33.7 0-53.2-17.4-63.2-38.5L152 385.7c6.6 11.7 12.6 21.6 27.1 21.6c13.8 0 22.6-5.4 22.6-26.5V237.7h42.1V381.4c0 43.6-25.6 63.5-62.9 63.5zm85.8-43L301 382.1c9 14.7 20.8 25.6 41.5 25.6c17.4 0 28.6-8.7 28.6-20.8c0-14.4-11.4-19.5-30.7-28l-10.5-4.5c-30.4-12.9-50.5-29.2-50.5-63.5c0-31.6 24.1-55.6 61.6-55.6c26.8 0 46 9.3 59.8 33.7L368 290c-7.2-12.9-15-18-27.1-18c-12.3 0-20.1 7.8-20.1 18c0 12.6 7.8 17.7 25.9 25.6l10.5 4.5c35.8 15.3 55.9 31 55.9 66.2c0 37.8-29.8 58.6-69.7 58.6c-39.1 0-64.4-18.6-76.7-43z"],Safari:[512,512,[],"solid","M274.69,274.69l-37.38-37.38L166,346ZM256,8C119,8,8,119,8,256S119,504,256,504,504,393,504,256,393,8,256,8ZM411.85,182.79l14.78-6.13A8,8,0,0,1,437.08,181h0a8,8,0,0,1-4.33,10.46L418,197.57a8,8,0,0,1-10.45-4.33h0A8,8,0,0,1,411.85,182.79ZM314.43,94l6.12-14.78A8,8,0,0,1,331,74.92h0a8,8,0,0,1,4.33,10.45l-6.13,14.78a8,8,0,0,1-10.45,4.33h0A8,8,0,0,1,314.43,94ZM256,60h0a8,8,0,0,1,8,8V84a8,8,0,0,1-8,8h0a8,8,0,0,1-8-8V68A8,8,0,0,1,256,60ZM181,74.92a8,8,0,0,1,10.46,4.33L197.57,94a8,8,0,1,1-14.78,6.12l-6.13-14.78A8,8,0,0,1,181,74.92Zm-63.58,42.49h0a8,8,0,0,1,11.31,0L140,128.72A8,8,0,0,1,140,140h0a8,8,0,0,1-11.31,0l-11.31-11.31A8,8,0,0,1,117.41,117.41ZM60,256h0a8,8,0,0,1,8-8H84a8,8,0,0,1,8,8h0a8,8,0,0,1-8,8H68A8,8,0,0,1,60,256Zm40.15,73.21-14.78,6.13A8,8,0,0,1,74.92,331h0a8,8,0,0,1,4.33-10.46L94,314.43a8,8,0,0,1,10.45,4.33h0A8,8,0,0,1,100.15,329.21Zm4.33-136h0A8,8,0,0,1,94,197.57l-14.78-6.12A8,8,0,0,1,74.92,181h0a8,8,0,0,1,10.45-4.33l14.78,6.13A8,8,0,0,1,104.48,193.24ZM197.57,418l-6.12,14.78a8,8,0,0,1-14.79-6.12l6.13-14.78A8,8,0,1,1,197.57,418ZM264,444a8,8,0,0,1-8,8h0a8,8,0,0,1-8-8V428a8,8,0,0,1,8-8h0a8,8,0,0,1,8,8Zm67-6.92h0a8,8,0,0,1-10.46-4.33L314.43,418a8,8,0,0,1,4.33-10.45h0a8,8,0,0,1,10.45,4.33l6.13,14.78A8,8,0,0,1,331,437.08Zm63.58-42.49h0a8,8,0,0,1-11.31,0L372,383.28A8,8,0,0,1,372,372h0a8,8,0,0,1,11.31,0l11.31,11.31A8,8,0,0,1,394.59,394.59ZM286.25,286.25,110.34,401.66,225.75,225.75,401.66,110.34ZM437.08,331h0a8,8,0,0,1-10.45,4.33l-14.78-6.13a8,8,0,0,1-4.33-10.45h0A8,8,0,0,1,418,314.43l14.78,6.12A8,8,0,0,1,437.08,331ZM444,264H428a8,8,0,0,1-8-8h0a8,8,0,0,1,8-8h16a8,8,0,0,1,8,8h0A8,8,0,0,1,444,264Z"],Python:[448,512,[],"solid","M439.8 200.5c-7.7-30.9-22.3-54.2-53.4-54.2h-40.1v47.4c0 36.8-31.2 67.8-66.8 67.8H172.7c-29.2 0-53.4 25-53.4 54.3v101.8c0 29 25.2 46 53.4 54.3 33.8 9.9 66.3 11.7 106.8 0 26.9-7.8 53.4-23.5 53.4-54.3v-40.7H226.2v-13.6h160.2c31.1 0 42.6-21.7 53.4-54.2 11.2-33.5 10.7-65.7 0-108.6zM286.2 404c11.1 0 20.1 9.1 20.1 20.3 0 11.3-9 20.4-20.1 20.4-11 0-20.1-9.2-20.1-20.4.1-11.3 9.1-20.3 20.1-20.3zM167.8 248.1h106.8c29.7 0 53.4-24.5 53.4-54.3V91.9c0-29-24.4-50.7-53.4-55.6-35.8-5.9-74.7-5.6-106.8.1-45.2 8-53.4 24.7-53.4 55.6v40.7h106.9v13.6h-147c-31.1 0-58.3 18.7-66.8 54.2-9.8 40.7-10.2 66.1 0 108.6 7.6 31.6 25.7 54.2 56.8 54.2H101v-48.8c0-35.3 30.5-66.4 66.8-66.4zm-6.7-142.6c-11.1 0-20.1-9.1-20.1-20.3.1-11.3 9-20.4 20.1-20.4 11 0 20.1 9.2 20.1 20.4s-9 20.3-20.1 20.3z"],Markdown:[640,512,[],"solid","M593.8 59.1H46.2C20.7 59.1 0 79.8 0 105.2v301.5c0 25.5 20.7 46.2 46.2 46.2h547.7c25.5 0 46.2-20.7 46.1-46.1V105.2c0-25.4-20.7-46.1-46.2-46.1zM338.5 360.6H277v-120l-61.5 76.9-61.5-76.9v120H92.3V151.4h61.5l61.5 76.9 61.5-76.9h61.5v209.2zm135.3 3.1L381.5 256H443V151.4h61.5V256H566z"],Microsoft:[448,512,[],"solid","M0 32h214.6v214.6H0V32zm233.4 0H448v214.6H233.4V32zM0 265.4h214.6V480H0V265.4zm233.4 0H448V480H233.4V265.4z"],Npm:[576,512,[],"solid","M288 288h-32v-64h32v64zm288-128v192H288v32H160v-32H0V160h576zm-416 32H32v128h64v-96h32v96h32V192zm160 0H192v160h64v-32h64V192zm224 0H352v128h64v-96h32v96h32v-96h32v96h32V192z"],Reddit:[512,512,[],"solid","M0 256C0 114.6 114.6 0 256 0S512 114.6 512 256s-114.6 256-256 256L37.1 512c-13.7 0-20.5-16.5-10.9-26.2L75 437C28.7 390.7 0 326.7 0 256zM349.6 153.6c23.6 0 42.7-19.1 42.7-42.7s-19.1-42.7-42.7-42.7c-20.6 0-37.8 14.6-41.8 34c-34.5 3.7-61.4 33-61.4 68.4l0 .2c-37.5 1.6-71.8 12.3-99 29.1c-10.1-7.8-22.8-12.5-36.5-12.5c-33 0-59.8 26.8-59.8 59.8c0 24 14.1 44.6 34.4 54.1c2 69.4 77.6 125.2 170.6 125.2s168.7-55.9 170.6-125.3c20.2-9.6 34.1-30.2 34.1-54c0-33-26.8-59.8-59.8-59.8c-13.7 0-26.3 4.6-36.4 12.4c-27.4-17-62.1-27.7-100-29.1l0-.2c0-25.4 18.9-46.5 43.4-49.9l0 0c4.4 18.8 21.3 32.8 41.5 32.8zM177.1 246.9c16.7 0 29.5 17.6 28.5 39.3s-13.5 29.6-30.3 29.6s-31.4-8.8-30.4-30.5s15.4-38.3 32.1-38.3zm190.1 38.3c1 21.7-13.7 30.5-30.4 30.5s-29.3-7.9-30.3-29.6c-1-21.7 11.8-39.3 28.5-39.3s31.2 16.6 32.1 38.3zm-48.1 56.7c-10.3 24.6-34.6 41.9-63 41.9s-52.7-17.3-63-41.9c-1.2-2.9 .8-6.2 3.9-6.5c18.4-1.9 38.3-2.9 59.1-2.9s40.7 1 59.1 2.9c3.1 .3 5.1 3.6 3.9 6.5z"],Rust:[512,512,[],"solid","M508.52,249.75,486.7,236.24c-.17-2-.34-3.93-.55-5.88l18.72-17.5a7.35,7.35,0,0,0-2.44-12.25l-24-9c-.54-1.88-1.08-3.78-1.67-5.64l15-20.83a7.35,7.35,0,0,0-4.79-11.54l-25.42-4.15c-.9-1.73-1.79-3.45-2.73-5.15l10.68-23.42a7.35,7.35,0,0,0-6.95-10.39l-25.82.91q-1.79-2.22-3.61-4.4L439,81.84A7.36,7.36,0,0,0,430.16,73L405,78.93q-2.17-1.83-4.4-3.61l.91-25.82a7.35,7.35,0,0,0-10.39-7L367.7,53.23c-1.7-.94-3.43-1.84-5.15-2.73L358.4,25.08a7.35,7.35,0,0,0-11.54-4.79L326,35.26c-1.86-.59-3.75-1.13-5.64-1.67l-9-24a7.35,7.35,0,0,0-12.25-2.44l-17.5,18.72c-1.95-.21-3.91-.38-5.88-.55L262.25,3.48a7.35,7.35,0,0,0-12.5,0L236.24,25.3c-2,.17-3.93.34-5.88.55L212.86,7.13a7.35,7.35,0,0,0-12.25,2.44l-9,24c-1.89.55-3.79,1.08-5.66,1.68l-20.82-15a7.35,7.35,0,0,0-11.54,4.79l-4.15,25.41c-1.73.9-3.45,1.79-5.16,2.73L120.88,42.55a7.35,7.35,0,0,0-10.39,7l.92,25.81c-1.49,1.19-3,2.39-4.42,3.61L81.84,73A7.36,7.36,0,0,0,73,81.84L78.93,107c-1.23,1.45-2.43,2.93-3.62,4.41l-25.81-.91a7.42,7.42,0,0,0-6.37,3.26,7.35,7.35,0,0,0-.57,7.13l10.66,23.41c-.94,1.7-1.83,3.43-2.73,5.16L25.08,153.6a7.35,7.35,0,0,0-4.79,11.54l15,20.82c-.59,1.87-1.13,3.77-1.68,5.66l-24,9a7.35,7.35,0,0,0-2.44,12.25l18.72,17.5c-.21,1.95-.38,3.91-.55,5.88L3.48,249.75a7.35,7.35,0,0,0,0,12.5L25.3,275.76c.17,2,.34,3.92.55,5.87L7.13,299.13a7.35,7.35,0,0,0,2.44,12.25l24,9c.55,1.89,1.08,3.78,1.68,5.65l-15,20.83a7.35,7.35,0,0,0,4.79,11.54l25.42,4.15c.9,1.72,1.79,3.45,2.73,5.14L42.56,391.12a7.35,7.35,0,0,0,.57,7.13,7.13,7.13,0,0,0,6.37,3.26l25.83-.91q1.77,2.22,3.6,4.4L73,430.16A7.36,7.36,0,0,0,81.84,439L107,433.07q2.18,1.83,4.41,3.61l-.92,25.82a7.35,7.35,0,0,0,10.39,6.95l23.43-10.68c1.69.94,3.42,1.83,5.14,2.73l4.15,25.42a7.34,7.34,0,0,0,11.54,4.78l20.83-15c1.86.6,3.76,1.13,5.65,1.68l9,24a7.36,7.36,0,0,0,12.25,2.44l17.5-18.72c1.95.21,3.92.38,5.88.55l13.51,21.82a7.35,7.35,0,0,0,12.5,0l13.51-21.82c2-.17,3.93-.34,5.88-.56l17.5,18.73a7.36,7.36,0,0,0,12.25-2.44l9-24c1.89-.55,3.78-1.08,5.65-1.68l20.82,15a7.34,7.34,0,0,0,11.54-4.78l4.15-25.42c1.72-.9,3.45-1.79,5.15-2.73l23.42,10.68a7.35,7.35,0,0,0,10.39-6.95l-.91-25.82q2.22-1.79,4.4-3.61L430.16,439a7.36,7.36,0,0,0,8.84-8.84L433.07,405q1.83-2.17,3.61-4.4l25.82.91a7.23,7.23,0,0,0,6.37-3.26,7.35,7.35,0,0,0,.58-7.13L458.77,367.7c.94-1.7,1.83-3.43,2.73-5.15l25.42-4.15a7.35,7.35,0,0,0,4.79-11.54l-15-20.83c.59-1.87,1.13-3.76,1.67-5.65l24-9a7.35,7.35,0,0,0,2.44-12.25l-18.72-17.5c.21-1.95.38-3.91.55-5.87l21.82-13.51a7.35,7.35,0,0,0,0-12.5Zm-151,129.08A13.91,13.91,0,0,0,341,389.51l-7.64,35.67A187.51,187.51,0,0,1,177,424.44l-7.64-35.66a13.87,13.87,0,0,0-16.46-10.68l-31.51,6.76a187.38,187.38,0,0,1-16.26-19.21H258.3c1.72,0,2.89-.29,2.89-1.91V309.55c0-1.57-1.17-1.91-2.89-1.91H213.47l.05-34.35H262c4.41,0,23.66,1.28,29.79,25.87,1.91,7.55,6.17,32.14,9.06,40,2.89,8.82,14.6,26.46,27.1,26.46H407a187.3,187.3,0,0,1-17.34,20.09Zm25.77,34.49A15.24,15.24,0,1,1,368,398.08h.44A15.23,15.23,0,0,1,383.24,413.32Zm-225.62-.68a15.24,15.24,0,1,1-15.25-15.25h.45A15.25,15.25,0,0,1,157.62,412.64ZM69.57,234.15l32.83-14.6a13.88,13.88,0,0,0,7.06-18.33L102.69,186h26.56V305.73H75.65A187.65,187.65,0,0,1,69.57,234.15ZM58.31,198.09a15.24,15.24,0,0,1,15.23-15.25H74a15.24,15.24,0,1,1-15.67,15.24Zm155.16,24.49.05-35.32h63.26c3.28,0,23.07,3.77,23.07,18.62,0,12.29-15.19,16.7-27.68,16.7ZM399,306.71c-9.8,1.13-20.63-4.12-22-10.09-5.78-32.49-15.39-39.4-30.57-51.4,18.86-11.95,38.46-29.64,38.46-53.26,0-25.52-17.49-41.59-29.4-49.48-16.76-11-35.28-13.23-40.27-13.23H116.32A187.49,187.49,0,0,1,221.21,70.06l23.47,24.6a13.82,13.82,0,0,0,19.6.44l26.26-25a187.51,187.51,0,0,1,128.37,91.43l-18,40.57A14,14,0,0,0,408,220.43l34.59,15.33a187.12,187.12,0,0,1,.4,32.54H423.71c-1.91,0-2.69,1.27-2.69,3.13v8.82C421,301,409.31,305.58,399,306.71ZM240,60.21A15.24,15.24,0,0,1,255.21,45h.45A15.24,15.24,0,1,1,240,60.21ZM436.84,214a15.24,15.24,0,1,1,0-30.48h.44a15.24,15.24,0,0,1-.44,30.48Z"],Ubuntu:[576,512,[],"solid","M469.2 75A75.6 75.6 0 1 0 317.9 75a75.6 75.6 0 1 0 151.2 0zM154.2 240.7A75.6 75.6 0 1 0 3 240.7a75.6 75.6 0 1 0 151.2 0zM57 346C75.6 392.9 108 433 150 461.1s91.5 42.6 142 41.7c-14.7-18.6-22.9-41.5-23.2-65.2c-6.8-.9-13.3-2.1-19.5-3.4c-26.8-5.7-51.9-17.3-73.6-34s-39.3-38.1-51.7-62.5c-20.9 9.9-44.5 12.8-67.1 8.2zm395.1 89.8a75.6 75.6 0 1 0 -151.2 0 75.6 75.6 0 1 0 151.2 0zM444 351.6c18.5 14.8 31.6 35.2 37.2 58.2c33.3-41.3 52.6-92.2 54.8-145.2s-12.5-105.4-42.2-149.4c-8.6 21.5-24 39.6-43.8 51.6c15.4 28.6 22.9 60.8 21.9 93.2s-10.7 64-28 91.6zM101.1 135.4c12.4 2.7 24.3 7.5 35.1 14.3c16.6-24.2 38.9-44.1 64.8-58S255.8 70.4 285.2 70c.2-5.9 .9-11.9 2-17.7c3.6-16.7 11.1-32.3 21.8-45.5c-47.7-3.8-95.4 6-137.6 28.5S94.3 91.7 70.8 133.4c2.7-.2 5.3-.3 8-.3c7.5 0 15 .8 22.4 2.3z"],Windows:[448,512,[],"solid","M0 93.7l183.6-25.3v177.4H0V93.7zm0 324.6l183.6 25.3V268.4H0v149.9zm203.8 28L448 480V268.4H203.8v177.9zm0-380.6v180.1H448V32L203.8 65.7z"],Whatsapp:[448,512,[],"regular","M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z"],"X-Twitter":[512,512,[],"regular","M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z"],Keyboard:[576,512,[],"regular","M64 112c-8.8 0-16 7.2-16 16l0 256c0 8.8 7.2 16 16 16l448 0c8.8 0 16-7.2 16-16l0-256c0-8.8-7.2-16-16-16L64 112zM0 128C0 92.7 28.7 64 64 64l448 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 448c-35.3 0-64-28.7-64-64L0 128zM176 320l224 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-224 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16zm-72-72c0-8.8 7.2-16 16-16l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16zm16-96l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16zm64 96c0-8.8 7.2-16 16-16l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16zm16-96l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16zm64 96c0-8.8 7.2-16 16-16l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16zm16-96l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16zm64 96c0-8.8 7.2-16 16-16l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16zm16-96l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16zm64 96c0-8.8 7.2-16 16-16l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16zm16-96l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16z"],IdCard:[576,512,[],"regular","M528 160l0 256c0 8.8-7.2 16-16 16l-192 0c0-44.2-35.8-80-80-80l-64 0c-44.2 0-80 35.8-80 80l-32 0c-8.8 0-16-7.2-16-16l0-256 480 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 32zM272 256a64 64 0 1 0 -128 0 64 64 0 1 0 128 0zm104-48c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-80 0zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-80 0z"],BookUser:[576,512,[],"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 32zM208 256a64 64 0 1 0 0-128 64 64 0 1 0 0 128zm-32 32c-44.2 0-80 35.8-80 80c0 8.8 7.2 16 16 16l192 0c8.8 0 16-7.2 16-16c0-44.2-35.8-80-80-80l-64 0zM376 144c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-80 0zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-80 0z"],Copy:[448,512,[],"regular","M384 336l-192 0c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l140.1 0L400 115.9 400 320c0 8.8-7.2 16-16 16zM192 384l192 0c35.3 0 64-28.7 64-64l0-204.1c0-12.7-5.1-24.9-14.1-33.9L366.1 14.1c-9-9-21.2-14.1-33.9-14.1L192 0c-35.3 0-64 28.7-64 64l0 256c0 35.3 28.7 64 64 64zM64 128c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-32-48 0 0 32c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l32 0 0-48-32 0z"],Eye:[576,512,[],"regular","M288 80c-65.2 0-118.8 29.6-159.9 67.7C89.6 183.5 63 226 49.4 256c13.6 30 40.2 72.5 78.6 108.3C169.2 402.4 222.8 432 288 432s118.8-29.6 159.9-67.7C486.4 328.5 513 286 526.6 256c-13.6-30-40.2-72.5-78.6-108.3C406.8 109.6 353.2 80 288 80zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 336c44.2 0 80-35.8 80-80s-35.8-80-80-80c-.7 0-1.3 0-2 0c1.3 5.1 2 10.5 2 16c0 35.3-28.7 64-64 64c-5.5 0-10.9-.7-16-2c0 .7 0 1.3 0 2c0 44.2 35.8 80 80 80zm0-208a128 128 0 1 1 0 256 128 128 0 1 1 0-256z"],EyeOff:[640,512,[],"regular","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zm151 118.3C226 97.7 269.5 80 320 80c65.2 0 118.8 29.6 159.9 67.7C518.4 183.5 545 226 558.6 256c-12.6 28-36.6 66.8-70.9 100.9l-53.8-42.2c9.1-17.6 14.2-37.5 14.2-58.7c0-70.7-57.3-128-128-128c-32.2 0-61.7 11.9-84.2 31.5l-46.1-36.1zM394.9 284.2l-81.5-63.9c4.2-8.5 6.6-18.2 6.6-28.3c0-5.5-.7-10.9-2-16c.7 0 1.3 0 2 0c44.2 0 80 35.8 80 80c0 9.9-1.8 19.4-5.1 28.2zm9.4 130.3C378.8 425.4 350.7 432 320 432c-65.2 0-118.8-29.6-159.9-67.7C121.6 328.5 95 286 81.4 256c8.3-18.4 21.5-41.5 39.4-64.8L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5l-41.9-33zM192 256c0 70.7 57.3 128 128 128c13.3 0 26.1-2 38.2-5.8L302 334c-23.5-5.4-43.1-21.2-53.7-42.3l-56.1-44.2c-.2 2.8-.3 5.6-.3 8.5z"],StickyNote:[448,512,[],"regular","M64 80c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l224 0 0-80c0-17.7 14.3-32 32-32l80 0 0-224c0-8.8-7.2-16-16-16L64 80zM288 480L64 480c-35.3 0-64-28.7-64-64L0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 224 0 5.5c0 17-6.7 33.3-18.7 45.3l-90.5 90.5c-12 12-28.3 18.7-45.3 18.7l-5.5 0z"],CreditCard:[576,512,[],"regular","M512 80c8.8 0 16 7.2 16 16l0 32L48 128l0-32c0-8.8 7.2-16 16-16l448 0zm16 144l0 192c0 8.8-7.2 16-16 16L64 432c-8.8 0-16-7.2-16-16l0-192 480 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 32zm56 304c-13.3 0-24 10.7-24 24s10.7 24 24 24l48 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0zm128 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l112 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-112 0z"],Hourglass:[384,512,[],"regular","M24 0C10.7 0 0 10.7 0 24S10.7 48 24 48l8 0 0 19c0 40.3 16 79 44.5 107.5L158.1 256 76.5 337.5C48 366 32 404.7 32 445l0 19-8 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l336 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 146 352 107.3 352 67l0-19 8 0c13.3 0 24-10.7 24-24s-10.7-24-24-24L24 0zM192 289.9l81.5 81.5C293 391 304 417.4 304 445l0 19L80 464l0-19c0-27.6 11-54 30.5-73.5L192 289.9zm0-67.9l-81.5-81.5C91 121 80 94.6 80 67l0-19 224 0 0 19c0 27.6-11 54-30.5 73.5L192 222.1z"],Bell:[448,512,[],"solid","M224 0c-17.7 0-32 14.3-32 32l0 19.2C119 66 64 130.6 64 208l0 18.8c0 47-17.3 92.4-48.5 127.6l-7.4 8.3c-8.4 9.4-10.4 22.9-5.3 34.4S19.4 416 32 416l384 0c12.6 0 24-7.4 29.2-18.9s3.1-25-5.3-34.4l-7.4-8.3C401.3 319.2 384 273.9 384 226.8l0-18.8c0-77.4-55-142-128-156.8L256 32c0-17.7-14.3-32-32-32zm45.3 493.3c12-12 18.7-28.3 18.7-45.3l-64 0-64 0c0 17 6.7 33.3 18.7 45.3s28.3 18.7 45.3 18.7s33.3-6.7 45.3-18.7z"],BellOff:[640,512,[],"solid","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7l-90.2-70.7c.2-.4 .4-.9 .6-1.3c5.2-11.5 3.1-25-5.3-34.4l-7.4-8.3C497.3 319.2 480 273.9 480 226.8l0-18.8c0-77.4-55-142-128-156.8L352 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 19.2c-42.6 8.6-79 34.2-102 69.3L38.8 5.1zM406.2 416L160 222.1l0 4.8c0 47-17.3 92.4-48.5 127.6l-7.4 8.3c-8.4 9.4-10.4 22.9-5.3 34.4S115.4 416 128 416l278.2 0zm-40.9 77.3c12-12 18.7-28.3 18.7-45.3l-64 0-64 0c0 17 6.7 33.3 18.7 45.3s28.3 18.7 45.3 18.7s33.3-6.7 45.3-18.7z"],Compass:[512,512,[],"solid","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm50.7-186.9L162.4 380.6c-19.4 7.5-38.5-11.6-31-31l55.5-144.3c3.3-8.5 9.9-15.1 18.4-18.4l144.3-55.5c19.4-7.5 38.5 11.6 31 31L325.1 306.7c-3.2 8.5-9.9 15.1-18.4 18.4zM288 256a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"],File:[384,512,[],"solid","M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 288c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zm384 64l-128 0L256 0 384 128z"],MessageCircle:[512,512,[],"solid","M512 240c0 114.9-114.6 208-256 208c-37.1 0-72.3-6.4-104.1-17.9c-11.9 8.7-31.3 20.6-54.3 30.6C73.6 471.1 44.7 480 16 480c-6.5 0-12.3-3.9-14.8-9.9c-2.5-6-1.1-12.8 3.4-17.4c0 0 0 0 0 0s0 0 0 0s0 0 0 0c0 0 0 0 0 0l.3-.3c.3-.3 .7-.7 1.3-1.4c1.1-1.2 2.8-3.1 4.9-5.7c4.1-5 9.6-12.4 15.2-21.6c10-16.6 19.5-38.4 21.4-62.9C17.7 326.8 0 285.1 0 240C0 125.1 114.6 32 256 32s256 93.1 256 208z"],Inbox:[512,512,[],"solid","M121 32C91.6 32 66 52 58.9 80.5L1.9 308.4C.6 313.5 0 318.7 0 323.9L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-92.1c0-5.2-.6-10.4-1.9-15.5l-57-227.9C446 52 420.4 32 391 32L121 32zm0 64l270 0 48 192-51.2 0c-12.1 0-23.2 6.8-28.6 17.7l-14.3 28.6c-5.4 10.8-16.5 17.7-28.6 17.7l-120.4 0c-12.1 0-23.2-6.8-28.6-17.7l-14.3-28.6c-5.4-10.8-16.5-17.7-28.6-17.7L73 288 121 96z"],Mail:[512,512,[],"solid","M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48L48 64zM0 176L0 384c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-208L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z"],MailOpen:[512,512,[],"solid","M64 208.1L256 65.9 448 208.1l0 47.4L289.5 373c-9.7 7.2-21.4 11-33.5 11s-23.8-3.9-33.5-11L64 255.5l0-47.4zM256 0c-12.1 0-23.8 3.9-33.5 11L25.9 156.7C9.6 168.8 0 187.8 0 208.1L0 448c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-239.9c0-20.3-9.6-39.4-25.9-51.4L289.5 11C279.8 3.9 268.1 0 256 0z"],Mic:[384,512,[],"solid","M192 0C139 0 96 43 96 96l0 160c0 53 43 96 96 96s96-43 96-96l0-160c0-53-43-96-96-96zM64 216c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c0 89.1 66.2 162.7 152 174.4l0 33.6-48 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l72 0 72 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0 0-33.6c85.8-11.7 152-85.3 152-174.4l0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c0 70.7-57.3 128-128 128s-128-57.3-128-128l0-40z"],MicOff:[640,512,[],"solid","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L472.1 344.7c15.2-26 23.9-56.3 23.9-88.7l0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c0 21.2-5.1 41.1-14.2 58.7L416 300.8 416 96c0-53-43-96-96-96s-96 43-96 96l0 54.3L38.8 5.1zM344 430.4c20.4-2.8 39.7-9.1 57.3-18.2l-43.1-33.9C346.1 382 333.3 384 320 384c-70.7 0-128-57.3-128-128l0-8.7L144.7 210c-.5 1.9-.7 3.9-.7 6l0 40c0 89.1 66.2 162.7 152 174.4l0 33.6-48 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l72 0 72 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0 0-33.6z"],Link:[640,512,["Chain"],"solid","M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"],House:[576,512,[],"solid","M575.8 255.5c0 18-15 32.1-32 32.1l-32 0 .7 160.2c0 2.7-.2 5.4-.5 8.1l0 16.2c0 22.1-17.9 40-40 40l-16 0c-1.1 0-2.2 0-3.3-.1c-1.4 .1-2.8 .1-4.2 .1L416 512l-24 0c-22.1 0-40-17.9-40-40l0-24 0-64c0-17.7-14.3-32-32-32l-64 0c-17.7 0-32 14.3-32 32l0 64 0 24c0 22.1-17.9 40-40 40l-24 0-31.9 0c-1.5 0-3-.1-4.5-.2c-1.2 .1-2.4 .2-3.6 .2l-16 0c-22.1 0-40-17.9-40-40l0-112c0-.9 0-1.9 .1-2.8l0-69.7-32 0c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L564.8 231.5c8 7 12 15 11 24z"],Gamepad:[640,512,[],"solid","M192 64C86 64 0 150 0 256S86 448 192 448l256 0c106 0 192-86 192-192s-86-192-192-192L192 64zM496 168a40 40 0 1 1 0 80 40 40 0 1 1 0-80zM392 304a40 40 0 1 1 80 0 40 40 0 1 1 -80 0zM168 200c0-13.3 10.7-24 24-24s24 10.7 24 24l0 32 32 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-32 0 0 32c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-32-32 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l32 0 0-32z"],Camera:[512,512,[],"solid","M149.1 64.8L138.7 96 64 96C28.7 96 0 124.7 0 160L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64l-74.7 0L362.9 64.8C356.4 45.2 338.1 32 317.4 32L194.6 32c-20.7 0-39 13.2-45.5 32.8zM256 192a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"],Printer:[512,512,[],"solid","M128 0C92.7 0 64 28.7 64 64l0 96 64 0 0-96 226.7 0L384 93.3l0 66.7 64 0 0-66.7c0-17-6.7-33.3-18.7-45.3L400 18.7C388 6.7 371.7 0 354.7 0L128 0zM384 352l0 32 0 64-256 0 0-64 0-16 0-16 256 0zm64 32l32 0c17.7 0 32-14.3 32-32l0-96c0-35.3-28.7-64-64-64L64 192c-35.3 0-64 28.7-64 64l0 96c0 17.7 14.3 32 32 32l32 0 0 64c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-64zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"],Server:[512,512,[],"solid","M64 32C28.7 32 0 60.7 0 96l0 64c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-64c0-35.3-28.7-64-64-64L64 32zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm48 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zM64 288c-35.3 0-64 28.7-64 64l0 64c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-64c0-35.3-28.7-64-64-64L64 288zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm56 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z"],Calendar:[448,512,[],"solid","M96 32l0 32L48 64C21.5 64 0 85.5 0 112l0 48 448 0 0-48c0-26.5-21.5-48-48-48l-48 0 0-32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 32L160 64l0-32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192L0 192 0 464c0 26.5 21.5 48 48 48l352 0c26.5 0 48-21.5 48-48l0-272z"],Pipette:[512,512,[],"solid","M341.6 29.2L240.1 130.8l-9.4-9.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-9.4-9.4L482.8 170.4c39-39 39-102.2 0-141.1s-102.2-39-141.1 0zM55.4 323.3c-15 15-23.4 35.4-23.4 56.6l0 42.4L5.4 462.2c-8.5 12.7-6.8 29.6 4 40.4s27.7 12.5 40.4 4L89.7 480l42.4 0c21.2 0 41.6-8.4 56.6-23.4L309.4 335.9l-45.3-45.3L143.4 411.3c-3 3-7.1 4.7-11.3 4.7L96 416l0-36.1c0-4.2 1.7-8.3 4.7-11.3L221.4 247.9l-45.3-45.3L55.4 323.3z"],Scroll:[576,512,[],"solid","M0 80l0 48c0 17.7 14.3 32 32 32l16 0 48 0 0-80c0-26.5-21.5-48-48-48S0 53.5 0 80zM112 32c10 13.4 16 30 16 48l0 304c0 35.3 28.7 64 64 64s64-28.7 64-64l0-5.3c0-32.4 26.3-58.7 58.7-58.7L480 320l0-192c0-53-43-96-96-96L112 32zM464 480c61.9 0 112-50.1 112-112c0-8.8-7.2-16-16-16l-245.3 0c-14.7 0-26.7 11.9-26.7 26.7l0 5.3c0 53-43 96-96 96l176 0 96 0z"],Smartphone:[384,512,[],"solid","M16 64C16 28.7 44.7 0 80 0L304 0c35.3 0 64 28.7 64 64l0 384c0 35.3-28.7 64-64 64L80 512c-35.3 0-64-28.7-64-64L16 64zM144 448c0 8.8 7.2 16 16 16l64 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-64 0c-8.8 0-16 7.2-16 16zM304 64L80 64l0 320 224 0 0-320z"],Settings:[512,512,[],"solid","M495.9 166.6c3.2 8.7 .5 18.4-6.4 24.6l-43.3 39.4c1.1 8.3 1.7 16.8 1.7 25.4s-.6 17.1-1.7 25.4l43.3 39.4c6.9 6.2 9.6 15.9 6.4 24.6c-4.4 11.9-9.7 23.3-15.8 34.3l-4.7 8.1c-6.6 11-14 21.4-22.1 31.2c-5.9 7.2-15.7 9.6-24.5 6.8l-55.7-17.7c-13.4 10.3-28.2 18.9-44 25.4l-12.5 57.1c-2 9.1-9 16.3-18.2 17.8c-13.8 2.3-28 3.5-42.5 3.5s-28.7-1.2-42.5-3.5c-9.2-1.5-16.2-8.7-18.2-17.8l-12.5-57.1c-15.8-6.5-30.6-15.1-44-25.4L83.1 425.9c-8.8 2.8-18.6 .3-24.5-6.8c-8.1-9.8-15.5-20.2-22.1-31.2l-4.7-8.1c-6.1-11-11.4-22.4-15.8-34.3c-3.2-8.7-.5-18.4 6.4-24.6l43.3-39.4C64.6 273.1 64 264.6 64 256s.6-17.1 1.7-25.4L22.4 191.2c-6.9-6.2-9.6-15.9-6.4-24.6c4.4-11.9 9.7-23.3 15.8-34.3l4.7-8.1c6.6-11 14-21.4 22.1-31.2c5.9-7.2 15.7-9.6 24.5-6.8l55.7 17.7c13.4-10.3 28.2-18.9 44-25.4l12.5-57.1c2-9.1 9-16.3 18.2-17.8C227.3 1.2 241.5 0 256 0s28.7 1.2 42.5 3.5c9.2 1.5 16.2 8.7 18.2 17.8l12.5 57.1c15.8 6.5 30.6 15.1 44 25.4l55.7-17.7c8.8-2.8 18.6-.3 24.5 6.8c8.1 9.8 15.5 20.2 22.1 31.2l4.7 8.1c6.1 11 11.4 22.4 15.8 34.3zM256 336a80 80 0 1 0 0-160 80 80 0 1 0 0 160z"],Map:[576,512,[],"solid","M384 476.1L192 421.2l0-385.3L384 90.8l0 385.3zm32-1.2l0-386.5L543.1 37.5c15.8-6.3 32.9 5.3 32.9 22.3l0 334.8c0 9.8-6 18.6-15.1 22.3L416 474.8zM15.1 95.1L160 37.2l0 386.5L32.9 474.5C17.1 480.8 0 469.2 0 452.2L0 117.4c0-9.8 6-18.6 15.1-22.3z"],Folder:[512,512,[],"solid","M64 480H448c35.3 0 64-28.7 64-64V160c0-35.3-28.7-64-64-64H288c-10.1 0-19.6-4.7-25.6-12.8L243.2 57.6C231.1 41.5 212.1 32 192 32H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64z"],FolderOpen:[576,512,[],"solid","M384 480l48 0c11.4 0 21.9-6 27.6-15.9l112-192c5.8-9.9 5.8-22.1 .1-32.1S555.5 224 544 224l-400 0c-11.4 0-21.9 6-27.6 15.9L48 357.1 48 96c0-8.8 7.2-16 16-16l117.5 0c4.2 0 8.3 1.7 11.3 4.7l26.5 26.5c21 21 49.5 32.8 79.2 32.8L416 144c8.8 0 16 7.2 16 16l0 32 48 0 0-32c0-35.3-28.7-64-64-64L298.5 96c-17 0-33.3-6.7-45.3-18.7L226.7 50.7c-12-12-28.3-18.7-45.3-18.7L64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l23.7 0L384 480z"],FolderClosed:[512,512,[],"solid","M448 480L64 480c-35.3 0-64-28.7-64-64L0 192l512 0 0 224c0 35.3-28.7 64-64 64zm64-320L0 160 0 96C0 60.7 28.7 32 64 32l128 0c20.1 0 39.1 9.5 51.2 25.6l19.2 25.6c6 8.1 15.5 12.8 25.6 12.8l160 0c35.3 0 64 28.7 64 64z"],Function:[384,512,[],"solid","M314.7 32c-38.8 0-73.7 23.3-88.6 59.1L170.7 224 64 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l80 0L98.9 396.3c-5 11.9-16.6 19.7-29.5 19.7L32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l37.3 0c38.8 0 73.7-23.3 88.6-59.1L213.3 288 320 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-80 0 45.1-108.3c5-11.9 16.6-19.7 29.5-19.7L352 96c17.7 0 32-14.3 32-32s-14.3-32-32-32l-37.3 0z"],Stop:[384,512,[],"solid","M0 128C0 92.7 28.7 64 64 64H320c35.3 0 64 28.7 64 64V384c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128z"],Image:[512,512,[],"solid","M448 80c8.8 0 16 7.2 16 16l0 319.8-5-6.5-136-176c-4.5-5.9-11.6-9.3-19-9.3s-14.4 3.4-19 9.3L202 340.7l-30.5-42.7C167 291.7 159.8 288 152 288s-15 3.7-19.5 10.1l-80 112L48 416.3l0-.3L48 96c0-8.8 7.2-16 16-16l384 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zm80 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"],Images:[576,512,[],"solid","M160 80l352 0c8.8 0 16 7.2 16 16l0 224c0 8.8-7.2 16-16 16l-21.2 0L388.1 178.9c-4.4-6.8-12-10.9-20.1-10.9s-15.7 4.1-20.1 10.9l-52.2 79.8-12.4-16.9c-4.5-6.2-11.7-9.8-19.4-9.8s-14.8 3.6-19.4 9.8L175.6 336 160 336c-8.8 0-16-7.2-16-16l0-224c0-8.8 7.2-16 16-16zM96 96l0 224c0 35.3 28.7 64 64 64l352 0c35.3 0 64-28.7 64-64l0-224c0-35.3-28.7-64-64-64L160 32c-35.3 0-64 28.7-64 64zM48 120c0-13.3-10.7-24-24-24S0 106.7 0 120L0 344c0 75.1 60.9 136 136 136l320 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-320 0c-48.6 0-88-39.4-88-88l0-224zm208 24a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"],Info:[512,512,[],"solid","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"],Bone:[576,512,[],"solid","M153.7 144.8c6.9 16.3 20.6 31.2 38.3 31.2l192 0c17.7 0 31.4-14.9 38.3-31.2C434.4 116.1 462.9 96 496 96c44.2 0 80 35.8 80 80c0 30.4-17 56.9-42 70.4c-3.6 1.9-6 5.5-6 9.6s2.4 7.7 6 9.6c25 13.5 42 40 42 70.4c0 44.2-35.8 80-80 80c-33.1 0-61.6-20.1-73.7-48.8C415.4 350.9 401.7 336 384 336l-192 0c-17.7 0-31.4 14.9-38.3 31.2C141.6 395.9 113.1 416 80 416c-44.2 0-80-35.8-80-80c0-30.4 17-56.9 42-70.4c3.6-1.9 6-5.5 6-9.6s-2.4-7.7-6-9.6C17 232.9 0 206.4 0 176c0-44.2 35.8-80 80-80c33.1 0 61.6 20.1 73.7 48.8z"],Puzzle:[512,512,[],"solid","M192 104.8c0-9.2-5.8-17.3-13.2-22.8C167.2 73.3 160 61.3 160 48c0-26.5 28.7-48 64-48s64 21.5 64 48c0 13.3-7.2 25.3-18.8 34c-7.4 5.5-13.2 13.6-13.2 22.8c0 12.8 10.4 23.2 23.2 23.2l56.8 0c26.5 0 48 21.5 48 48l0 56.8c0 12.8 10.4 23.2 23.2 23.2c9.2 0 17.3-5.8 22.8-13.2c8.7-11.6 20.7-18.8 34-18.8c26.5 0 48 28.7 48 64s-21.5 64-48 64c-13.3 0-25.3-7.2-34-18.8c-5.5-7.4-13.6-13.2-22.8-13.2c-12.8 0-23.2 10.4-23.2 23.2L384 464c0 26.5-21.5 48-48 48l-56.8 0c-12.8 0-23.2-10.4-23.2-23.2c0-9.2 5.8-17.3 13.2-22.8c11.6-8.7 18.8-20.7 18.8-34c0-26.5-28.7-48-64-48s-64 21.5-64 48c0 13.3 7.2 25.3 18.8 34c7.4 5.5 13.2 13.6 13.2 22.8c0 12.8-10.4 23.2-23.2 23.2L48 512c-26.5 0-48-21.5-48-48L0 343.2C0 330.4 10.4 320 23.2 320c9.2 0 17.3 5.8 22.8 13.2C54.7 344.8 66.7 352 80 352c26.5 0 48-28.7 48-64s-21.5-64-48-64c-13.3 0-25.3 7.2-34 18.8C40.5 250.2 32.4 256 23.2 256C10.4 256 0 245.6 0 232.8L0 176c0-26.5 21.5-48 48-48l120.8 0c12.8 0 23.2-10.4 23.2-23.2z"],Lock:[448,512,[],"solid","M144 144l0 48 160 0 0-48c0-44.2-35.8-80-80-80s-80 35.8-80 80zM80 192l0-48C80 64.5 144.5 0 224 0s144 64.5 144 144l0 48 16 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 256c0-35.3 28.7-64 64-64l16 0z"],LockOpen:[576,512,[],"solid","M352 144c0-44.2 35.8-80 80-80s80 35.8 80 80l0 48c0 17.7 14.3 32 32 32s32-14.3 32-32l0-48C576 64.5 511.5 0 432 0S288 64.5 288 144l0 48L64 192c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-192c0-35.3-28.7-64-64-64l-32 0 0-48z"],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"],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"],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"],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"],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"],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"],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"],User:[512,512,[],"solid","M256 288A144 144 0 1 0 256 0a144 144 0 1 0 0 288zm-94.7 32C72.2 320 0 392.2 0 481.3c0 17 13.8 30.7 30.7 30.7l450.6 0c17 0 30.7-13.8 30.7-30.7C512 392.2 439.8 320 350.7 320l-189.4 0z"],HardDriveDownload:[512,512,[],"solid","M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 242.7-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7 288 32zM64 352c-35.3 0-64 28.7-64 64l0 32c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-32c0-35.3-28.7-64-64-64l-101.5 0-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352 64 352zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"],HardDriveUpload:[512,512,[],"solid","M288 109.3L288 352c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-242.7-73.4 73.4c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l128-128c12.5-12.5 32.8-12.5 45.3 0l128 128c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L288 109.3zM64 352l128 0c0 35.3 28.7 64 64 64s64-28.7 64-64l128 0c35.3 0 64 28.7 64 64l0 32c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64l0-32c0-35.3 28.7-64 64-64zM432 456a24 24 0 1 0 0-48 24 24 0 1 0 0 48z"],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"],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"],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"],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"],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"],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"],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"],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"],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"],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"],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"],VR:"VrCardboard",Script:"Scroll",Media:"PhotoFilm",CC:"ClosedCaptioning",ASL:"HandsAslInterpreting",HandRock:"HandBackFist",Chain:"Link",ChainBroken:"LinkOff",ChainOff:"LinkOff",Unlink:"LinkOff",HelpCircle:"CircleHelp",CheckCircle2:"CircleCheck"},z.LucideIconAlias={Stop:"Square",Refresh:"RefreshCw",Left:"ChevronLeft",Right:"ChevronRight",Up:"ChevronUp",Down:"ChevronDown",MenuArrows:"ChevronsUpDown",RotateForward:"RotateCw",RotateRight:"RotateCw",RotateBack:"RotateCcw",RotateLeft:"RotateCcw"};export{z as LX};
|
|
1
|
+
const e={version:"0.6.4",ready:!1,components:[],signals:{},extraCommandbarEntries:[],activeDraggable:null,MOUSE_LEFT_CLICK:0,MOUSE_MIDDLE_CLICK:1,MOUSE_RIGHT_CLICK:2,MOUSE_DOUBLE_CLICK:2,MOUSE_TRIPLE_CLICK:3,CURVE_MOVEOUT_CLAMP:0,CURVE_MOVEOUT_DELETE:1,DRAGGABLE_Z_INDEX:101};class t{constructor(e,t){this.x=e??0,this.y=t??e??0}get xy(){return[this.x,this.y]}get yx(){return[this.y,this.x]}set(e,t){this.x=e,this.y=t}add(e,s=new t){return s.set(this.x+e.x,this.y+e.y),s}sub(e,s=new t){return s.set(this.x-e.x,this.y-e.y),s}mul(e,s=new t){return e.constructor==Number&&(e=new t(e)),s.set(this.x*e.x,this.y*e.y),s}div(e,s=new t){return e.constructor==Number&&(e=new t(e)),s.set(this.x/e.x,this.y/e.y),s}abs(e=new t){return e.set(Math.abs(this.x),Math.abs(this.y)),e}dot(e){return this.x*e.x+this.y*e.y}len2(){return this.dot(this)}len(){return Math.sqrt(this.len2())}nrm(e=new t){return e.set(this.x,this.y),e.mul(1/this.len(),e)}dst(e){return e.sub(this).len()}clp(s,n,i=new t){return i.set(e.clamp(this.x,s,n),e.clamp(this.y,s,n)),i}fromArray(e){this.x=e[0],this.y=e[1]}toArray(){return this.xy}}e.vec2=t;class s{constructor(e){Object.defineProperty(s.prototype,"rgb",{get:function(){return this._rgb},set:function(e){this._fromRGB(e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hex",{get:function(){return this._hex},set:function(e){this._fromHex(e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hsv",{get:function(){return this._hsv},set:function(e){this._fromHSV(e)},enumerable:!0,configurable:!0}),this.set(e)}set(e){if("string"==typeof e&&e.startsWith("#"))this._fromHex(e);else if("r"in e&&"g"in e&&"b"in e)e.a=e.a??1,this._fromRGB(e);else{if(!("h"in e&&"s"in e&&"v"in e))throw e;e.a=e.a??1,this._fromHSV(e)}}setHSV(e){this._fromHSV(e)}setRGB(e){this._fromRGB(e)}setHex(e){this._fromHex(e)}_fromHex(t){this._fromRGB(e.hexToRgb(t))}_fromRGB(t){this._rgb=t,this._hsv=e.rgbToHsv(t),this._hex=e.rgbToHex(t),this.css=e.rgbToCss(this._rgb)}_fromHSV(t){this._hsv=t,this._rgb=e.hsvToRgb(t),this._hex=e.rgbToHex(this._rgb),this.css=e.rgbToCss(this._rgb)}}e.Color=s,e.init=async function(t={}){if(this.ready)return this.main_area;await e.loadScriptSync("https://unpkg.com/lucide@latest"),console.log(`LexGUI v${this.version}`);var s=document.createElement("div");s.id="lexroot",s.className="lexcontainer",s.tabIndex=-1,t.rootClass&&(s.className+=` ${t.rootClass}`),this.modal=document.createElement("div"),this.modal.id="modal",this.modal.classList.add("hidden-opacity"),this.modal.toggle=function(e){this.classList.toggle("hidden-opacity",e)},this.root=s,this.container=document.body,t.container&&(this.container=t.container.constructor===String?document.getElementById(t.container):t.container),this.layoutMode=t.layoutMode??"app",document.documentElement.setAttribute("data-layout",this.layoutMode),"document"==this.layoutMode&&document.addEventListener("scroll",(e=>{document.body.querySelectorAll(".lexdropdownmenu").forEach((e=>{e._updatePosition()}))})),this.container.appendChild(this.modal),t.skipRoot?this.root=document.body:this.container.appendChild(s);{const e=document.createElement("section");e.className="notifications",this.notifications=document.createElement("ol"),this.notifications.className="",this.notifications.iWidth=0,e.appendChild(this.notifications),document.body.appendChild(e),this.notifications.addEventListener("mouseenter",(()=>{this.notifications.classList.add("list")})),this.notifications.addEventListener("mouseleave",(()=>{this.notifications.classList.remove("list")}))}return s.addEventListener("dragover",(function(e){e.preventDefault()}),!1),document.addEventListener("contextmenu",(function(e){e.preventDefault()}),!1),this.DEFAULT_NAME_WIDTH="30%",this.DEFAULT_SPLITBAR_SIZE=4,this.OPEN_CONTEXTMENU_ENTRY="click",this.widgetResizeObserver=new ResizeObserver((e=>{for(const t of e){const e=t.target?.jsInstance;e&&e.onResize&&e.onResize(t.contentRect)}})),this.ready=!0,this.menubars=[],this.sidebars=[],this.commandbar=function(t){let s=document.createElement("dialog");s.className="commandbar",s.tabIndex=-1,t.appendChild(s);let n=[],i=null;s.addEventListener("keydown",(function(e){if(e.stopPropagation(),e.stopImmediatePropagation(),i=i??-1,"Escape"==e.key)this.close(),d(!0);else if("Enter"==e.key){const e=n[i];e&&(null!=e.item.checked&&(e.item.checked=!e.item.checked),this.close(),e.callback.call(window,e.item.name,e.item.checked))}else if("ArrowDown"==e.key&&i<n.length-1){i++,s.querySelectorAll(".hovered").forEach((e=>e.classList.remove("hovered"))),n[i].classList.add("hovered");let e=n[i].offsetHeight*(i+1)-r.offsetHeight;e>0&&r.scrollTo({top:e,behavior:"smooth"})}else"ArrowUp"==e.key&&i>0&&(i--,s.querySelectorAll(".hovered").forEach((e=>e.classList.remove("hovered"))),n[i].classList.add("hovered"))})),s.addEventListener("focusout",(function(e){e.relatedTarget!=e.currentTarget&&(e.stopPropagation(),e.stopImmediatePropagation(),this.close(),d(!0))})),t.addEventListener("keydown",(t=>{if(" "==t.key&&t.ctrlKey)t.stopImmediatePropagation(),t.stopPropagation(),e.setCommandbarState(!0);else for(let s of e.components){if(!e[s]||!e[s].prototype.onKeyPressed)continue;const n=e.CodeEditor.getInstances();for(let e of n)e.onKeyPressed(t)}}));const o=e.makeContainer(["100%","auto"],"flex flex-row"),l=new e.TextInput(null,"",(e=>{s._addElements(e.toLowerCase())}),{width:"100%",icon:"Search",trigger:"input",placeholder:"Search..."});o.appendChild(l.root);const a=new e.Area({width:"100%",skipAppend:!0,className:"cb-tabs"});{const e=(e,t)=>{};a.addTabs({parentClass:"p-2"}).add("All",document.createElement("div"),{selected:!0,onSelect:e})}const r=document.createElement("div");r.className="searchitembox";let c=null;const d=e=>{r.innerHTML="",n.length=0,i=null,e&&l.set("",!0)},h=(t,o,l,a)=>{if(!t.length)return;c&&c.classList.remove("last");let h=document.createElement("div");if(h.className="searchitem last",void 0!==a?.checked){const s=a.checked?e.makeIcon("Check").innerHTML:"";h.innerHTML=s+(l+t)}else h.innerHTML=l+t;h.callback=o,h.item=a,h.addEventListener("click",(s=>{null!=a.checked&&(a.checked=!a.checked),o.call(window,t,a.checked),e.setCommandbarState(!1),d(!0)})),h.addEventListener("mouseenter",(function(e){s.querySelectorAll(".hovered").forEach((e=>e.classList.remove("hovered"))),this.classList.add("hovered"),i=n.indexOf(this)})),h.addEventListener("mouseleave",(function(e){this.classList.remove("hovered")})),n.push(h),r.appendChild(h),c=h},u=(t,s,n,i)=>{if(!t)return;let o=t.name;o.toLowerCase().includes(s)&&t.callback&&h(o,t.callback,n,t);const l=t.submenu??t[o];if(l){n+=o+e.makeIcon("ChevronRight",{svgClass:"sm fg-secondary separator"}).innerHTML;for(let e of l)u(e,s,n)}};return s._addElements=t=>{d();for(let s of e.menubars)for(let e of s.items)u(e,t,"");for(let s of e.sidebars)for(let e of s.items)u(e,t,"");for(let s of e.extraCommandbarEntries){const e=s.name;e.toLowerCase().includes(t)&&h(e,s.callback,"",{})}if(e.has("CodeEditor")){const s=e.CodeEditor.getInstances();if(!s.length||!s[0].area.root.offsetHeight)return;const n=s[0].languages;for(let i of Object.keys(n)){const o="Language: "+i,l=s[0]._getFileIcon(null,n[i].ext).split(" ");let a=e.makeIcon(l[0],{svgClass:`${l.slice(0).join(" ")}`}).innerHTML;a+=o+" <span class='lang-ext'>("+n[i].ext+")</span>",o.toLowerCase().includes(t)&&h(a,(()=>{for(let e of s)e._changeLanguage(i)}),"",{})}}},s.appendChild(o),s.appendChild(a.root),s.appendChild(r),s}(this.container),t.skipRoot||t.skipDefaultArea||(this.main_area=new e.Area({id:t.id??"mainarea"})),(t.autoTheme??1)&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches&&e.setTheme("light"),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(t=>{e.setTheme(t.matches?"dark":"light")}))),this.main_area},e.setLayoutMode=function(e){this.layoutMode=e,document.documentElement.setAttribute("data-layout",this.layoutMode)},e.setCommandbarState=function(e,t=!0){const s=this.commandbar;e?(s.show(),s.querySelector("input").focus(),t&&s._addElements(void 0)):s.close()},e.message=function(t,s,n={}){if(!t)throw"No message to show";return n.modal=!0,new e.Dialog(s,(e=>{e.addTextArea(null,t,null,{disabled:!0,fitHeight:!0})}),n)},e.popup=function(t,s,n={}){if(!t)throw"No message to show";n.size=n.size??["max-content","auto"],n.class="lexpopup";const i=n.timeout||3e3,o=new e.Dialog(s,(e=>{e.addTextArea(null,t,null,{disabled:!0,fitHeight:!0})}),n);return setTimeout((()=>{o.close()}),Math.max(i,150)),o},e.prompt=function t(s,n,i,o={}){o.modal=!0,o.className="prompt";let l="";const a=new e.Dialog(n,(e=>{e.addTextArea(null,s,null,{disabled:!0,fitHeight:!0}),(o.input??1)&&e.addText(null,o.input||l,(e=>l=e),{placeholder:"..."}),e.sameLine(2),e.addButton(null,"Cancel",(()=>{o.on_cancel&&o.on_cancel(),a.close()})),e.addButton(null,o.accept||"Continue",(()=>{o.required&&""===l?(s+=s.includes("You must fill the input text.")?"":"\nYou must fill the input text.",a.close(),t(s,n,i,o)):(i&&i.call(this,l),a.close())}),{buttonClass:"primary"})}),o);return(o.input??1)&&a.root.querySelector("input").focus(),a},e.toast=function(t,s,n={}){if(!t)throw"The toast needs at least a title!";console.assert(this.notifications);const i=document.createElement("li");i.className="lextoast",i.style.translate="0 calc(100% + 30px)",this.notifications.prepend(i),e.doAsync((()=>{this.notifications.offsetWidth>this.notifications.iWidth&&(this.notifications.iWidth=Math.min(this.notifications.offsetWidth,480),this.notifications.style.width=this.notifications.iWidth+"px"),i.dataset.open=!0}),10);const o=document.createElement("div");o.className="lextoastcontent",i.appendChild(o);const l=document.createElement("div");if(l.className="title",l.innerHTML=t,o.appendChild(l),s){const e=document.createElement("div");e.className="desc",e.innerHTML=s,o.appendChild(e)}if(n.action){const t=new e.Panel;t.addButton(null,n.action.name??"Accept",n.action.callback.bind(this,i),{width:"auto",maxWidth:"150px",className:"right",buttonClass:"border"}),i.appendChild(t.root.childNodes[0])}const a=this;if(i.close=function(){this.dataset.closed=!0,e.doAsync((()=>{this.remove(),a.notifications.childElementCount||(a.notifications.style.width="unset",a.notifications.iWidth=0)}),500)},n.closable??1){const t=e.makeIcon("X",{iconClass:"closer"});t.addEventListener("click",(()=>{i.close()})),i.appendChild(t)}const r=n.timeout??3e3;-1!=r&&e.doAsync((()=>{i.close()}),r)},e.badge=function(e,t,s={}){const n=document.createElement("div");return n.innerHTML=e,n.className="lexbadge "+(t??""),Object.assign(n.style,s.style??{}),s.asElement?n:n.outerHTML},e.makeElement=function(e,t,s,n,i={}){const o=document.createElement(e);return o.className=t??"",o.innerHTML=s??"",Object.assign(o.style,i),n&&(n.attach?n.attach(o):n.appendChild(o)),o},e.makeContainer=function(t,s,n,i,o={}){const l=e.makeElement("div","lexcontainer "+(s??""),n,i,o);return l.style.width=t&&t[0]?t[0]:"100%",l.style.height=t&&t[1]?t[1]:"100%",l},e.asTooltip=function(t,s,n={}){console.assert(t,"You need a trigger to generate a tooltip!"),t.dataset.disableTooltip=!(n.active??1);let i=null;t.addEventListener("mouseenter",(function(o){"true"!=t.dataset.disableTooltip&&(e.root.querySelectorAll(".lextooltip").forEach((e=>e.remove())),i=document.createElement("div"),i.className="lextooltip",i.innerHTML=s,e.doAsync((()=>{const t=[0,0],s=this.getBoundingClientRect(),o=n.offset??6;let l=!0;switch(n.side??"top"){case"left":t[0]+=s.x-i.offsetWidth-o,l=!1;break;case"right":t[0]+=s.x+s.width+o,l=!1;break;case"top":t[1]+=s.y-i.offsetHeight-o,l=!0;break;case"bottom":t[1]+=s.y+s.height+o,l=!0}l?t[0]+=s.x+.5*s.width-.5*i.offsetWidth:t[1]+=s.y+.5*s.height-.5*i.offsetHeight,t[0]=e.clamp(t[0],0,window.innerWidth-i.offsetWidth-4),t[1]=e.clamp(t[1],0,window.innerHeight-i.offsetHeight-4),i.style.left=`${t[0]}px`,i.style.top=`${t[1]}px`})),e.root.appendChild(i))})),t.addEventListener("mouseleave",(function(e){i&&i.remove()}))};e.IEvent=class{constructor(e,t,s){this.name=e,this.value=t,this.domEvent=s}};class n{static NONE=0;static NODE_SELECTED=1;static NODE_DELETED=2;static NODE_DBLCLICKED=3;static NODE_CONTEXTMENU=4;static NODE_DRAGGED=5;static NODE_RENAMED=6;static NODE_VISIBILITY=7;static NODE_CARETCHANGED=8;constructor(e,t,s){this.type=e||n.NONE,this.node=t,this.value=s,this.multiple=!1,this.panel=null}string(){switch(this.type){case n.NONE:return"tree_event_none";case n.NODE_SELECTED:return"tree_event_selected";case n.NODE_DELETED:return"tree_event_deleted";case n.NODE_DBLCLICKED:return"tree_event_dblclick";case n.NODE_CONTEXTMENU:return"tree_event_contextmenu";case n.NODE_DRAGGED:return"tree_event_dragged";case n.NODE_RENAMED:return"tree_event_renamed";case n.NODE_VISIBILITY:return"tree_event_visibility";case n.NODE_CARETCHANGED:return"tree_event_caretchanged"}}}e.TreeEvent=n,e.emit=function(t,s,n={}){const i=e.signals[t];if(!i)return;const o=n.target;if(o)o[t]&&o[t].call(o,s);else for(let o of i)if(o instanceof e.Widget)o.set(s,n.skipCallback??!0);else if(o.constructor===Function){o(null,s)}else{const e=o[t];console.assert(e,`No callback registered with _${t}_ signal`),e.bind(o)(s)}},e.addSignal=function(t,s,n){s[t]=n,e.signals[t]||(e.signals[t]=[]),e.signals[t].indexOf(s)>-1||e.signals[t].push(s)};class i{static activeElement=!1;constructor(t,s,n={}){console.assert(t,"Popover needs a DOM element as trigger!"),i.activeElement?i.activeElement.destroy():(this._trigger=t,t.classList.add("triggered"),t.active=this,this._windowPadding=4,this.side=n.side??"bottom",this.align=n.align??"center",this.avoidCollisions=n.avoidCollisions??!0,this.root=document.createElement("div"),this.root.dataset.side=this.side,this.root.tabIndex="1",this.root.className="lexpopover",e.root.appendChild(this.root),this.root.addEventListener("keydown",(e=>{"Escape"==e.key&&(e.preventDefault(),e.stopPropagation(),this.destroy())})),s&&(s=[].concat(s)).forEach((e=>{const t=e.root??e;this.root.appendChild(t),e.onPopover&&e.onPopover()})),i.activeElement=this,e.doAsync((()=>{this._adjustPosition(),this.root.focus(),this._onClick=e=>{e.target&&(this.root.contains(e.target)||e.target==this._trigger)||this.destroy()},document.body.addEventListener("mousedown",this._onClick,!0),document.body.addEventListener("focusin",this._onClick,!0)}),10))}destroy(){this._trigger.classList.remove("triggered"),delete this._trigger.active,document.body.removeEventListener("mousedown",this._onClick,!0),document.body.removeEventListener("focusin",this._onClick,!0),this.root.remove(),i.activeElement=null}_adjustPosition(){const t=[0,0];{const e=this._trigger.getBoundingClientRect();let s=!0;switch(this.side){case"left":t[0]+=e.x-this.root.offsetWidth,s=!1;break;case"right":t[0]+=e.x+e.width,s=!1;break;case"top":t[1]+=e.y-this.root.offsetHeight,s=!0;break;case"bottom":t[1]+=e.y+e.height,s=!0}switch(this.align){case"start":s?t[0]+=e.x:t[1]+=e.y;break;case"center":s?t[0]+=e.x+.5*e.width-.5*this.root.offsetWidth:t[1]+=e.y+.5*e.height-.5*this.root.offsetHeight;break;case"end":s?t[0]+=e.x-this.root.offsetWidth+e.width:t[1]+=e.y-this.root.offsetHeight+e.height}}this.avoidCollisions&&(t[0]=e.clamp(t[0],0,window.innerWidth-this.root.offsetWidth-this._windowPadding),t[1]=e.clamp(t[1],0,window.innerHeight-this.root.offsetHeight-this._windowPadding)),this.root.style.left=`${t[0]}px`,this.root.style.top=`${t[1]}px`}}e.Popover=i;e.Sheet=class{constructor(t,s,n={}){this.side=n.side??"left",this.root=document.createElement("div"),this.root.dataset.side=this.side,this.root.tabIndex="1",this.root.role="dialog",this.root.className="lexsheet fixed z-100 bg-primary",e.root.appendChild(this.root),this.root.addEventListener("keydown",(e=>{"Escape"==e.key&&(e.preventDefault(),e.stopPropagation(),this.destroy())})),s&&(s=[].concat(s)).forEach((e=>{const t=e.root??e;this.root.appendChild(t),e.onSheet&&e.onSheet()})),e.doAsync((()=>{switch(e.modal.toggle(!1),this.side){case"left":this.root.style.left=0,this.root.style.width=t,this.root.style.height="100%";break;case"right":this.root.style.right=0,this.root.style.width=t,this.root.style.height="100%";break;case"top":this.root.style.top=0,this.root.style.width="100%",this.root.style.height=t;break;case"bottom":this.root.style.bottom=0,this.root.style.width="100%",this.root.style.height=t}this.root.focus(),this._onClick=e=>{e.target&&this.root.contains(e.target)||this.destroy()},document.body.addEventListener("mousedown",this._onClick,!0),document.body.addEventListener("focusin",this._onClick,!0)}),10)}destroy(){document.body.removeEventListener("mousedown",this._onClick,!0),document.body.removeEventListener("focusin",this._onClick,!0),this.root.remove(),e.modal.toggle(!0)}};class o{static currentMenu=!1;constructor(t,s,n={}){if(console.assert(t,"DropdownMenu needs a DOM element as trigger!"),o.currentMenu||!s?.length)return o.currentMenu.destroy(),void(this.invalid=!0);this._trigger=t,t.classList.add("triggered"),t.ddm=this,this._items=s,this._windowPadding=4,this.side=n.side??"bottom",this.align=n.align??"center",this.avoidCollisions=n.avoidCollisions??!0,this.onBlur=n.onBlur,this.inPlace=!1,this.root=document.createElement("div"),this.root.id="root",this.root.dataset.side=this.side,this.root.tabIndex="1",this.root.className="lexdropdownmenu",e.root.appendChild(this.root),this._create(this._items),o.currentMenu=this,e.doAsync((()=>{this._adjustPosition(),this.root.focus(),this._onClick=e=>{(!e.target||null==e.target.closest(".lexdropdownmenu")&&e.target!=this._trigger)&&this.destroy(!0)},document.body.addEventListener("mousedown",this._onClick,!0),document.body.addEventListener("focusin",this._onClick,!0)}),10)}destroy(t){this._trigger.classList.remove("triggered"),delete this._trigger.ddm,document.body.removeEventListener("mousedown",this._onClick,!0),document.body.removeEventListener("focusin",this._onClick,!0),e.root.querySelectorAll(".lexdropdownmenu").forEach((e=>{e.remove()})),o.currentMenu=null,t&&this.onBlur&&this.onBlur()}_create(t,s){if(s){const t=s.getBoundingClientRect();let n=document.createElement("div");n.tabIndex="1",n.className="lexdropdownmenu",n.dataset.id=s.dataset.id,n.dataset.side="right",e.root.appendChild(n),n.currentParent=s,s=n,e.doAsync((()=>{const s=[t.x+t.width,t.y];this.avoidCollisions&&(s[0]=e.clamp(s[0],0,window.innerWidth-n.offsetWidth-this._windowPadding),s[1]=e.clamp(s[1],0,window.innerHeight-n.offsetHeight-this._windowPadding)),n.style.left=`${s[0]}px`,n.style.top=`${s[1]}px`}),10)}else s=this.root;let n=t.filter((e=>null!=e?.icon||null!=e?.checked)).length>0;for(let i of t){if(!i){this._addSeparator(s);continue}const t=i.name??i,o=e.getSupportedDOMName(t);if(s.querySelector("#"+o))continue;const l=document.createElement("div");if(l.className="lexdropdownmenuitem"+(i.name?"":" label")+(i.disabled?" disabled":"")+` ${i.className??""}`,l.dataset.id=o,l.innerHTML=`<span>${t}</span>`,l.tabIndex="1",s.appendChild(l),i.constructor===String)continue;if(i.submenu){const t=e.makeIcon("Right",{svgClass:"sm"});l.appendChild(t)}else if(i.kbd){i.kbd=[].concat(i.kbd);const t=e.makeKbd(i.kbd);l.appendChild(t),document.addEventListener("keydown",(e=>{if(!this._trigger.ddm)return;e.preventDefault();let t=i.kbd.join("");t=1==t.length?t.toLowerCase():t,t==e.key&&l.click()}))}const a=i.disabled??!1;if(i.icon){const t=e.makeIcon(i.icon,{svgClass:a?"fg-tertiary":i.className});l.prepend(t)}else null==i.checked&&n&&l.classList.add("pl-8");if(!a){if(null!=i.checked){const s=new e.Checkbox(o+"_entryChecked",i.checked,(e=>{const s=i.callback;s&&s.call(this,t,e,l)}),{className:"accent"}),n=s.root.querySelector("input");n.classList.add("ml-auto"),l.appendChild(n),l.addEventListener("click",(e=>{"checkbox"!=e.target.type&&(n.checked=!n.checked,s.set(n.checked))}))}else l.addEventListener("click",(()=>{const e=i.callback;e&&e.call(this,t,l),this.destroy(!0)}));l.addEventListener("mouseover",(t=>{let n=l.dataset.id,o=s;for(;o;)n+="/"+o.dataset.id,o=o.currentParent?.parentElement;if(e.root.querySelectorAll(".lexdropdownmenu").forEach((e=>{n.includes(e.dataset.id)||(e.currentParent.built=!1,e.remove())})),i.submenu&&this.inPlace){if(l.built)return;l.built=!0,this._create(i.submenu,l)}t.stopPropagation()}))}}}_adjustPosition(){const t=[0,0];{const e=this._trigger.getBoundingClientRect();let s=!0;switch(this.side){case"left":t[0]+=e.x-this.root.offsetWidth,s=!1;break;case"right":t[0]+=e.x+e.width,s=!1;break;case"top":t[1]+=e.y-this.root.offsetHeight,s=!0;break;case"bottom":t[1]+=e.y+e.height,s=!0}switch(this.align){case"start":s?t[0]+=e.x:t[1]+=e.y;break;case"center":s?t[0]+=e.x+.5*e.width-.5*this.root.offsetWidth:t[1]+=e.y+.5*e.height-.5*this.root.offsetHeight;break;case"end":s?t[0]+=e.x-this.root.offsetWidth+e.width:t[1]+=e.y-this.root.offsetHeight+e.height}}this.avoidCollisions&&(t[0]=e.clamp(t[0],0,window.innerWidth-this.root.offsetWidth-this._windowPadding),t[1]=e.clamp(t[1],0,window.innerHeight-this.root.offsetHeight-this._windowPadding)),this.root.style.left=`${t[0]}px`,this.root.style.top=`${t[1]}px`,this.inPlace=!0}_addSeparator(e){const t=document.createElement("div");t.className="separator",(e=e??this.root).appendChild(t)}}e.DropdownMenu=o,e.addDropdownMenu=function(e,t,s){const n=new o(e,t,s);return n.invalid?null:n};e.ColorPicker=class{static currentPicker=!1;constructor(t,n={}){this.colorModel=n.colorModel??"Hex",this.useAlpha=n.useAlpha??!1,this.callback=n.onChange,this.callback||console.warn("Define a callback in _options.onChange_ to allow getting new Color values!"),this.root=document.createElement("div"),this.root.className="lexcolorpicker",this.markerHalfSize=8,this.markerSize=2*this.markerHalfSize,this.currentColor=new s(t);const i=new s({h:this.currentColor.hsv.h,s:1,v:1});this.colorPickerBackground=document.createElement("div"),this.colorPickerBackground.className="lexcolorpickerbg",this.colorPickerBackground.style.backgroundColor=`rgb(${i.css.r}, ${i.css.g}, ${i.css.b})`,this.root.appendChild(this.colorPickerBackground),this.intSatMarker=document.createElement("div"),this.intSatMarker.className="lexcolormarker",this.intSatMarker.style.backgroundColor=this.currentColor.hex,this.colorPickerBackground.appendChild(this.intSatMarker);let o=null,l=t=>{const s=t.movementX,n=t.movementY,i=t.x-o.x,l=t.y-o.y;0!=s&&(i>=0||s<0)&&(i<this.colorPickerBackground.offsetWidth||s>0)&&(this.intSatMarker.style.left=e.clamp(parseInt(this.intSatMarker.style.left)+s,-this.markerHalfSize,this.colorPickerBackground.offsetWidth-this.markerHalfSize)+"px"),0!=n&&(l>=0||n<0)&&(l<this.colorPickerBackground.offsetHeight||n>0)&&(this.intSatMarker.style.top=e.clamp(parseInt(this.intSatMarker.style.top)+n,-this.markerHalfSize,this.colorPickerBackground.offsetHeight-this.markerHalfSize)+"px"),this._positionToSv(parseInt(this.intSatMarker.style.left),parseInt(this.intSatMarker.style.top)),this._updateColorValue(),t.stopPropagation(),t.preventDefault()},a=e=>{var t=this.root.ownerDocument;t.removeEventListener("mousemove",l),t.removeEventListener("mouseup",a),document.body.classList.remove("noevents")};this.colorPickerBackground.addEventListener("mousedown",(e=>{var t=this.root.ownerDocument;t.addEventListener("mousemove",l),t.addEventListener("mouseup",a),document.body.classList.add("noevents"),e.stopImmediatePropagation(),e.stopPropagation();const s=e.offsetX-this.markerHalfSize;this.intSatMarker.style.left=s+"px";const n=e.offsetY-this.markerHalfSize;this.intSatMarker.style.top=n+"px",this._positionToSv(s,n),this._updateColorValue(),o=this.colorPickerBackground.getBoundingClientRect()}));const r=e.makeContainer(["100%","auto"],"flex flex-row gap-1 items-center","",this.root);window.EyeDropper&&r.appendChild(new e.Button(null,"eyedrop",(async()=>{const e=new EyeDropper;try{const t=await e.open();this.fromHexColor(t.sRGBHex)}catch(e){}}),{icon:"Pipette",buttonClass:"bg-none",title:"Sample Color"}).root);const c=e.makeContainer(["100%","100%"],"flex flex-col gap-2","",r);this.colorPickerTracker=document.createElement("div"),this.colorPickerTracker.className="lexhuetracker",c.appendChild(this.colorPickerTracker),this.hueMarker=document.createElement("div"),this.hueMarker.className="lexcolormarker",this.hueMarker.style.backgroundColor=`rgb(${i.css.r}, ${i.css.g}, ${i.css.b})`,this.colorPickerTracker.appendChild(this.hueMarker);const d=t=>{this.hueMarker.style.left=t+"px",this.currentColor.hsv.h=e.remapRange(t,0,this.colorPickerTracker.offsetWidth-this.markerSize,0,360);const n=new s({h:this.currentColor.hsv.h,s:1,v:1});this.hueMarker.style.backgroundColor=`rgb(${n.css.r}, ${n.css.g}, ${n.css.b})`,this.colorPickerBackground.style.backgroundColor=`rgb(${n.css.r}, ${n.css.g}, ${n.css.b})`,this._updateColorValue()};let h=null,u=t=>{const s=t.movementX,n=t.x-h.x;if(0!=s&&(n>=this.markerHalfSize||s<0)&&(n<this.colorPickerTracker.offsetWidth-this.markerHalfSize||s>0)){const t=e.clamp(parseInt(this.hueMarker.style.left)+s,0,this.colorPickerTracker.offsetWidth-this.markerSize);d(t)}t.stopPropagation(),t.preventDefault()},p=e=>{var t=this.root.ownerDocument;t.removeEventListener("mousemove",u),t.removeEventListener("mouseup",p),document.body.classList.remove("noevents")};if(this.colorPickerTracker.addEventListener("mousedown",(t=>{const s=this.root.ownerDocument;s.addEventListener("mousemove",u),s.addEventListener("mouseup",p),document.body.classList.add("noevents"),t.stopImmediatePropagation(),t.stopPropagation();const n=e.clamp(t.offsetX-this.markerHalfSize,0,this.colorPickerTracker.offsetWidth-this.markerSize);d(n),h=this.colorPickerTracker.getBoundingClientRect()})),this.useAlpha){this.alphaTracker=document.createElement("div"),this.alphaTracker.className="lexalphatracker",this.alphaTracker.style.color=`rgb(${this.currentColor.css.r}, ${this.currentColor.css.g}, ${this.currentColor.css.b})`,c.appendChild(this.alphaTracker),this.alphaMarker=document.createElement("div"),this.alphaMarker.className="lexcolormarker",this.alphaMarker.style.backgroundColor=`rgb(${this.currentColor.css.r}, ${this.currentColor.css.g}, ${this.currentColor.css.b},${this.currentColor.css.a})`,this.alphaTracker.appendChild(this.alphaMarker);const t=t=>{this.alphaMarker.style.left=t+"px",this.currentColor.hsv.a=e.remapRange(t,0,this.alphaTracker.offsetWidth-this.markerSize,0,1),this._updateColorValue(),this.alphaMarker.style.backgroundColor=`rgb(${this.currentColor.css.r}, ${this.currentColor.css.g}, ${this.currentColor.css.b},${this.currentColor.css.a})`};let s=null,n=n=>{const l=this.root.ownerDocument;l.addEventListener("mousemove",i),l.addEventListener("mouseup",o),document.body.classList.add("noevents"),n.stopImmediatePropagation(),n.stopPropagation();const a=e.clamp(n.offsetX-this.markerHalfSize,0,this.alphaTracker.offsetWidth-this.markerSize);t(a),s=this.alphaTracker.getBoundingClientRect()},i=n=>{const i=n.movementX,o=n.x-s.x;if(0!=i&&(o>=this.markerHalfSize||i<0)&&(o<this.alphaTracker.offsetWidth-this.markerHalfSize||i>0)){const s=e.clamp(parseInt(this.alphaMarker.style.left)+i,0,this.alphaTracker.offsetWidth-this.markerSize);t(s)}n.stopPropagation(),n.preventDefault()},o=e=>{var t=this.root.ownerDocument;t.removeEventListener("mousemove",i),t.removeEventListener("mouseup",o),document.body.classList.remove("noevents")};this.alphaTracker.addEventListener("mousedown",n)}const m=e.makeContainer(["100%","auto"],"flex flex-row gap-1","",this.root);m.appendChild(new e.Select(null,["CSS","Hex","HSV","RGB"],this.colorModel,(e=>{this.colorModel=e,this._updateColorValue(null,!0)})).root),this.labelWidget=new e.TextInput(null,"",null,{inputClass:"bg-none",fit:!0,disabled:!0}),m.appendChild(this.labelWidget.root);{const t=new e.Button(null,"copy",(async()=>{navigator.clipboard.writeText(this.labelWidget.value()),t.root.querySelector("input[type='checkbox']").style.pointerEvents="none",e.doAsync((()=>{t.root.swap(!0),t.root.querySelector("input[type='checkbox']").style.pointerEvents="auto"}),3e3)}),{swap:"Check",icon:"Copy",buttonClass:"bg-none",className:"ml-auto",title:"Copy"});t.root.querySelector(".swap-on svg").addClass("fg-success"),m.appendChild(t.root)}this._updateColorValue(t,!0),e.doAsync(this._placeMarkers.bind(this)),this.onPopover=this._placeMarkers.bind(this)}_placeMarkers(){this._svToPosition(this.currentColor.hsv.s,this.currentColor.hsv.v);const t=e.remapRange(this.currentColor.hsv.h,0,360,0,this.colorPickerTracker.offsetWidth-this.markerSize);if(this.hueMarker.style.left=t+"px",this.useAlpha){const t=e.remapRange(this.currentColor.hsv.a,0,1,0,this.alphaTracker.offsetWidth-this.markerSize);this.alphaMarker.style.left=t+"px"}}_svToPosition(t,s){this.intSatMarker.style.left=`${e.remapRange(t,0,1,-this.markerHalfSize,this.colorPickerBackground.offsetWidth-this.markerHalfSize)}px`,this.intSatMarker.style.top=`${e.remapRange(1-s,0,1,-this.markerHalfSize,this.colorPickerBackground.offsetHeight-this.markerHalfSize)}px`}_positionToSv(t,s){this.currentColor.hsv.s=e.remapRange(t,-this.markerHalfSize,this.colorPickerBackground.offsetWidth-this.markerHalfSize,0,1),this.currentColor.hsv.v=1-e.remapRange(s,-this.markerHalfSize,this.colorPickerBackground.offsetHeight-this.markerHalfSize,0,1)}_updateColorValue(e,t=!1){this.currentColor.set(e??this.currentColor.hsv),this.callback&&!t&&this.callback(this.currentColor),this.intSatMarker.style.backgroundColor=this.currentColor.hex,this.useAlpha&&(this.alphaTracker.style.color=`rgb(${this.currentColor.css.r}, ${this.currentColor.css.g}, ${this.currentColor.css.b})`);const s=(e,t=2)=>e.toFixed(t).replace(/([0-9]+(\.[0-9]+[1-9])?)(\.?0+$)/,"$1");if("CSS"==this.colorModel){const{r:e,g:t,b:n,a:i}=this.currentColor.css;this.labelWidget.set(`rgb${this.useAlpha?"a":""}(${e},${t},${n}${this.useAlpha?","+s(i):""})`)}else if("Hex"==this.colorModel)this.labelWidget.set((this.useAlpha?this.currentColor.hex:this.currentColor.hex.substr(0,7)).toUpperCase());else if("HSV"==this.colorModel){const{h:e,s:t,v:n,a:i}=this.currentColor.hsv,o=[Math.floor(e)+"º",Math.floor(100*t)+"%",Math.floor(100*n)+"%"];this.useAlpha&&o.push(s(i)),this.labelWidget.set(o.join(" "))}else{const{r:e,g:t,b:n,a:i}=this.currentColor.rgb,o=[s(e),s(t),s(n)];this.useAlpha&&o.push(s(i)),this.labelWidget.set(o.join(" "))}}fromHexColor(t){this.currentColor.setHex(t);const{h:n,s:i,v:o}=this.currentColor.hsv;this._svToPosition(i,o);const l=new s({h:n,s:1,v:1});this.hueMarker.style.backgroundColor=this.colorPickerBackground.style.backgroundColor=`rgb(${l.css.r}, ${l.css.g}, ${l.css.b})`,this.hueMarker.style.left=e.remapRange(n,0,360,-this.markerHalfSize,this.colorPickerTracker.offsetWidth-this.markerHalfSize)+"px",this._updateColorValue(t)}};e.Calendar=class{constructor(t,s={}){if(this.root=e.makeContainer(["256px","auto"],"p-1 text-md"),this.onChange=s.onChange,this.untilToday=s.untilToday,this.fromToday=s.fromToday,t)this.fromDateString(t);else{const e=new Date;this.month=e.getMonth()+1,this.year=e.getFullYear(),this.fromMonthYear(this.month,this.year)}}_getCurrentDate(){return{day:this.day,month:this.month,year:this.year,fullDate:this.getFullDate()}}_previousMonth(){this.month=Math.max(0,this.month-1),0==this.month&&(this.month=12,this.year--),this.fromMonthYear(this.month,this.year)}_nextMonth(){this.month=Math.min(this.month+1,12),12==this.month&&(this.month=0,this.year++),this.fromMonthYear(this.month,this.year)}refresh(){this.root.innerHTML="";{const t=e.makeContainer(["100%","auto"],"flex flex-row p-1","",this.root),s=e.makeIcon("Left",{title:"Previous Month",iconClass:"border p-1 rounded hover:bg-secondary",svgClass:"sm"});t.appendChild(s),s.addEventListener("click",(()=>{this._previousMonth()})),e.makeContainer(["100%","auto"],"text-center font-medium select-none",`${this.monthName} ${this.year}`,t);const n=e.makeIcon("Right",{title:"Next Month",iconClass:"border p-1 rounded hover:bg-secondary",svgClass:"sm"});t.appendChild(n),n.addEventListener("click",(()=>{this._nextMonth()}))}{const e=document.createElement("table");e.className="w-full",this.root.appendChild(e);{const t=document.createElement("thead");e.appendChild(t);const s=document.createElement("tr");for(const e of["Mo","Tu","We","Th","Fr","Sa","Su"]){const t=document.createElement("th");t.className="fg-tertiary text-sm font-normal select-none",t.innerHTML=`<span>${e}</span>`,s.appendChild(t)}t.appendChild(s)}{const t=document.createElement("tbody");e.appendChild(t);for(let e=0;e<6;e++){const s=document.createElement("tr"),n=this.calendarDays.slice(7*e,7*e+7);for(const e of n){const t=document.createElement("th");t.className="leading-loose font-normal rounded select-none cursor-pointer";const n=new Date(`${this.month}/${e.day}/${this.year}`),i=new Date,o=!this.untilToday||n.getTime()<i.getTime(),l=!this.fromToday||n.getTime()>i.getTime(),a=e.currentMonth&&o&&l;this.currentDate&&e.day==this.currentDate.day&&this.month==this.currentDate.month&&this.year==this.currentDate.year&&e.currentMonth?t.className+=" bg-contrast fg-contrast":t.className+=` ${a?"fg-primary":"fg-tertiary"} hover:bg-secondary`,t.innerHTML=`<span>${e.day}</span>`,s.appendChild(t),a&&t.addEventListener("click",(()=>{this.day=e.day,this.currentDate=this._getCurrentDate(),this.onChange&&this.onChange(this.currentDate)}))}t.appendChild(s)}}}}fromDateString(e){const t=e.split("/");this.day=parseInt(t[0]),this.month=parseInt(t[1]),this.year=parseInt(t[2]),this.currentDate=this._getCurrentDate(),this.fromMonthYear(this.month,this.year)}fromMonthYear(e,t){e--,t=t??(new Date).getFullYear();const s=new Date(t,e,1).getDay(),n=0===s?6:s-1,i=new Date(t,e+1,0).getDate(),o=new Date(0===e?t-1:t,(0===e?11:e-1)+1,0).getDate(),l=[];for(let e=n-1;e>=0;e--)l.push({day:o-e,currentMonth:!1});for(let e=1;e<=i;e++)l.push({day:e,currentMonth:!0});const a=42-l.length;for(let e=1;e<=a;e++)l.push({day:e,currentMonth:!1});this.monthName=this.getMonthName(e),this.firstDay=n,this.daysInMonth=i,this.calendarDays=l,this.refresh()}getMonthName(e,t="en-US"){return new Intl.DateTimeFormat(t,{month:"long"}).format(new Date(2e3,e,1))}getFullDate(){return`${this.monthName} ${this.day}${this._getOrdinalSuffix(this.day)}, ${this.year}`}_getOrdinalSuffix(e){if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}};class l{static TAB_ID=0;constructor(e,t={}){this.onclose=t.onclose;let s=document.createElement("div");s.className="lexareatabs "+(t.fit?"fit":"row");const n=t.folding??!1;n&&s.classList.add("folding");let i=this;s.addEventListener("dragenter",(function(e){e.preventDefault(),this.classList.add("dockingtab")})),s.addEventListener("dragleave",(function(e){e.preventDefault(),this.contains(e.relatedTarget)||this.classList.remove("dockingtab")})),s.addEventListener("drop",(function(e){e.preventDefault();const t=e.dataTransfer.getData("source"),s=document.getElementById(t);if(!s)return;const n=s.parentElement,o=e.target,l=o.getBoundingClientRect();e.offsetX<.5*l.width?this.insertBefore(s,o):o.nextElementSibling?this.insertBefore(s,o.nextElementSibling):this.appendChild(s);{n.childNodes.forEach(((e,t)=>e.childIndex=t-1));const t=/true/.test(e.dataTransfer.getData("fit"));if(n.childElementCount==(t?2:1))n.lastChild.click();else{(n.querySelector(".selected")??n.childNodes[t?1:0]).click()}}this.childNodes.forEach(((e,t)=>e.childIndex=t-1));const a=document.getElementById(t+"_content");i.area.attach(a),this.classList.remove("dockingtab"),s.instance=i,s.click(),i.tabs[s.dataset.name]=a})),e.root.classList.add("lexareatabscontainer");const[o,l]=e.split({type:"vertical",sizes:t.sizes??"auto",resize:!1,top:2});if(o.attach(s),t.parentClass&&(s.parentElement.className+=` ${t.parentClass}`),this.area=l,this.area.root.className+=" lexareatabscontent",t.contentClass&&(this.area.root.className+=` ${t.contentClass}`),this.selected=null,this.root=s,this.tabs={},this.tabDOMs={},t.fit){let e=document.createElement("span");e.className="lexareatab thumb",this.thumb=e,this.root.appendChild(e);new ResizeObserver((e=>{const t=this.thumb.item;if(t){var s=this.thumb.style.transition;this.thumb.style.transition="none",this.thumb.style.transform="translate( "+t.childIndex*t.offsetWidth+"px )",this.thumb.style.width=t.offsetWidth+"px",this.thumb.offsetHeight,this.thumb.style.transition=s}})).observe(this.area.root)}if(n){this.folded=!0,this.folding=n,"up"==n&&e.root.insertChildAtIndex(e.sections[1].root,0);new ResizeObserver((t=>{for(const s of t){const t=s.contentRect;e.parentArea.sections[0].root.style.height="calc(100% - "+(42+t.height)+"px )"}})).observe(this.area.root),this.area.root.classList.add("folded")}}add(t,s,n={}){let i=n.selected??!1;if(i){this.root.querySelectorAll("span").forEach((e=>e.classList.remove("selected")));(this.area.root.querySelector(":scope > .pseudoparent-tabs")??this.area.root).querySelectorAll(":scope > .lextabcontent").forEach((e=>e.style.display="none"))}i=!Object.keys(this.tabs).length&&!this.folding||i;let o=s.root?s.root:s;if(o.originalDisplay=o.style.display,o.style.display=i?o.originalDisplay:"none",o.classList.add("lextabcontent"),n.icon)if(n.icon.includes(".")){const e="https://raw.githubusercontent.com/jxarco/lexgui.js/master/";n.icon="<img src='"+(e+n.icon)+"'>"}else{const t=n.icon.split(" ");n.icon=e.makeIcon(t[0],{svgClass:"sm "+t.slice(0).join(" ")}).innerHTML}let a=document.createElement("span");a.dataset.name=t,a.className="lexareatab flex flex-row gap-1"+(i?" selected":""),a.innerHTML=(n.icon??"")+t,a.id=t.replace(/\s/g,"")+l.TAB_ID++,a.title=n.title??"",a.selected=i??!1,a.fixed=n.fixed,a.instance=this,o.id=a.id+"_content",a.selected&&(this.selected=t),a.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation();const t=a.instance;if(!a.fixed){const e=a.selected;a.parentElement.querySelectorAll("span").forEach((e=>e.selected=!1)),a.selected=!e,a.parentElement.querySelectorAll("span").forEach((e=>e.classList.remove("selected"))),a.classList.toggle("selected",t.folding&&a.selected);(t.area.root.querySelector(":scope > .pseudoparent-tabs")??t.area.root).querySelectorAll(":scope > .lextabcontent").forEach((e=>e.style.display="none")),o.style.display=o.originalDisplay,t.selected=a.dataset.name}t.folding&&(t.folded=a.selected,t.area.root.classList.toggle("folded",!t.folded)),n.onSelect&&n.onSelect(e,a.dataset.name),t.thumb&&(t.thumb.style.transform="translate( "+a.childIndex*a.offsetWidth+"px )",t.thumb.style.width=a.offsetWidth+"px",t.thumb.item=a)})),a.addEventListener("contextmenu",(e=>{e.preventDefault(),e.stopPropagation(),n.onContextMenu&&n.onContextMenu(e,a.dataset.name)})),n.allowDelete&&(a.addEventListener("mousedown",(t=>{t.button==e.MOUSE_MIDDLE_CLICK&&t.preventDefault()})),a.addEventListener("mouseup",(t=>{t.preventDefault(),t.stopPropagation(),t.button==e.MOUSE_MIDDLE_CLICK&&this.delete(a.dataset.name)}))),a.setAttribute("draggable",!0),a.addEventListener("dragstart",(e=>{const t=!!this.thumb;a.parentElement.childNodes.length!=(t?2:1)?(e.dataTransfer.setData("source",e.target.id),e.dataTransfer.setData("fit",t)):e.preventDefault()})),a.childIndex=this.root.childElementCount-1,this.root.appendChild(a),this.area.attach(o),this.tabDOMs[t]=a,this.tabs[t]=s,setTimeout((()=>{n.onCreate&&n.onCreate.call(this,this.area.root.getBoundingClientRect()),i&&this.thumb&&(this.thumb.style.transform="translate( "+a.childIndex*a.offsetWidth+"px )",this.thumb.style.width=a.offsetWidth+"px",this.thumb.item=a)}),10)}select(e){this.tabDOMs[e]&&this.tabDOMs[e].click()}delete(e){const t=this.tabDOMs[e];if(!t||t.fixed)return;this.onclose&&this.onclose(e),this.tabDOMs[e].remove(),delete this.tabDOMs[e],this.tabs[e].remove(),delete this.tabs[e];const s=this.root.lastChild;s&&!s.fixed&&this.root.lastChild.click()}}e.Tabs=l;e.Footer=class{constructor(t={}){const s=document.createElement("footer");s.className=`lexfooter ${t.className??""}`;const n=document.createElement("div");if(n.style.minHeight="48px",n.className="w-full",s.appendChild(n),t.columns&&t.columns.constructor==Array){const e=document.createElement("div");e.className="columns",e.style.gridTemplateColumns="1fr ".repeat(t.columns.length),n.appendChild(e);for(let s of t.columns){const t=document.createElement("div");t.className="col",e.appendChild(t);const n=document.createElement("h2");if(n.innerHTML=s.title,t.appendChild(n),!s.items||!s.items.length)continue;const i=document.createElement("ul");t.appendChild(i);for(let e of s.items){const t=document.createElement("li");t.innerHTML=`<a class="" href="${e.link}">${e.title}</a>`,i.appendChild(t)}}}if(t.credits||t.socials){const s=document.createElement("div");if(s.className="credits-and-socials",n.appendChild(s),t.credits){const e=document.createElement("p");e.innerHTML=t.credits,s.appendChild(e)}if(t.socials){const n=document.createElement("div");n.className="socials flex flex-row gap-1 my-2 justify-end";for(let s of t.socials){const t=e.makeIcon(s.icon,{title:s.title,svgClass:"xl"});t.href=s.link,t.target="_blank",n.appendChild(t)}s.appendChild(n)}}(t.parent??document.body).appendChild(s),s.previousElementSibling.style.flexGrow="1",this.root=s}};class a{static _last_id=0;constructor(t,s,n={}){s||console.warn("Content is empty, add some widgets using 'callback' parameter!"),this._oncreate=s,this.id=e.guidGenerator();const i=n.size??[],o=n.position??[],l=n.draggable??!0,r=n.dockable??!1,c=n.modal??!1;let d=document.createElement("dialog");d.className="lexdialog "+(n.className??""),d.id=n.id??"dialog"+a._last_id++,e.root.appendChild(d),e.doAsync((()=>{c?d.showModal():d.show()}),10);let h=this;const u=document.createElement("div");if(t&&(u.className="lexdialogtitle",u.innerHTML=t,u.setAttribute("draggable",!1),d.appendChild(u)),n.closable??1){this.close=()=>{n.onBeforeClose&&n.onBeforeClose(this),n.onclose?n.onclose(this.root):(d.close(),e.doAsync((()=>{h.panel.clear(),d.remove()}),150))};const s=e.makeIcon("X",{title:"Close",iconClass:"lexdialogcloser"});s.addEventListener("click",this.close);const i=e.makeIcon("Minus",{title:"Dock",iconClass:"ml-auto mr-2"});i.addEventListener("click",(()=>{const e=this.branchData,t=e.panel,s=t.root.childElementCount,n=t.branch(e.name,{closed:e.closed});n.widgets=e.widgets;for(let e of n.widgets)n.content.appendChild(e.root);e.childIndex<s&&t.root.insertChildAtIndex(n.root,e.childIndex),this.close()})),t?(r&&u.appendChild(i),u.appendChild(s)):(s.classList.add("notitle"),d.appendChild(s))}const p=new e.Panel;p.root.classList.add("lexdialogcontent"),t||p.root.classList.add("notitle"),s&&s.call(this,p),d.appendChild(p.root),p.root.querySelectorAll(".lexbranch").forEach((e=>e.classList.add("dialog"))),this.panel=p,this.root=d,this.title=u,l&&e.makeDraggable(d,Object.assign({targetClass:"lexdialogtitle"},n)),i.length&&"string"!=typeof i[0]&&(i[0]+="px"),i.length&&"string"!=typeof i[1]&&(i[1]+="px"),d.style.width=i[0]?i[0]:"25%",d.style.height=i[1]?i[1]:"auto",d.style.translate=n.position?"unset":"-50% -50%",n.size&&(this.size=i),d.style.left=o[0]??"50%",d.style.top=o[1]??"50%",p.root.style.height=t?"calc( 100% - "+(u.offsetHeight+30)+"px )":"calc( 100% - 51px )"}destroy(){this.root.remove()}refresh(){this.panel.root.innerHTML="",this._oncreate.call(this,this.panel)}setPosition(e,t){this.root.style.left=e+"px",this.root.style.top=t+"px"}setTitle(e){const t=this.root.querySelector(".lexdialogtitle");t&&(t.innerText=e)}}e.Dialog=a;class r extends a{static TOP=0;static BOTTOM=1;constructor(t,s,n={}){n.draggable=n.draggable??!1,n.closable=n.closable??!1;super(t,s,n);let i=this;if(e.addSignal("@on_branch_closed",this.panel,(e=>{this.dock_pos==r.BOTTOM&&(this.root.style.top="calc(100% - "+(this.root.offsetHeight+3)+"px)")})),this.root.classList.add("pocket"),this.root.style.translate="none",this.root.style.top="0",this.root.style.left="unset",n.position||(this.root.style.right="3px",this.root.style.top="3px"),this.panel.root.style.width="100%",this.panel.root.style.height="100%",this.dock_pos=r.TOP,this.minimized=!1,this.title.tabIndex=-1,this.title.addEventListener("click",(e=>{this.title.eventCatched?this.title.eventCatched=!1:(this.size&&(this.minimized?this.root.style.height=this.size[1]:this.root.style.height="auto"),this.root.classList.toggle("minimized"),this.minimized=!this.minimized,this.dock_pos==r.BOTTOM&&(i.root.style.top=this.root.classList.contains("minimized")?"calc(100% - "+(i.title.offsetHeight+6)+"px)":"calc(100% - "+(i.root.offsetHeight+3)+"px)"))})),!n.draggable){const e=n.float;if(e)for(let t=0;t<e.length;t++){switch(e[t]){case"b":this.root.style.top="calc(100% - "+(this.root.offsetHeight+3)+"px)";break;case"l":this.root.style.right="unset",this.root.style.left=n.position?n.position[1]:"3px"}}this.root.classList.add("dockable"),this.title.addEventListener("keydown",(function(e){e.ctrlKey&&(i.root.style.right="unset","ArrowLeft"==e.key?i.root.style.left="0px":"ArrowRight"==e.key?i.root.style.left="calc(100% - "+(i.root.offsetWidth+3)+"px)":"ArrowUp"==e.key?(i.root.style.top="0px",i.dock_pos=r.TOP):"ArrowDown"==e.key&&(i.root.style.top="calc(100% - "+(i.root.offsetHeight+3)+"px)",i.dock_pos=r.BOTTOM))}))}}}e.PocketDialog=r;class c{constructor(e,t,s={}){if(document.body.querySelectorAll(".lexcontextmenu").forEach((e=>e.remove())),this.root=document.createElement("div"),this.root.className="lexcontextmenu",this.root.style.left=e.x-48+"px",this.root.style.top=e.y-8+"px",this.root.addEventListener("mouseleave",(function(){this.remove()})),this.items=[],this.colors={},t){const e={};e[t]=[],e.className="cmtitle",e.icon=s.icon,this.items.push(e)}}_adjustPosition(e,t,s=!1){let n=e.getBoundingClientRect();if(s){let s=window.innerWidth-n.right;s<0&&(e.style.left=e.offsetLeft+(s-t)+"px"),s=window.innerHeight-(n.top+n.height),s<0&&(e.style.top=e.offsetTop+(s-t+20)+"px")}else{let s=n.width;n.left<0?e.style.left=t+"px":window.innerWidth-n.right<0&&(e.style.left=window.innerWidth-s-t+"px"),n.top<0?e.style.top=t+"px":n.top+n.height>window.innerHeight&&(e.style.top=window.innerHeight-n.height-t+"px")}}_createSubmenu(e,t,s,n){this.root.querySelectorAll(".lexcontextmenu").forEach((e=>e.remove()));let i=document.createElement("div");i.className="lexcontextmenu",s.appendChild(i);for(let s=0;s<e[t].length;++s){const o=e[t][s],l=Object.keys(o)[0];this._createEntry(o,l,i,n)}const o=s.getBoundingClientRect();i.style.left=o.x+o.width+"px",i.style.marginTop="-31px",this._adjustPosition(i,6)}_createEntry(t,s,n,i){const o=t[s].length;let l=document.createElement("div");l.className="lexmenuboxentry"+(t.className?" "+t.className:""),l.id=t.id??"eId"+e.getSupportedDOMName(s),l.innerHTML="";const a=t.icon;a&&l.appendChild(e.makeIcon(a,{svgClass:"sm"}));const r=t.disabled;if(l.innerHTML+="<div class='lexentryname"+(r?" disabled":"")+"'>"+s+"</div>",n.appendChild(l),this.colors[s]&&(l.style.borderColor=this.colors[s]),""==s)return void(l.className+=" cmseparator");if(l.addEventListener("click",(n=>{if(n.stopPropagation(),n.stopImmediatePropagation(),r)return;const a=t.callback;a&&(a.call(this,s,l),this.root.remove()),o&&"click"==e.OPEN_CONTEXTMENU_ENTRY&&this._createSubmenu(t,s,l,++i)})),!o)return;const c=e.makeIcon("Menu",{svgClass:"sm"});l.appendChild(c),"mouseover"==e.OPEN_CONTEXTMENU_ENTRY&&l.addEventListener("mouseover",(e=>{l.built||(l.built=!0,this._createSubmenu(t,s,l,++i),e.stopPropagation())})),l.addEventListener("mouseleave",(()=>{i=-1,n.querySelectorAll(".lexcontextmenu").forEach((e=>e.remove()))}))}onCreate(){e.doAsync((()=>this._adjustPosition(this.root,6)))}add(t,s={}){s.constructor==Function&&(s={callback:s});const n=(t+="").split("/"),i=n[n.length-1];this.colors[i]=s.color;let o=0;const l=(e,t)=>{if(null==e)return;let i=null;if(t.forEach((t=>{const s=Object.keys(t).find((t=>t==e));s&&(i=t[s])})),i)l(n[o++],i);else{let i={};i[e]=[];const a=n[o++];a||(i.id=s.id,i.icon=s.icon,i.callback=s.callback,i.disabled=s.disabled??!1),t.push(i),l(a,i[e])}};l(n[o++],this.items);const a=e=>{let t=Object.keys(e)[0],s=e[t];if(s.length){if(null==s.find((e=>Object.keys(e)[0]==t))){const s={};s[t]=[],s.className="cmtitle",e[t].unshift(s)}for(let s of e[t]){let e=Object.keys(s)[0];for(let t=0;t<s[e].length;++t)a(s)}}};for(let e of this.items)a(e);for(let t of this.items){let s=Object.keys(t)[0],n="eId"+e.getSupportedDOMName(s);const i="#"+(t.id??n);this.root.querySelector(i)||this._createEntry(t,s,this.root,-1)}}setColor(t,s){"#"!==s[0]&&(s=e.rgbToHex(s)),this.colors[t]=s}}e.ContextMenu=c,e.addContextMenu=function(t,s,n,i){const o=new c(s,t,i);return e.root.appendChild(o.root),n&&n(o),o.onCreate(),o};e.CanvasCurve=class{constructor(t,s={}){let n=document.createElement("div");n.className="curve "+(s.className?s.className:""),n.style.minHeight="50px",n.style.width=s.width||"100%",n.style.minWidth="50px",n.style.minHeight="20px",n.bgcolor=s.bgColor||e.getThemeColor("global-intense-background"),n.pointscolor=s.pointsColor||e.getThemeColor("global-color-accent"),n.activepointscolor=s.activePointsColor||e.getThemeColor("global-color-accent-light"),n.linecolor=s.lineColor||"#555",n.value=t||[],n.xrange=s.xrange||[0,1],n.yrange=s.yrange||[0,1],n.defaulty=null!=s.defaulty?s.defaulty:0,n.no_overlap=s.noOverlap||!1,n.show_samples=s.showSamples||0,n.allow_add_values=s.allowAddValues??!0,n.draggable_x=s.draggableX??!0,n.draggable_y=s.draggableY??!0,n.smooth=(s.smooth&&"number"==typeof s.smooth?s.smooth:.3)||!1,n.move_out=s.moveOutAction??e.CURVE_MOVEOUT_DELETE,e.addSignal("@on_new_color_scheme",((t,i)=>{n.bgcolor=s.bgColor||e.getThemeColor("global-intense-background"),n.pointscolor=s.pointsColor||e.getThemeColor("global-color-accent"),n.activepointscolor=s.activePointsColor||e.getThemeColor("global-color-accent-light"),this.redraw()})),this.element=n;let i=document.createElement("canvas");function o(e){return[i.width*(e[0]-n.xrange[0])/n.xrange[1],i.height*(e[1]-n.yrange[0])/n.yrange[1]]}function l(e){return[e[0]*n.xrange[1]/i.width+n.xrange[0],e[1]*n.yrange[1]/i.height+n.yrange[0]]}i.width=s.width||200,i.height=s.height||50,n.appendChild(i),this.canvas=i,n.addEventListener("mousedown",(function(t){document.addEventListener("mousemove",c),document.addEventListener("mouseup",d);var s=i.getBoundingClientRect(),h=t.clientX-s.left,m=t.clientY-s.top;if(a=function(e,t){for(var s=1e5,i=-1,l=0;l<n.value.length;l++){var a=u([e,t],o(n.value[l]));a<s&&a<8&&(s=a,i=l)}return i}(h,i.height-m),t.button==e.MOUSE_LEFT_CLICK&&-1==a&&n.allow_add_values){var g=l([h,i.height-m]);n.value.push(g),p(),a=n.value.indexOf(g)}r=[h,m],n.redraw(),t.preventDefault(),t.stopPropagation()})),n.getValueAt=function(e){if(e<n.xrange[0]||e>n.xrange[1])return n.defaulty;let t=[n.xrange[0],n.defaulty],s=0;for(let i=0;i<n.value.length;i+=1){let o=n.value[i];if(e==o[0])return o[1];if(e<o[0])return s=(e-t[0])/(o[0]-t[0]),t[1]*(1-s)+o[1]*s;t=o}return v=[n.xrange[1],n.defaulty],s=(e-t[0])/(v[0]-t[0]),t[1]*(1-s)+v[1]*s},n.resample=function(e){let t=[],s=(n.xrange[1]-n.xrange[0])/e;for(let e=n.xrange[0];e<=n.xrange[1];e+=s)t.push(n.getValueAt(e));return t},n.addValue=function(e){for(let t=0;t<n.value;t++){if(!(n.value[t][0]<e[0]))return n.value.splice(t,0,e),void redraw()}n.value.push(e),redraw()};let a=-1;n.redraw=function(t={}){t.value&&(n.value=t.value),t.xrange&&(n.xrange=t.xrange),t.yrange&&(n.yrange=t.yrange),t.smooth&&(n.smooth=t.smooth);var s=i.getContext("2d");s.setTransform(1,0,0,1,0,0),s.translate(0,i.height),s.scale(1,-1),s.fillStyle=n.bgcolor,s.fillRect(0,0,i.width,i.height),s.strokeStyle=n.linecolor,s.beginPath();var l=o([n.xrange[0],n.defaulty]);s.moveTo(l[0],l[1]);let r=[l[0],l[1]];for(var c in n.value){l=o(n.value[c]),r.push(l[0]),r.push(l[1]),n.smooth||s.lineTo(l[0],l[1])}l=o([n.xrange[1],n.defaulty]),r.push(l[0]),r.push(l[1]),n.smooth?e.UTILS.drawSpline(s,r,n.smooth):(s.lineTo(l[0],l[1]),s.stroke());for(c=0;c<n.value.length;c+=1){l=o(n.value[c]),s.fillStyle=a==c?n.activepointscolor:n.pointscolor,s.beginPath(),s.arc(l[0],l[1],a==c?4:3,0,2*Math.PI),s.fill()}if(n.show_samples){var d=n.resample(n.show_samples);s.fillStyle="#888";for(c=0;c<d.length;c+=1){l=o([c*((n.xrange[1]-n.xrange[0])/n.show_samples)+n.xrange[0],d[c]]),s.beginPath(),s.arc(l[0],l[1],2,0,2*Math.PI),s.fill()}}};var r=[0,0];function c(t){var s=i.getBoundingClientRect(),o=t.clientX-s.left,c=t.clientY-s.top;o<0?o=0:o>i.width&&(o=i.width),c<0?c=0:c>i.height&&(c=i.height);const m=[t.clientX-s.left,t.clientY-s.top];if(-1!=a&&u(m,[o,c])>.5*i.height){if(n.move_out==e.CURVE_MOVEOUT_DELETE)n.value.splice(a,1);else{const e=[m[0]-o,m[1]-c];let t=n.value[a];t[0]=0==e[0]?t[0]:e[0]<0?n.xrange[0]:n.xrange[1],t[1]=0==e[1]?t[1]:e[1]<0?n.yrange[1]:n.yrange[0]}d(t)}else{var g=l([-(n.draggable_x?r[0]-o:0),n.draggable_y?r[1]-c:0]);if(-1!=a){var f=n.xrange[0],v=n.xrange[1];n.no_overlap&&(a>0&&(f=n.value[a-1][0]),a<n.value.length-1&&(v=n.value[a+1][0]));var C=n.value[a];C[0]+=g[0],C[1]+=g[1],C[0]<f?C[0]=f:C[0]>v&&(C[0]=v),C[1]<n.yrange[0]?C[1]=n.yrange[0]:C[1]>n.yrange[1]&&(C[1]=n.yrange[1])}p(),n.redraw(),r[0]=o,r[1]=c,h(t),t.preventDefault(),t.stopPropagation()}}function d(e){a=-1,n.redraw(),document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",d),h(e),e.preventDefault(),e.stopPropagation()}function h(e){s.callback&&s.callback.call(n,n.value,e)}function u(e,t){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function p(){var e=null;-1!=a&&(e=n.value[a]),n.value.sort((function(e,t){return e[0]-t[0]})),e&&(a=n.value.indexOf(e))}return n.redraw(),this}redraw(e={}){this.element.redraw(e)}};e.CanvasDial=class{constructor(t,s,n={}){let i=document.createElement("div");i.className="dial "+(n.className?n.className:""),i.style.width=i.style.height=n.size||"100%",i.style.minWidth=i.style.minHeight="50px",i.bgcolor=n.bgColor||e.getThemeColor("global-dark-background"),i.pointscolor=n.pointsColor||e.getThemeColor("global-color-accent-light"),i.linecolor=n.lineColor||"#555",i.value=s||[],i.xrange=n.xrange||[0,1],i.yrange=n.yrange||[0,1],i.defaulty=null!=n.defaulty?n.defaulty:0,i.no_overlap=n.noOverlap||!1,i.show_samples=n.showSamples||0,i.allow_add_values=n.allowAddValues??!0,i.draggable_x=n.draggableX??!0,i.draggable_y=n.draggableY??!0,i.smooth=(n.smooth&&"number"==typeof n.smooth?n.smooth:.3)||!1,i.move_out=n.moveOutAction??e.CURVE_MOVEOUT_DELETE,this.element=i;let o=document.createElement("canvas");function l(e,t){return Math.pow(e[0],2),[o.width*(e[0]-i.xrange[0])/i.xrange[1],o.height*(e[1]-i.yrange[0])/i.yrange[1]]}function a(e){return[e[0]*i.xrange[1]/o.width+i.xrange[0],e[1]*i.yrange[1]/o.height+i.yrange[0]]}o.width=o.height=n.size||200,i.appendChild(o),this.canvas=o,i.addEventListener("mousedown",(function(t){document.addEventListener("mousemove",d),document.addEventListener("mouseup",h);var s=o.getBoundingClientRect(),n=t.clientX-s.left,u=t.clientY-s.top;if(r=function(e,t){for(var s=1e5,n=-1,o=0;o<i.value.length;o++){var a=p([e,t],l(i.value[o]));a<s&&a<8&&(s=a,n=o)}return n}(n,o.height-u),t.button==e.MOUSE_LEFT_CLICK&&-1==r&&i.allow_add_values){var g=a([n,o.height-u]);i.value.push(g),m(),r=i.value.indexOf(g)}c=[n,u],i.redraw(),t.preventDefault(),t.stopPropagation()})),i.getValueAt=function(e){if(e<i.xrange[0]||e>i.xrange[1])return i.defaulty;for(var t=[i.xrange[0],i.defaulty],s=0,n=0;n<i.value.length;n+=1){var o=i.value[n];if(e==o[0])return o[1];if(e<o[0])return s=(e-t[0])/(o[0]-t[0]),t[1]*(1-s)+o[1]*s;t=o}return o=[i.xrange[1],i.defaulty],s=(e-t[0])/(o[0]-t[0]),t[1]*(1-s)+o[1]*s},i.resample=function(e){for(var t=[],s=(i.xrange[1]-i.xrange[0])/e,n=i.xrange[0];n<=i.xrange[1];n+=s)t.push(i.getValueAt(n));return t},i.addValue=function(e){for(var t=0;t<i.value;t++){if(!(i.value[t][0]<e[0]))return i.value.splice(t,0,e),void redraw()}i.value.push(e),redraw()};var r=-1;i.redraw=function(e={}){e.value&&(i.value=e.value),e.xrange&&(i.xrange=e.xrange),e.yrange&&(i.yrange=e.yrange),e.smooth&&(i.smooth=e.smooth);var t=o.getContext("2d");t.setTransform(1,0,0,1,0,0),t.translate(0,o.height),t.scale(1,-1),t.fillStyle=i.bgcolor,t.fillRect(0,0,o.width,o.height),t.strokeStyle=i.linecolor,t.beginPath();var s=l([i.xrange[0],i.defaulty]);t.moveTo(s[0],s[1]);let n=[s[0],s[1]];for(var a in i.value){s=l(i.value[a]),n.push(s[0]),n.push(s[1])}s=l([i.xrange[1],i.defaulty]),n.push(s[0]),n.push(s[1]);s=l([0,0]),t.fillStyle="gray",t.beginPath(),t.arc(s[0],s[1],3,0,2*Math.PI),t.fill();for(a=0;a<i.value.length;a+=1){s=l(i.value[a]),t.fillStyle=r==a?"white":i.pointscolor,t.beginPath(),t.arc(s[0],s[1],r==a?4:3,0,2*Math.PI),t.fill()}if(i.show_samples){var c=i.resample(i.show_samples);t.fillStyle="#888";for(a=0;a<c.length;a+=1){s=l([a*((i.xrange[1]-i.xrange[0])/i.show_samples)+i.xrange[0],c[a]]),t.beginPath(),t.arc(s[0],s[1],2,0,2*Math.PI),t.fill()}}};var c=[0,0];function d(t){var s=o.getBoundingClientRect(),n=t.clientX-s.left,l=t.clientY-s.top;n<0?n=0:n>o.width&&(n=o.width),l<0?l=0:l>o.height&&(l=o.height);const d=[t.clientX-s.left,t.clientY-s.top];if(-1!=r&&p(d,[n,l])>.5*o.height){if(i.move_out==e.CURVE_MOVEOUT_DELETE)i.value.splice(r,1);else{const e=[d[0]-n,d[1]-l];let t=i.value[r];t[0]=0==e[0]?t[0]:e[0]<0?i.xrange[0]:i.xrange[1],t[1]=0==e[1]?t[1]:e[1]<0?i.yrange[1]:i.yrange[0]}h(t)}else{var g=a([-(i.draggable_x?c[0]-n:0),i.draggable_y?c[1]-l:0]);if(-1!=r){var f=i.xrange[0],v=i.xrange[1];i.no_overlap&&(r>0&&(f=i.value[r-1][0]),r<i.value.length-1&&(v=i.value[r+1][0]));var C=i.value[r];C[0]+=g[0],C[1]+=g[1],C[0]<f?C[0]=f:C[0]>v&&(C[0]=v),C[1]<i.yrange[0]?C[1]=i.yrange[0]:C[1]>i.yrange[1]&&(C[1]=i.yrange[1])}m(),i.redraw(),c[0]=n,c[1]=l,u(t),t.preventDefault(),t.stopPropagation()}}function h(e){r=-1,i.redraw(),document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",h),u(e),e.preventDefault(),e.stopPropagation()}function u(e){n.callback&&n.callback.call(i,i.value,e)}function p(e,t){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function m(){var e=null;-1!=r&&(e=i.value[r]),i.value.sort((function(e,t){return e[0]-t[0]})),e&&(r=i.value.indexOf(e))}return i.redraw(),this}redraw(e={}){this.element.redraw(e)}};class d{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]];static GRID_SIZE=64;constructor(t,s,n={}){this.circular=n.circular??!1,this.showNames=n.showNames??!0,this.size=n.size??[200,200],this.points=t??[],this.callback=s,this.weights=[],this.weightsObj={},this.currentPosition=new e.vec2(0,0),this.circleCenter=[0,0],this.circleRadius=1,this.margin=8,this.dragging=!1,this._valuesChanged=!0,this._selectedPoint=null,this.root=e.makeContainer(["auto","auto"]),this.root.tabIndex="1",this.root.addEventListener("mousedown",(function(e){var t=i.root.ownerDocument;return t.addEventListener("mouseup",l),t.addEventListener("mousemove",o),e.stopPropagation(),e.preventDefault(),i.dragging=!0,!0}));const i=this;function o(t){if(!i.dragging)return;const s=i.margin,n=i.root.getBoundingClientRect();let o=new e.vec2;o.set(t.x-n.x-.5*i.size[0],t.y-n.y-.5*i.size[1]);var l=i.currentPosition;if(l.set(e.clamp(o.x/(.5*i.size[0]-s),-1,1),e.clamp(o.y/(.5*i.size[1]-s),-1,1)),i.circular){const t=new e.vec2(0,0);l.dst(t)>1&&(l=l.nrm())}return i.renderToCanvas(i.canvas.getContext("2d",{willReadFrequently:!0}),i.canvas),i.computeWeights(l),i.callback&&i.callback(i.weightsObj,i.weights,l),!0}function l(e){i.dragging=!1;var t=i.root.ownerDocument;t.removeEventListener("mouseup",l),t.removeEventListener("mousemove",o)}this.canvas=document.createElement("canvas"),this.canvas.width=this.size[0],this.canvas.height=this.size[1],this.root.appendChild(this.canvas);const a=this.canvas.getContext("2d",{willReadFrequently:!0});this.renderToCanvas(a,this.canvas)}computeWeights(t){if(!this.points.length)return;let s=this._precomputedWeights;s&&!this._valuesChanged||(s=this.precomputeWeights());let n=this.weights;n.length=this.points.length;for(var i=0;i<n.length;++i)n[i]=0;const o=d.GRID_SIZE;let l=0,a=new e.vec2;for(var r=0;r<o;++r)for(var c=0;c<o;++c){a.set(c/o*2-1,r/o*2-1);var h=2*c+r*o*2,u=s[h];t.dst(a)<s[h+1]+.001&&(n[u]+=1,l++)}for(i=0;i<n.length;++i)n[i]/=l,this.weightsObj[this.points[i].name]=n[i];return n}precomputeWeights(){this._valuesChanged=!1;const t=this.points.length,s=d.GRID_SIZE,n=2*s*s;let i=new e.vec2;this._precomputedWeights&&this._precomputedWeights.length==n||(this._precomputedWeights=new Float32Array(n));let o=this._precomputedWeights;this._precomputedWeightsGridSize=s;for(let n=0;n<s;++n)for(let l=0;l<s;++l){let a=-1,r=1e5;for(let o=0;o<t;++o){i.set(l/s*2-1,n/s*2-1);let t=new e.vec2;t.fromArray(this.points[o].pos);let c=i.dst(t);c>r||(a=o,r=c)}o[2*l+2*n*s]=a,o[2*l+2*n*s+1]=r}return o}precomputeWeightsToImage(t){if(!this.points.length)return null;const s=d.GRID_SIZE;var n=this._precomputedWeights;n&&!this._valuesChanged&&this._precomputedWeightsGridSize==s||(n=this.precomputeWeights());var i=this.imageCanvas;i||(i=this.imageCanvas=document.createElement("canvas")),i.width=i.height=s;var o=i.getContext("2d",{willReadFrequently:!0}),l=this.weights;l.length=this.points.length;for(var a=0;a<l.length;++a)l[a]=0;let r=0,c=o.getImageData(0,0,s,s),h=new e.vec2;for(var u=0;u<s;++u)for(var p=0;p<s;++p){h.set(p/s*2-1,u/s*2-1);const e=4*p+u*s*4,i=2*p+u*s*2,o=n[i],a=d.COLORS[o%d.COLORS.length];var m=t.dst(h)<n[i+1]+.001;m&&(l[o]+=1,r++),c.data[e]=a[0]+(m?128:0),c.data[e+1]=a[1]+(m?128:0),c.data[e+2]=a[2]+(m?128:0),c.data[e+3]=255}for(let e=0;e<l.length;++e)l[e]/=r;return o.putImageData(c,0,0),i}addPoint(t,s){if(this.findPoint(t))return void console.warn("CanvasMap2D.addPoint: There is already a point with that name");s||(s=[this.currentPosition[0],this.currentPosition[1]]),s[0]=e.clamp(s[0],-1,1),s[1]=e.clamp(s[1],-1,1);const n={name:t,pos:s};return this.points.push(n),this._valuesChanged=!0,n}removePoint(e){const t=this.points.findIndex((t=>t.name==e));t>-1&&(this.points.splice(t,1),this._valuesChanged=!0)}findPoint(e){return this.points.find((t=>t.name==e))}clear(){this.points.length=0,this._precomputedWeights=null,this._canvas=null,this._selectedPoint=null}renderToCanvas(t,s){const n=this.margin,i=this.size[0],o=this.size[1];t.fillStyle="black",t.strokeStyle="#BBB",t.clearRect(0,0,i,o),this.circular?(this.circleCenter[0]=.5*i,this.circleCenter[1]=.5*o,this.circleRadius=.5*o-n,t.lineWidth=1,t.beginPath(),t.arc(this.circleCenter[0],this.circleCenter[1],this.circleRadius,0,2*Math.PI),t.fill(),t.stroke(),t.beginPath(),t.moveTo(this.circleCenter[0]+.5,this.circleCenter[1]-this.circleRadius),t.lineTo(this.circleCenter[0]+.5,this.circleCenter[1]+this.circleRadius),t.moveTo(this.circleCenter[0]-this.circleRadius,this.circleCenter[1]),t.lineTo(this.circleCenter[0]+this.circleRadius,this.circleCenter[1]),t.stroke()):(t.fillRect(n,n,i-2*n,o-2*n),t.strokeRect(n,n,i-2*n,o-2*n));var l=this.precomputeWeightsToImage(this.currentPosition);l&&(t.globalAlpha=.5,t.imageSmoothingEnabled=!1,this.circular?(t.save(),t.beginPath(),t.arc(this.circleCenter[0],this.circleCenter[1],this.circleRadius,0,2*Math.PI),t.clip(),t.drawImage(l,this.circleCenter[0]-this.circleRadius,this.circleCenter[1]-this.circleRadius,2*this.circleRadius,2*this.circleRadius),t.restore()):t.drawImage(l,n,n,i-2*n,o-2*n),t.imageSmoothingEnabled=!0,t.globalAlpha=1);for(let s=0;s<this.points.length;++s){const l=this.points[s];let a=.5*l.pos[0]+.5,r=.5*l.pos[1]+.5;a=a*(i-2*n)+n,r=r*(o-2*n)+n,a=e.clamp(a,n,i-n),r=e.clamp(r,n,o-n),t.fillStyle=l==this._selectedPoint?"#CDF":"#BCD",t.beginPath(),t.arc(a,r,3,0,2*Math.PI),t.fill(),this.showNames&&t.fillText(l.name,a+5,r+5)}t.fillStyle="white",t.beginPath();var a=.5*this.currentPosition.x+.5,r=.5*this.currentPosition.y+.5;a=a*(i-2*n)+n,r=r*(o-2*n)+n,a=e.clamp(a,n,i-n),r=e.clamp(r,n,o-n),t.arc(a,r,4,0,2*Math.PI),t.fill()}}e.CanvasMap2D=d,Object.assign(e,{request(e){var t=e.dataType||"text";"json"==t||"xml"==t?t="text":"binary"==t&&(t="arraybuffer",e.mimeType="application/octet-stream");var s=new XMLHttpRequest;s.open(e.data?"POST":"GET",e.url,!0),t&&(s.responseType=t),e.mimeType&&s.overrideMimeType(e.mimeType),e.nocache&&s.setRequestHeader("Cache-Control","no-cache"),s.onload=function(t){var s=this.response;if(200==this.status){if("json"==e.dataType)try{s=JSON.parse(s)}catch(n){if(!e.error)throw n;e.error(n)}else if("xml"==e.dataType)try{s=(new DOMParser).parseFromString(s,"text/xml")}catch(n){if(!e.error)throw n;e.error(n)}e.success&&e.success.call(this,s,this)}else{var n="Error "+this.status;e.error&&e.error(n)}},s.onerror=function(t){e.error&&e.error(t)};var n=new FormData;if(e.data)for(var i in e.data)n.append(i,e.data[i]);return s.send(n),s},requestText(e,t,s){return this.request({url:e,dataType:"text",success:t,error:s})},requestJSON(e,t,s){return this.request({url:e,dataType:"json",success:t,error:s})},requestBinary(e,t,s){return this.request({url:e,dataType:"binary",success:t,error:s})},requireScript(e,t,s,n,i){if(!e)throw"invalid URL";e.constructor===String&&(e=[e]);var o=e.length,l=[];for(var a in e){var r=document.createElement("script");r.num=a,r.type="text/javascript",r.src=e[a]+(i?"?version="+i:""),r.original_src=e[a],r.async=!1,r.onload=function(e){o--,l.push(this),o?n&&n(this.original_src,this.num):t&&t(l)},s&&(r.onerror=function(e){s(e,this.original_src,this.num)}),document.getElementsByTagName("head")[0].appendChild(r)}},loadScriptSync:e=>new Promise(((t,s)=>{const n=document.createElement("script");n.src=e,n.async=!1,n.onload=()=>t(),n.onerror=()=>s(new Error(`Failed to load ${e}`)),document.head.appendChild(n)})),downloadURL(t,s){const n=new FileReader,i=function(e){var t=document.createElement("a");t.href=e,t.download=s,document.body.appendChild(t),t.click(),document.body.removeChild(t)};t.includes("http")?e.request({url:t,dataType:"blob",success:e=>{n.readAsDataURL(e),n.onload=e=>{i(e.currentTarget.result)}}}):i(t)},downloadFile:function(e,t,s){if(t){s||(s=t.constructor===String?"text/plain":"application/octet-stream");var n=null;n=t.constructor!==File&&t.constructor!==Blob?new Blob([t],{type:s}):t;var i=URL.createObjectURL(n),o=document.createElement("a");o.setAttribute("href",i),o.setAttribute("download",e),o.style.display="none",document.body.appendChild(o),o.click(),document.body.removeChild(o),setTimeout((function(){URL.revokeObjectURL(i)}),6e4)}else console.warn("No file provided to download")}}),Object.defineProperty(String.prototype,"lastChar",{get:function(){return this[this.length-1]},enumerable:!0,configurable:!0}),Element.prototype.insertChildAtIndex=function(e,t=1/0){t>=this.children.length?this.appendChild(e):this.insertBefore(e,this.children[t])},Element.prototype.hasClass=function(e){return!!(e=[].concat(e)).filter((e=>this.classList.contains(e))).length},Element.prototype.addClass=function(e){e&&this.classList.add(e)},Element.prototype.getComputedSize=function(){return{width:this.offsetWidth,height:this.offsetHeight}},Element.prototype.getParentArea=function(){let e=this.parentElement;for(;e;){if(e.classList.contains("lexarea"))return e;e=e.parentElement}},Element.prototype.listen=function(e,t,s){this[s=s??"_on"+e]=t,this.addEventListener(e,t)},Element.prototype.ignore=function(e,t){const s=this[t=t??"_on"+e];this.removeEventListener(e,s)};const h={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"],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"],Paste:[512,512,[],"regular","M104.6 48L64 48C28.7 48 0 76.7 0 112L0 384c0 35.3 28.7 64 64 64l96 0 0-48-96 0c-8.8 0-16-7.2-16-16l0-272c0-8.8 7.2-16 16-16l16 0c0 17.7 14.3 32 32 32l72.4 0C202 108.4 227.6 96 256 96l62 0c-7.1-27.6-32.2-48-62-48l-40.6 0C211.6 20.9 188.2 0 160 0s-51.6 20.9-55.4 48zM144 56a16 16 0 1 1 32 0 16 16 0 1 1 -32 0zM448 464l-192 0c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l140.1 0L464 243.9 464 448c0 8.8-7.2 16-16 16zM256 512l192 0c35.3 0 64-28.7 64-64l0-204.1c0-12.7-5.1-24.9-14.1-33.9l-67.9-67.9c-9-9-21.2-14.1-33.9-14.1L256 128c-35.3 0-64 28.7-64 64l0 256c0 35.3 28.7 64 64 64z"],Trash3:[448,512,[],"regular","M170.5 51.6L151.5 80l145 0-19-28.4c-1.5-2.2-4-3.6-6.7-3.6l-93.7 0c-2.7 0-5.2 1.3-6.7 3.6zm147-26.6L354.2 80 368 80l48 0 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-8 0 0 304c0 44.2-35.8 80-80 80l-224 0c-44.2 0-80-35.8-80-80l0-304-8 0c-13.3 0-24-10.7-24-24S10.7 80 24 80l8 0 48 0 13.8 0 36.7-55.1C140.9 9.4 158.4 0 177.1 0l93.7 0c18.7 0 36.2 9.4 46.6 24.9zM80 128l0 304c0 17.7 14.3 32 32 32l224 0c17.7 0 32-14.3 32-32l0-304L80 128zm80 64l0 208c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-208c0-8.8 7.2-16 16-16s16 7.2 16 16zm80 0l0 208c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-208c0-8.8 7.2-16 16-16s16 7.2 16 16zm80 0l0 208c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-208c0-8.8 7.2-16 16-16s16 7.2 16 16z"],FilePdf:[512,512,[],"regular","M64 464l48 0 0 48-48 0c-35.3 0-64-28.7-64-64L0 64C0 28.7 28.7 0 64 0L229.5 0c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3L384 304l-48 0 0-144-80 0c-17.7 0-32-14.3-32-32l0-80L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16zM176 352l32 0c30.9 0 56 25.1 56 56s-25.1 56-56 56l-16 0 0 32c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-48 0-80c0-8.8 7.2-16 16-16zm32 80c13.3 0 24-10.7 24-24s-10.7-24-24-24l-16 0 0 48 16 0zm96-80l32 0c26.5 0 48 21.5 48 48l0 64c0 26.5-21.5 48-48 48l-32 0c-8.8 0-16-7.2-16-16l0-128c0-8.8 7.2-16 16-16zm32 128c8.8 0 16-7.2 16-16l0-64c0-8.8-7.2-16-16-16l-16 0 0 96 16 0zm80-112c0-8.8 7.2-16 16-16l48 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0 0 32 32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0 0 48c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-64 0-64z"],FileWord:[384,512,[],"regular","M48 448L48 64c0-8.8 7.2-16 16-16l160 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm55 241.1c-3.8-12.7-17.2-19.9-29.9-16.1s-19.9 17.2-16.1 29.9l48 160c3 10.2 12.4 17.1 23 17.1s19.9-7 23-17.1l25-83.4 25 83.4c3 10.2 12.4 17.1 23 17.1s19.9-7 23-17.1l48-160c3.8-12.7-3.4-26.1-16.1-29.9s-26.1 3.4-29.9 16.1l-25 83.4-25-83.4c-3-10.2-12.4-17.1-23-17.1s-19.9 7-23 17.1l-25 83.4-25-83.4z"],FilePowerpoint:[384,512,[],"regular","M64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16l160 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm72 208c-13.3 0-24 10.7-24 24l0 104 0 56c0 13.3 10.7 24 24 24s24-10.7 24-24l0-32 44 0c42 0 76-34 76-76s-34-76-76-76l-68 0zm68 104l-44 0 0-56 44 0c15.5 0 28 12.5 28 28s-12.5 28-28 28z"],FileExcel:[384,512,[],"regular","M48 448L48 64c0-8.8 7.2-16 16-16l160 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm90.9 233.3c-8.1-10.5-23.2-12.3-33.7-4.2s-12.3 23.2-4.2 33.7L161.6 320l-44.5 57.3c-8.1 10.5-6.3 25.5 4.2 33.7s25.5 6.3 33.7-4.2L192 359.1l37.1 47.6c8.1 10.5 23.2 12.3 33.7 4.2s12.3-23.2 4.2-33.7L222.4 320l44.5-57.3c8.1-10.5 6.3-25.5-4.2-33.7s-25.5-6.3-33.7 4.2L192 280.9l-37.1-47.6z"],Settings3:[640,512,[],"solid","M308.5 135.3c7.1-6.3 9.9-16.2 6.2-25c-2.3-5.3-4.8-10.5-7.6-15.5L304 89.4c-3-5-6.3-9.9-9.8-14.6c-5.7-7.6-15.7-10.1-24.7-7.1l-28.2 9.3c-10.7-8.8-23-16-36.2-20.9L199 27.1c-1.9-9.3-9.1-16.7-18.5-17.8C173.9 8.4 167.2 8 160.4 8l-.7 0c-6.8 0-13.5 .4-20.1 1.2c-9.4 1.1-16.6 8.6-18.5 17.8L115 56.1c-13.3 5-25.5 12.1-36.2 20.9L50.5 67.8c-9-3-19-.5-24.7 7.1c-3.5 4.7-6.8 9.6-9.9 14.6l-3 5.3c-2.8 5-5.3 10.2-7.6 15.6c-3.7 8.7-.9 18.6 6.2 25l22.2 19.8C32.6 161.9 32 168.9 32 176s.6 14.1 1.7 20.9L11.5 216.7c-7.1 6.3-9.9 16.2-6.2 25c2.3 5.3 4.8 10.5 7.6 15.6l3 5.2c3 5.1 6.3 9.9 9.9 14.6c5.7 7.6 15.7 10.1 24.7 7.1l28.2-9.3c10.7 8.8 23 16 36.2 20.9l6.1 29.1c1.9 9.3 9.1 16.7 18.5 17.8c6.7 .8 13.5 1.2 20.4 1.2s13.7-.4 20.4-1.2c9.4-1.1 16.6-8.6 18.5-17.8l6.1-29.1c13.3-5 25.5-12.1 36.2-20.9l28.2 9.3c9 3 19 .5 24.7-7.1c3.5-4.7 6.8-9.5 9.8-14.6l3.1-5.4c2.8-5 5.3-10.2 7.6-15.5c3.7-8.7 .9-18.6-6.2-25l-22.2-19.8c1.1-6.8 1.7-13.8 1.7-20.9s-.6-14.1-1.7-20.9l22.2-19.8zM112 176a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM504.7 500.5c6.3 7.1 16.2 9.9 25 6.2c5.3-2.3 10.5-4.8 15.5-7.6l5.4-3.1c5-3 9.9-6.3 14.6-9.8c7.6-5.7 10.1-15.7 7.1-24.7l-9.3-28.2c8.8-10.7 16-23 20.9-36.2l29.1-6.1c9.3-1.9 16.7-9.1 17.8-18.5c.8-6.7 1.2-13.5 1.2-20.4s-.4-13.7-1.2-20.4c-1.1-9.4-8.6-16.6-17.8-18.5L583.9 307c-5-13.3-12.1-25.5-20.9-36.2l9.3-28.2c3-9 .5-19-7.1-24.7c-4.7-3.5-9.6-6.8-14.6-9.9l-5.3-3c-5-2.8-10.2-5.3-15.6-7.6c-8.7-3.7-18.6-.9-25 6.2l-19.8 22.2c-6.8-1.1-13.8-1.7-20.9-1.7s-14.1 .6-20.9 1.7l-19.8-22.2c-6.3-7.1-16.2-9.9-25-6.2c-5.3 2.3-10.5 4.8-15.6 7.6l-5.2 3c-5.1 3-9.9 6.3-14.6 9.9c-7.6 5.7-10.1 15.7-7.1 24.7l9.3 28.2c-8.8 10.7-16 23-20.9 36.2L315.1 313c-9.3 1.9-16.7 9.1-17.8 18.5c-.8 6.7-1.2 13.5-1.2 20.4s.4 13.7 1.2 20.4c1.1 9.4 8.6 16.6 17.8 18.5l29.1 6.1c5 13.3 12.1 25.5 20.9 36.2l-9.3 28.2c-3 9-.5 19 7.1 24.7c4.7 3.5 9.5 6.8 14.6 9.8l5.4 3.1c5 2.8 10.2 5.3 15.5 7.6c8.7 3.7 18.6 .9 25-6.2l19.8-22.2c6.8 1.1 13.8 1.7 20.9 1.7s14.1-.6 20.9-1.7l19.8 22.2zM464 304a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"],MessagesCircle:[640,512,[],"regular","M88.2 309.1c9.8-18.3 6.8-40.8-7.5-55.8C59.4 230.9 48 204 48 176c0-63.5 63.8-128 160-128s160 64.5 160 128s-63.8 128-160 128c-13.1 0-25.8-1.3-37.8-3.6c-10.4-2-21.2-.6-30.7 4.2c-4.1 2.1-8.3 4.1-12.6 6c-16 7.2-32.9 13.5-49.9 18c2.8-4.6 5.4-9.1 7.9-13.6c1.1-1.9 2.2-3.9 3.2-5.9zM208 352c114.9 0 208-78.8 208-176S322.9 0 208 0S0 78.8 0 176c0 41.8 17.2 80.1 45.9 110.3c-.9 1.7-1.9 3.5-2.8 5.1c-10.3 18.4-22.3 36.5-36.6 52.1c-6.6 7-8.3 17.2-4.6 25.9C5.8 378.3 14.4 384 24 384c43 0 86.5-13.3 122.7-29.7c4.8-2.2 9.6-4.5 14.2-6.8c15.1 3 30.9 4.5 47.1 4.5zM432 480c16.2 0 31.9-1.6 47.1-4.5c4.6 2.3 9.4 4.6 14.2 6.8C529.5 498.7 573 512 616 512c9.6 0 18.2-5.7 22-14.5c3.8-8.8 2-19-4.6-25.9c-14.2-15.6-26.2-33.7-36.6-52.1c-.9-1.7-1.9-3.4-2.8-5.1C622.8 384.1 640 345.8 640 304c0-94.4-87.9-171.5-198.2-175.8c4.1 15.2 6.2 31.2 6.2 47.8l0 .6c87.2 6.7 144 67.5 144 127.4c0 28-11.4 54.9-32.7 77.2c-14.3 15-17.3 37.6-7.5 55.8c1.1 2 2.2 4 3.2 5.9c2.5 4.5 5.2 9 7.9 13.6c-17-4.5-33.9-10.7-49.9-18c-4.3-1.9-8.5-3.9-12.6-6c-9.5-4.8-20.3-6.2-30.7-4.2c-12.1 2.4-24.8 3.6-37.8 3.6c-61.7 0-110-26.5-136.8-62.3c-16 5.4-32.8 9.4-50 11.8C279 439.8 350 480 432 480z"],LinkOff:[640,512,["ChainBroken","ChainOff","Unlink"],"solid","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L489.3 358.2l90.5-90.5c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114l-96 96-31.9-25C430.9 239.6 420.1 175.1 377 132c-52.2-52.3-134.5-56.2-191.3-11.7L38.8 5.1zM239 162c30.1-14.9 67.7-9.9 92.8 15.3c20 20 27.5 48.3 21.7 74.5L239 162zM406.6 416.4L220.9 270c-2.1 39.8 12.2 80.1 42.2 110c38.9 38.9 94.4 51 143.6 36.3zm-290-228.5L60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5l61.8-61.8-50.6-39.9z"],StreetView:[512,512,[],"solid","M320 64A64 64 0 1 0 192 64a64 64 0 1 0 128 0zm-96 96c-35.3 0-64 28.7-64 64l0 48c0 17.7 14.3 32 32 32l1.8 0 11.1 99.5c1.8 16.2 15.5 28.5 31.8 28.5l38.7 0c16.3 0 30-12.3 31.8-28.5L318.2 304l1.8 0c17.7 0 32-14.3 32-32l0-48c0-35.3-28.7-64-64-64l-64 0zM132.3 394.2c13-2.4 21.7-14.9 19.3-27.9s-14.9-21.7-27.9-19.3c-32.4 5.9-60.9 14.2-82 24.8c-10.5 5.3-20.3 11.7-27.8 19.6C6.4 399.5 0 410.5 0 424c0 21.4 15.5 36.1 29.1 45c14.7 9.6 34.3 17.3 56.4 23.4C130.2 504.7 190.4 512 256 512s125.8-7.3 170.4-19.6c22.1-6.1 41.8-13.8 56.4-23.4c13.7-8.9 29.1-23.6 29.1-45c0-13.5-6.4-24.5-14-32.6c-7.5-7.9-17.3-14.3-27.8-19.6c-21-10.6-49.5-18.9-82-24.8c-13-2.4-25.5 6.3-27.9 19.3s6.3 25.5 19.3 27.9c30.2 5.5 53.7 12.8 69 20.5c3.2 1.6 5.8 3.1 7.9 4.5c3.6 2.4 3.6 7.2 0 9.6c-8.8 5.7-23.1 11.8-43 17.3C374.3 457 318.5 464 256 464s-118.3-7-157.7-17.9c-19.9-5.5-34.2-11.6-43-17.3c-3.6-2.4-3.6-7.2 0-9.6c2.1-1.4 4.8-2.9 7.9-4.5c15.3-7.7 38.8-14.9 69-20.5z"],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"],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"],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"],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"],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"],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"],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"],PersonWalkingArrowRight:[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-80z"],ClapperboardClosed:[512,512,[],"solid","M448 32l-86.1 0-1 1-127 127 92.1 0 1-1L453.8 32.3c-1.9-.2-3.8-.3-5.8-.3zm64 128l0-64c0-15.1-5.3-29.1-14-40l-104 104L512 160zM294.1 32l-92.1 0-1 1L73.9 160l92.1 0 1-1 127-127zM64 32C28.7 32 0 60.7 0 96l0 64 6.1 0 1-1 127-127L64 32zM512 192L0 192 0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-224z"],UserOff:[640,512,[],"solid","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L381.9 274c48.5-23.2 82.1-72.7 82.1-130C464 64.5 399.5 0 320 0C250.4 0 192.4 49.3 178.9 114.9L38.8 5.1zM545.5 512L528 512 284.3 320l-59 0C136.2 320 64 392.2 64 481.3c0 17 13.8 30.7 30.7 30.7l450.6 0 .3 0z"],PhotoFilm:[640,512,["Media"],"solid","M256 0L576 0c35.3 0 64 28.7 64 64l0 224c0 35.3-28.7 64-64 64l-320 0c-35.3 0-64-28.7-64-64l0-224c0-35.3 28.7-64 64-64zM476 106.7C471.5 100 464 96 456 96s-15.5 4-20 10.7l-56 84L362.7 169c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6l80 0 48 0 144 0c8.9 0 17-4.9 21.2-12.7s3.7-17.3-1.2-24.6l-96-144zM336 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM64 128l96 0 0 256 0 32c0 17.7 14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-32 160 0 0 64c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 192c0-35.3 28.7-64 64-64zm8 64c-8.8 0-16 7.2-16 16l0 16c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-16 0zm0 104c-8.8 0-16 7.2-16 16l0 16c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-16 0zm0 104c-8.8 0-16 7.2-16 16l0 16c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-16 0zm336 16l0 16c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-16 0c-8.8 0-16 7.2-16 16z"],Chart:[448,512,[],"solid","M160 80c0-26.5 21.5-48 48-48l32 0c26.5 0 48 21.5 48 48l0 352c0 26.5-21.5 48-48 48l-32 0c-26.5 0-48-21.5-48-48l0-352zM0 272c0-26.5 21.5-48 48-48l32 0c26.5 0 48 21.5 48 48l0 160c0 26.5-21.5 48-48 48l-32 0c-26.5 0-48-21.5-48-48L0 272zM368 96l32 0c26.5 0 48 21.5 48 48l0 288c0 26.5-21.5 48-48 48l-32 0c-26.5 0-48-21.5-48-48l0-288c0-26.5 21.5-48 48-48z"],HandsAslInterpreting:[640,512,["ASL"],"solid","M156.6 46.3c7.9-15.8 1.5-35-14.3-42.9s-35-1.5-42.9 14.3L13.5 189.4C4.6 207.2 0 226.8 0 246.7L0 256c0 70.7 57.3 128 128 128l72 0 8 0 0-.3c35.2-2.7 65.4-22.8 82.1-51.7c8.8-15.3 3.6-34.9-11.7-43.7s-34.9-3.6-43.7 11.7c-7 12-19.9 20-34.7 20c-22.1 0-40-17.9-40-40s17.9-40 40-40c14.8 0 27.7 8 34.7 20c8.8 15.3 28.4 20.5 43.7 11.7s20.5-28.4 11.7-43.7c-12.8-22.1-33.6-39.1-58.4-47.1l80.8-22c17-4.6 27.1-22.2 22.5-39.3s-22.2-27.1-39.3-22.5L194.9 124.6l81.6-68c13.6-11.3 15.4-31.5 4.1-45.1S249.1-3.9 235.5 7.4L133.6 92.3l23-46zM483.4 465.7c-7.9 15.8-1.5 35 14.3 42.9s35 1.5 42.9-14.3l85.9-171.7c8.9-17.8 13.5-37.4 13.5-57.2l0-9.3c0-70.7-57.3-128-128-128l-72 0-8 0 0 .3c-35.2 2.7-65.4 22.8-82.1 51.7c-8.9 15.3-3.6 34.9 11.7 43.7s34.9 3.6 43.7-11.7c7-12 19.9-20 34.7-20c22.1 0 40 17.9 40 40s-17.9 40-40 40c-14.8 0-27.7-8-34.7-20c-8.9-15.3-28.4-20.5-43.7-11.7s-20.5 28.4-11.7 43.7c12.8 22.1 33.6 39.1 58.4 47.1l-80.8 22c-17.1 4.7-27.1 22.2-22.5 39.3s22.2 27.1 39.3 22.5l100.7-27.5-81.6 68c-13.6 11.3-15.4 31.5-4.1 45.1s31.5 15.4 45.1 4.1l101.9-84.9-23 46z"],HandPointRight:[512,512,[],"regular","M448 128l-177.6 0c1 5.2 1.6 10.5 1.6 16l0 16 32 0 144 0c8.8 0 16-7.2 16-16s-7.2-16-16-16zM224 144c0-17.7-14.3-32-32-32c0 0 0 0 0 0l-24 0c-66.3 0-120 53.7-120 120l0 48c0 52.5 33.7 97.1 80.7 113.4c-.5-3.1-.7-6.2-.7-9.4c0-20 9.2-37.9 23.6-49.7c-4.9-9-7.6-19.4-7.6-30.3c0-15.1 5.3-29 14-40c-8.8-11-14-24.9-14-40l0-40c0-13.3 10.7-24 24-24s24 10.7 24 24l0 40c0 8.8 7.2 16 16 16s16-7.2 16-16l0-40 0-40zM192 64s0 0 0 0c18 0 34.6 6 48 16l208 0c35.3 0 64 28.7 64 64s-28.7 64-64 64l-82 0c1.3 5.1 2 10.5 2 16c0 25.3-14.7 47.2-36 57.6c2.6 7 4 14.5 4 22.4c0 20-9.2 37.9-23.6 49.7c4.9 9 7.6 19.4 7.6 30.3c0 35.3-28.7 64-64 64l-64 0-24 0C75.2 448 0 372.8 0 280l0-48C0 139.2 75.2 64 168 64l24 0zm64 336c8.8 0 16-7.2 16-16s-7.2-16-16-16l-48 0-16 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l64 0zm16-176c0 5.5-.7 10.9-2 16l2 0 32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0 0 16zm-24 64l-40 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l48 0 16 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-24 0z"],HandPointUp:[384,512,[],"regular","M64 64l0 177.6c5.2-1 10.5-1.6 16-1.6l16 0 0-32L96 64c0-8.8-7.2-16-16-16s-16 7.2-16 16zM80 288c-17.7 0-32 14.3-32 32c0 0 0 0 0 0l0 24c0 66.3 53.7 120 120 120l48 0c52.5 0 97.1-33.7 113.4-80.7c-3.1 .5-6.2 .7-9.4 .7c-20 0-37.9-9.2-49.7-23.6c-9 4.9-19.4 7.6-30.3 7.6c-15.1 0-29-5.3-40-14c-11 8.8-24.9 14-40 14l-40 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l40 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-40 0-40 0zM0 320s0 0 0 0c0-18 6-34.6 16-48L16 64C16 28.7 44.7 0 80 0s64 28.7 64 64l0 82c5.1-1.3 10.5-2 16-2c25.3 0 47.2 14.7 57.6 36c7-2.6 14.5-4 22.4-4c20 0 37.9 9.2 49.7 23.6c9-4.9 19.4-7.6 30.3-7.6c35.3 0 64 28.7 64 64l0 64 0 24c0 92.8-75.2 168-168 168l-48 0C75.2 512 0 436.8 0 344l0-24zm336-64c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 48 0 16c0 8.8 7.2 16 16 16s16-7.2 16-16l0-64zM160 240c5.5 0 10.9 .7 16 2l0-2 0-32c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 32 16 0zm64 24l0 40c0 8.8 7.2 16 16 16s16-7.2 16-16l0-48 0-16c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 24z"],HandPointDown:[384,512,[],"regular","M64 448l0-177.6c5.2 1 10.5 1.6 16 1.6l16 0 0 32 0 144c0 8.8-7.2 16-16 16s-16-7.2-16-16zM80 224c-17.7 0-32-14.3-32-32c0 0 0 0 0 0l0-24c0-66.3 53.7-120 120-120l48 0c52.5 0 97.1 33.7 113.4 80.7c-3.1-.5-6.2-.7-9.4-.7c-20 0-37.9 9.2-49.7 23.6c-9-4.9-19.4-7.6-30.3-7.6c-15.1 0-29 5.3-40 14c-11-8.8-24.9-14-40-14l-40 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l40 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-40 0-40 0zM0 192s0 0 0 0c0 18 6 34.6 16 48l0 208c0 35.3 28.7 64 64 64s64-28.7 64-64l0-82c5.1 1.3 10.5 2 16 2c25.3 0 47.2-14.7 57.6-36c7 2.6 14.5 4 22.4 4c20 0 37.9-9.2 49.7-23.6c9 4.9 19.4 7.6 30.3 7.6c35.3 0 64-28.7 64-64l0-64 0-24C384 75.2 308.8 0 216 0L168 0C75.2 0 0 75.2 0 168l0 24zm336 64c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-48 0-16c0-8.8 7.2-16 16-16s16 7.2 16 16l0 64zM160 272c5.5 0 10.9-.7 16-2l0 2 0 32c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-32 16 0zm64-24l0-40c0-8.8 7.2-16 16-16s16 7.2 16 16l0 48 0 16c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-24z"],HandPointLeft:[512,512,[],"regular","M64 128l177.6 0c-1 5.2-1.6 10.5-1.6 16l0 16-32 0L64 160c-8.8 0-16-7.2-16-16s7.2-16 16-16zm224 16c0-17.7 14.3-32 32-32c0 0 0 0 0 0l24 0c66.3 0 120 53.7 120 120l0 48c0 52.5-33.7 97.1-80.7 113.4c.5-3.1 .7-6.2 .7-9.4c0-20-9.2-37.9-23.6-49.7c4.9-9 7.6-19.4 7.6-30.3c0-15.1-5.3-29-14-40c8.8-11 14-24.9 14-40l0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-40 0-40zm32-80s0 0 0 0c-18 0-34.6 6-48 16L64 80C28.7 80 0 108.7 0 144s28.7 64 64 64l82 0c-1.3 5.1-2 10.5-2 16c0 25.3 14.7 47.2 36 57.6c-2.6 7-4 14.5-4 22.4c0 20 9.2 37.9 23.6 49.7c-4.9 9-7.6 19.4-7.6 30.3c0 35.3 28.7 64 64 64l64 0 24 0c92.8 0 168-75.2 168-168l0-48c0-92.8-75.2-168-168-168l-24 0zM256 400c-8.8 0-16-7.2-16-16s7.2-16 16-16l48 0 16 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-64 0zM240 224c0 5.5 .7 10.9 2 16l-2 0-32 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l32 0 0 16zm24 64l40 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-48 0-16 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l24 0z"],HandScissors:[512,512,[],"regular","M.2 276.3c-1.2-35.3 26.4-65 61.7-66.2l3.3-.1L57 208.1C22.5 200.5 .7 166.3 8.3 131.8S50.2 75.5 84.7 83.2l173 38.3c2.3-2.9 4.7-5.7 7.1-8.5l18.4-20.3C299.9 74.5 323.5 64 348.3 64l10.2 0c54.1 0 104.1 28.7 131.3 75.4l1.5 2.6c13.6 23.2 20.7 49.7 20.7 76.6L512 344c0 66.3-53.7 120-120 120l-8 0-96 0c-35.3 0-64-28.7-64-64c0-2.8 .2-5.6 .5-8.3c-19.4-11-32.5-31.8-32.5-55.7c0-.8 0-1.6 0-2.4L66.4 338c-35.3 1.2-65-26.4-66.2-61.7zm63.4-18.2c-8.8 .3-15.7 7.7-15.4 16.5s7.7 15.7 16.5 15.4l161.5-5.6c9.8-.3 18.7 5.3 22.7 14.2s2.2 19.3-4.5 26.4c-2.8 2.9-4.4 6.7-4.4 11c0 8.8 7.2 16 16 16c9.1 0 17.4 5.1 21.5 13.3s3.2 17.9-2.3 25.1c-2 2.7-3.2 6-3.2 9.6c0 8.8 7.2 16 16 16l96 0 8 0c39.8 0 72-32.2 72-72l0-125.4c0-18.4-4.9-36.5-14.2-52.4l-1.5-2.6c-18.6-32-52.8-51.6-89.8-51.6l-10.2 0c-11.3 0-22 4.8-29.6 13.1l-17.5-15.9 17.5 15.9-18.4 20.3c-.6 .6-1.1 1.3-1.7 1.9l57 13.2c8.6 2 14 10.6 12 19.2s-10.6 14-19.2 12l-85.6-19.7L74.3 130c-8.6-1.9-17.2 3.5-19.1 12.2s3.5 17.2 12.2 19.1l187.5 41.6c10.2 2.3 17.8 10.9 18.7 21.4l.1 1c.6 6.6-1.5 13.1-5.8 18.1s-10.6 7.9-17.2 8.2L63.6 258.1z"],HandSpock:[576,512,[],"regular","M170.2 80.8C161 47 180.8 12 214.6 2.4c34-9.6 69.4 10.2 79 44.2l30.3 107.1L337.1 84c6.6-34.7 40.1-57.5 74.8-50.9c31.4 6 53 33.9 52 64.9c10-2.6 20.8-2.8 31.5-.1c34.3 8.6 55.1 43.3 46.6 77.6L486.7 397.2C469.8 464.7 409.2 512 339.6 512l-33.7 0c-56.9 0-112.2-19-157.2-53.9l-92-71.6c-27.9-21.7-32.9-61.9-11.2-89.8s61.9-32.9 89.8-11.2l17 13.2L100.5 167.5c-13-32.9 3.2-70.1 36-83c11.1-4.4 22.7-5.4 33.7-3.7zm77.1-21.2c-2.4-8.5-11.2-13.4-19.7-11s-13.4 11.2-11 19.7l54.8 182.4c3.5 12.3-3.3 25.2-15.4 29.3s-25.3-2-30-13.9L174.9 138.1c-3.2-8.2-12.5-12.3-20.8-9s-12.3 12.5-9 20.8l73.3 185.6c12 30.3-23.7 57-49.4 37l-63.1-49.1c-7-5.4-17-4.2-22.5 2.8s-4.2 17 2.8 22.5l92 71.6c36.5 28.4 81.4 43.8 127.7 43.8l33.7 0c47.5 0 89-32.4 100.5-78.5l55.4-221.6c2.1-8.6-3.1-17.3-11.6-19.4s-17.3 3.1-19.4 11.6l-26 104C435.6 271.8 425 280 413 280c-16.5 0-28.9-15-25.8-31.2L415.7 99c1.7-8.7-4-17.1-12.7-18.7s-17.1 4-18.7 12.7L352.5 260c-2.2 11.6-12.4 20-24.2 20c-11 0-20.7-7.3-23.7-17.9L247.4 59.6z"],HandBackFist:[448,512,["HandRock"],"regular","M144 64c0-8.8 7.2-16 16-16s16 7.2 16 16c0 9.1 5.1 17.4 13.3 21.5s17.9 3.2 25.1-2.3c2.7-2 6-3.2 9.6-3.2c8.8 0 16 7.2 16 16c0 9.1 5.1 17.4 13.3 21.5s17.9 3.2 25.1-2.3c2.7-2 6-3.2 9.6-3.2c8.8 0 16 7.2 16 16c0 9.1 5.1 17.4 13.3 21.5s17.9 3.2 25.1-2.3c2.7-2 6-3.2 9.6-3.2c8.8 0 16 7.2 16 16l0 104c0 31.3-20 58-48 67.9c-9.6 3.4-16 12.5-16 22.6L304 488c0 13.3 10.7 24 24 24s24-10.7 24-24l0-117.8c38-20.1 64-60.1 64-106.2l0-104c0-35.3-28.7-64-64-64c-2.8 0-5.6 .2-8.3 .5C332.8 77.1 311.9 64 288 64c-2.8 0-5.6 .2-8.3 .5C268.8 45.1 247.9 32 224 32c-2.8 0-5.6 .2-8.3 .5C204.8 13.1 183.9 0 160 0C124.7 0 96 28.7 96 64l0 64.3c-11.7 7.4-22.5 16.4-32 26.9l17.8 16.1L64 155.2l-9.4 10.5C40 181.8 32 202.8 32 224.6l0 12.8c0 49.6 24.2 96.1 64.8 124.5l13.8-19.7L96.8 361.9l8.9 6.2c6.9 4.8 14.4 8.6 22.3 11.3L128 488c0 13.3 10.7 24 24 24s24-10.7 24-24l0-128.1c0-12.6-9.8-23.1-22.4-23.9c-7.3-.5-14.3-2.9-20.3-7.1l-13.1 18.7 13.1-18.7-8.9-6.2C96.6 303.1 80 271.3 80 237.4l0-12.8c0-9.9 3.7-19.4 10.3-26.8l9.4-10.5c3.8-4.2 7.9-8.1 12.3-11.6l0 32.3c0 8.8 7.2 16 16 16s16-7.2 16-16l0-65.7 0-14.3 0-64z"],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"],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"],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"],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"],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"],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"],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"],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"],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"],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"],VrCardboard:[640,512,["VR"],"solid","M576 64L64 64C28.7 64 0 92.7 0 128L0 384c0 35.3 28.7 64 64 64l120.4 0c24.2 0 46.4-13.7 57.2-35.4l32-64c8.8-17.5 26.7-28.6 46.3-28.6s37.5 11.1 46.3 28.6l32 64c10.8 21.7 33 35.4 57.2 35.4L576 448c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64zM96 240a64 64 0 1 1 128 0A64 64 0 1 1 96 240zm384-64a64 64 0 1 1 0 128 64 64 0 1 1 0-128z"],C:[32,32,[],"solid","M29.86 8c-.224-.385-.532-.724-.871-.921L17.234.292c-.677-.391-1.787-.391-2.464 0L3.015 7.079C2.338 7.47 1.78 8.432 1.78 9.214v13.573c0 .391.14.828.364 1.213.219.385.532.724.871.917l11.749 6.791c.683.391 1.787.391 2.464 0l11.755-6.791c.339-.193.647-.532.871-.917s.359-.823.359-1.213V9.214c.005-.391-.135-.828-.353-1.213zM16 25.479c-5.229 0-9.479-4.249-9.479-9.479S10.77 6.521 16 6.521a9.51 9.51 0 0 1 8.208 4.733l-4.104 2.376A4.76 4.76 0 0 0 16 11.259c-2.615 0-4.74 2.125-4.74 4.74s2.125 4.74 4.74 4.74a4.76 4.76 0 0 0 4.104-2.371l4.104 2.376A9.51 9.51 0 0 1 16 25.479z",{svgClass:"stroke-none"}],CPlusPlus:[32,32,[],"solid","M29.86 8c-.224-.385-.532-.724-.871-.921L17.234.292c-.677-.391-1.787-.391-2.464 0L3.015 7.079C2.338 7.47 1.78 8.432 1.78 9.214v13.573c0 .391.14.828.364 1.213c.219.385.532.724.871.917l11.749 6.791c.683.391 1.787.391 2.464 0l11.755-6.791c.339-.193.647-.532.871-.917s.359-.823.359-1.213V9.214c.005-.391-.135-.828-.353-1.213zM16 25.479c-5.229 0-9.479-4.249-9.479-9.479S10.77 6.521 16 6.521a9.51 9.51 0 0 1 8.208 4.733l-4.104 2.376A4.76 4.76 0 0 0 16 11.259c-2.615 0-4.74 2.125-4.74 4.74s2.125 4.74 4.74 4.74a4.76 4.76 0 0 0 4.104-2.371l4.104 2.376A9.51 9.51 0 0 1 16 25.477zm9.479-8.952h-1.052v1.052H23.37v-1.052h-1.052v-1.053h1.052v-1.052h1.057v1.052h1.052zm3.948 0h-1.052v1.052h-1.052v-1.052h-1.052v-1.053h1.052v-1.052h1.052v1.052h1.052z",{svgClass:"stroke-none"}],Discord:[640,512,[],"solid","M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"],Google:[488,512,[],"solid","M488 261.8C488 403.3 391.1 504 248 504 110.8 504 0 393.2 0 256S110.8 8 248 8c66.8 0 123 24.5 166.3 64.9l-67.5 64.9C258.5 52.6 94.3 116.6 94.3 256c0 86.5 69.1 156.6 153.7 156.6 98.2 0 135-70.4 140.8-106.9H248v-85.3h236.1c2.3 12.7 3.9 24.9 3.9 41.4z"],Js:[32,32,[],"solid","M18.774 19.7a3.73 3.73 0 0 0 3.376 2.078c1.418 0 2.324-.709 2.324-1.688c0-1.173-.931-1.589-2.491-2.272l-.856-.367c-2.469-1.052-4.11-2.37-4.11-5.156c0-2.567 1.956-4.52 5.012-4.52A5.06 5.06 0 0 1 26.9 10.52l-2.665 1.711a2.33 2.33 0 0 0-2.2-1.467a1.49 1.49 0 0 0-1.638 1.467c0 1.027.636 1.442 2.1 2.078l.856.366c2.908 1.247 4.549 2.518 4.549 5.376c0 3.081-2.42 4.769-5.671 4.769a6.58 6.58 0 0 1-6.236-3.5ZM6.686 20c.538.954 1.027 1.76 2.2 1.76c1.124 0 1.834-.44 1.834-2.15V7.975h3.422v11.683c0 3.543-2.078 5.156-5.11 5.156A5.31 5.31 0 0 1 3.9 21.688Z"],Linux:[448,512,[],"regular","M220.8 123.3c1 .5 1.8 1.7 3 1.7 1.1 0 2.8-.4 2.9-1.5.2-1.4-1.9-2.3-3.2-2.9-1.7-.7-3.9-1-5.5-.1-.4.2-.8.7-.6 1.1.3 1.3 2.3 1.1 3.4 1.7zm-21.9 1.7c1.2 0 2-1.2 3-1.7 1.1-.6 3.1-.4 3.5-1.6.2-.4-.2-.9-.6-1.1-1.6-.9-3.8-.6-5.5.1-1.3.6-3.4 1.5-3.2 2.9.1 1 1.8 1.5 2.8 1.4zM420 403.8c-3.6-4-5.3-11.6-7.2-19.7-1.8-8.1-3.9-16.8-10.5-22.4-1.3-1.1-2.6-2.1-4-2.9-1.3-.8-2.7-1.5-4.1-2 9.2-27.3 5.6-54.5-3.7-79.1-11.4-30.1-31.3-56.4-46.5-74.4-17.1-21.5-33.7-41.9-33.4-72C311.1 85.4 315.7.1 234.8 0 132.4-.2 158 103.4 156.9 135.2c-1.7 23.4-6.4 41.8-22.5 64.7-18.9 22.5-45.5 58.8-58.1 96.7-6 17.9-8.8 36.1-6.2 53.3-6.5 5.8-11.4 14.7-16.6 20.2-4.2 4.3-10.3 5.9-17 8.3s-14 6-18.5 14.5c-2.1 3.9-2.8 8.1-2.8 12.4 0 3.9.6 7.9 1.2 11.8 1.2 8.1 2.5 15.7.8 20.8-5.2 14.4-5.9 24.4-2.2 31.7 3.8 7.3 11.4 10.5 20.1 12.3 17.3 3.6 40.8 2.7 59.3 12.5 19.8 10.4 39.9 14.1 55.9 10.4 11.6-2.6 21.1-9.6 25.9-20.2 12.5-.1 26.3-5.4 48.3-6.6 14.9-1.2 33.6 5.3 55.1 4.1.6 2.3 1.4 4.6 2.5 6.7v.1c8.3 16.7 23.8 24.3 40.3 23 16.6-1.3 34.1-11 48.3-27.9 13.6-16.4 36-23.2 50.9-32.2 7.4-4.5 13.4-10.1 13.9-18.3.4-8.2-4.4-17.3-15.5-29.7zM223.7 87.3c9.8-22.2 34.2-21.8 44-.4 6.5 14.2 3.6 30.9-4.3 40.4-1.6-.8-5.9-2.6-12.6-4.9 1.1-1.2 3.1-2.7 3.9-4.6 4.8-11.8-.2-27-9.1-27.3-7.3-.5-13.9 10.8-11.8 23-4.1-2-9.4-3.5-13-4.4-1-6.9-.3-14.6 2.9-21.8zM183 75.8c10.1 0 20.8 14.2 19.1 33.5-3.5 1-7.1 2.5-10.2 4.6 1.2-8.9-3.3-20.1-9.6-19.6-8.4.7-9.8 21.2-1.8 28.1 1 .8 1.9-.2-5.9 5.5-15.6-14.6-10.5-52.1 8.4-52.1zm-13.6 60.7c6.2-4.6 13.6-10 14.1-10.5 4.7-4.4 13.5-14.2 27.9-14.2 7.1 0 15.6 2.3 25.9 8.9 6.3 4.1 11.3 4.4 22.6 9.3 8.4 3.5 13.7 9.7 10.5 18.2-2.6 7.1-11 14.4-22.7 18.1-11.1 3.6-19.8 16-38.2 14.9-3.9-.2-7-1-9.6-2.1-8-3.5-12.2-10.4-20-15-8.6-4.8-13.2-10.4-14.7-15.3-1.4-4.9 0-9 4.2-12.3zm3.3 334c-2.7 35.1-43.9 34.4-75.3 18-29.9-15.8-68.6-6.5-76.5-21.9-2.4-4.7-2.4-12.7 2.6-26.4v-.2c2.4-7.6.6-16-.6-23.9-1.2-7.8-1.8-15 .9-20 3.5-6.7 8.5-9.1 14.8-11.3 10.3-3.7 11.8-3.4 19.6-9.9 5.5-5.7 9.5-12.9 14.3-18 5.1-5.5 10-8.1 17.7-6.9 8.1 1.2 15.1 6.8 21.9 16l19.6 35.6c9.5 19.9 43.1 48.4 41 68.9zm-1.4-25.9c-4.1-6.6-9.6-13.6-14.4-19.6 7.1 0 14.2-2.2 16.7-8.9 2.3-6.2 0-14.9-7.4-24.9-13.5-18.2-38.3-32.5-38.3-32.5-13.5-8.4-21.1-18.7-24.6-29.9s-3-23.3-.3-35.2c5.2-22.9 18.6-45.2 27.2-59.2 2.3-1.7.8 3.2-8.7 20.8-8.5 16.1-24.4 53.3-2.6 82.4.6-20.7 5.5-41.8 13.8-61.5 12-27.4 37.3-74.9 39.3-112.7 1.1.8 4.6 3.2 6.2 4.1 4.6 2.7 8.1 6.7 12.6 10.3 12.4 10 28.5 9.2 42.4 1.2 6.2-3.5 11.2-7.5 15.9-9 9.9-3.1 17.8-8.6 22.3-15 7.7 30.4 25.7 74.3 37.2 95.7 6.1 11.4 18.3 35.5 23.6 64.6 3.3-.1 7 .4 10.9 1.4 13.8-35.7-11.7-74.2-23.3-84.9-4.7-4.6-4.9-6.6-2.6-6.5 12.6 11.2 29.2 33.7 35.2 59 2.8 11.6 3.3 23.7.4 35.7 16.4 6.8 35.9 17.9 30.7 34.8-2.2-.1-3.2 0-4.2 0 3.2-10.1-3.9-17.6-22.8-26.1-19.6-8.6-36-8.6-38.3 12.5-12.1 4.2-18.3 14.7-21.4 27.3-2.8 11.2-3.6 24.7-4.4 39.9-.5 7.7-3.6 18-6.8 29-32.1 22.9-76.7 32.9-114.3 7.2zm257.4-11.5c-.9 16.8-41.2 19.9-63.2 46.5-13.2 15.7-29.4 24.4-43.6 25.5s-26.5-4.8-33.7-19.3c-4.7-11.1-2.4-23.1 1.1-36.3 3.7-14.2 9.2-28.8 9.9-40.6.8-15.2 1.7-28.5 4.2-38.7 2.6-10.3 6.6-17.2 13.7-21.1.3-.2.7-.3 1-.5.8 13.2 7.3 26.6 18.8 29.5 12.6 3.3 30.7-7.5 38.4-16.3 9-.3 15.7-.9 22.6 5.1 9.9 8.5 7.1 30.3 17.1 41.6 10.6 11.6 14 19.5 13.7 24.6zM173.3 148.7c2 1.9 4.7 4.5 8 7.1 6.6 5.2 15.8 10.6 27.3 10.6 11.6 0 22.5-5.9 31.8-10.8 4.9-2.6 10.9-7 14.8-10.4s5.9-6.3 3.1-6.6-2.6 2.6-6 5.1c-4.4 3.2-9.7 7.4-13.9 9.8-7.4 4.2-19.5 10.2-29.9 10.2s-18.7-4.8-24.9-9.7c-3.1-2.5-5.7-5-7.7-6.9-1.5-1.4-1.9-4.6-4.3-4.9-1.4-.1-1.8 3.7 1.7 6.5z"],SquareJs:[448,512,[],"solid","M448 96c0-35.3-28.7-64-64-64H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96zM180.9 444.9c-33.7 0-53.2-17.4-63.2-38.5L152 385.7c6.6 11.7 12.6 21.6 27.1 21.6c13.8 0 22.6-5.4 22.6-26.5V237.7h42.1V381.4c0 43.6-25.6 63.5-62.9 63.5zm85.8-43L301 382.1c9 14.7 20.8 25.6 41.5 25.6c17.4 0 28.6-8.7 28.6-20.8c0-14.4-11.4-19.5-30.7-28l-10.5-4.5c-30.4-12.9-50.5-29.2-50.5-63.5c0-31.6 24.1-55.6 61.6-55.6c26.8 0 46 9.3 59.8 33.7L368 290c-7.2-12.9-15-18-27.1-18c-12.3 0-20.1 7.8-20.1 18c0 12.6 7.8 17.7 25.9 25.6l10.5 4.5c35.8 15.3 55.9 31 55.9 66.2c0 37.8-29.8 58.6-69.7 58.6c-39.1 0-64.4-18.6-76.7-43z"],Safari:[512,512,[],"solid","M274.69,274.69l-37.38-37.38L166,346ZM256,8C119,8,8,119,8,256S119,504,256,504,504,393,504,256,393,8,256,8ZM411.85,182.79l14.78-6.13A8,8,0,0,1,437.08,181h0a8,8,0,0,1-4.33,10.46L418,197.57a8,8,0,0,1-10.45-4.33h0A8,8,0,0,1,411.85,182.79ZM314.43,94l6.12-14.78A8,8,0,0,1,331,74.92h0a8,8,0,0,1,4.33,10.45l-6.13,14.78a8,8,0,0,1-10.45,4.33h0A8,8,0,0,1,314.43,94ZM256,60h0a8,8,0,0,1,8,8V84a8,8,0,0,1-8,8h0a8,8,0,0,1-8-8V68A8,8,0,0,1,256,60ZM181,74.92a8,8,0,0,1,10.46,4.33L197.57,94a8,8,0,1,1-14.78,6.12l-6.13-14.78A8,8,0,0,1,181,74.92Zm-63.58,42.49h0a8,8,0,0,1,11.31,0L140,128.72A8,8,0,0,1,140,140h0a8,8,0,0,1-11.31,0l-11.31-11.31A8,8,0,0,1,117.41,117.41ZM60,256h0a8,8,0,0,1,8-8H84a8,8,0,0,1,8,8h0a8,8,0,0,1-8,8H68A8,8,0,0,1,60,256Zm40.15,73.21-14.78,6.13A8,8,0,0,1,74.92,331h0a8,8,0,0,1,4.33-10.46L94,314.43a8,8,0,0,1,10.45,4.33h0A8,8,0,0,1,100.15,329.21Zm4.33-136h0A8,8,0,0,1,94,197.57l-14.78-6.12A8,8,0,0,1,74.92,181h0a8,8,0,0,1,10.45-4.33l14.78,6.13A8,8,0,0,1,104.48,193.24ZM197.57,418l-6.12,14.78a8,8,0,0,1-14.79-6.12l6.13-14.78A8,8,0,1,1,197.57,418ZM264,444a8,8,0,0,1-8,8h0a8,8,0,0,1-8-8V428a8,8,0,0,1,8-8h0a8,8,0,0,1,8,8Zm67-6.92h0a8,8,0,0,1-10.46-4.33L314.43,418a8,8,0,0,1,4.33-10.45h0a8,8,0,0,1,10.45,4.33l6.13,14.78A8,8,0,0,1,331,437.08Zm63.58-42.49h0a8,8,0,0,1-11.31,0L372,383.28A8,8,0,0,1,372,372h0a8,8,0,0,1,11.31,0l11.31,11.31A8,8,0,0,1,394.59,394.59ZM286.25,286.25,110.34,401.66,225.75,225.75,401.66,110.34ZM437.08,331h0a8,8,0,0,1-10.45,4.33l-14.78-6.13a8,8,0,0,1-4.33-10.45h0A8,8,0,0,1,418,314.43l14.78,6.12A8,8,0,0,1,437.08,331ZM444,264H428a8,8,0,0,1-8-8h0a8,8,0,0,1,8-8h16a8,8,0,0,1,8,8h0A8,8,0,0,1,444,264Z"],Python:[448,512,[],"solid","M439.8 200.5c-7.7-30.9-22.3-54.2-53.4-54.2h-40.1v47.4c0 36.8-31.2 67.8-66.8 67.8H172.7c-29.2 0-53.4 25-53.4 54.3v101.8c0 29 25.2 46 53.4 54.3 33.8 9.9 66.3 11.7 106.8 0 26.9-7.8 53.4-23.5 53.4-54.3v-40.7H226.2v-13.6h160.2c31.1 0 42.6-21.7 53.4-54.2 11.2-33.5 10.7-65.7 0-108.6zM286.2 404c11.1 0 20.1 9.1 20.1 20.3 0 11.3-9 20.4-20.1 20.4-11 0-20.1-9.2-20.1-20.4.1-11.3 9.1-20.3 20.1-20.3zM167.8 248.1h106.8c29.7 0 53.4-24.5 53.4-54.3V91.9c0-29-24.4-50.7-53.4-55.6-35.8-5.9-74.7-5.6-106.8.1-45.2 8-53.4 24.7-53.4 55.6v40.7h106.9v13.6h-147c-31.1 0-58.3 18.7-66.8 54.2-9.8 40.7-10.2 66.1 0 108.6 7.6 31.6 25.7 54.2 56.8 54.2H101v-48.8c0-35.3 30.5-66.4 66.8-66.4zm-6.7-142.6c-11.1 0-20.1-9.1-20.1-20.3.1-11.3 9-20.4 20.1-20.4 11 0 20.1 9.2 20.1 20.4s-9 20.3-20.1 20.3z"],Markdown:[640,512,[],"solid","M593.8 59.1H46.2C20.7 59.1 0 79.8 0 105.2v301.5c0 25.5 20.7 46.2 46.2 46.2h547.7c25.5 0 46.2-20.7 46.1-46.1V105.2c0-25.4-20.7-46.1-46.2-46.1zM338.5 360.6H277v-120l-61.5 76.9-61.5-76.9v120H92.3V151.4h61.5l61.5 76.9 61.5-76.9h61.5v209.2zm135.3 3.1L381.5 256H443V151.4h61.5V256H566z"],Microsoft:[448,512,[],"solid","M0 32h214.6v214.6H0V32zm233.4 0H448v214.6H233.4V32zM0 265.4h214.6V480H0V265.4zm233.4 0H448V480H233.4V265.4z"],Npm:[576,512,[],"solid","M288 288h-32v-64h32v64zm288-128v192H288v32H160v-32H0V160h576zm-416 32H32v128h64v-96h32v96h32V192zm160 0H192v160h64v-32h64V192zm224 0H352v128h64v-96h32v96h32v-96h32v96h32V192z"],Reddit:[512,512,[],"solid","M0 256C0 114.6 114.6 0 256 0S512 114.6 512 256s-114.6 256-256 256L37.1 512c-13.7 0-20.5-16.5-10.9-26.2L75 437C28.7 390.7 0 326.7 0 256zM349.6 153.6c23.6 0 42.7-19.1 42.7-42.7s-19.1-42.7-42.7-42.7c-20.6 0-37.8 14.6-41.8 34c-34.5 3.7-61.4 33-61.4 68.4l0 .2c-37.5 1.6-71.8 12.3-99 29.1c-10.1-7.8-22.8-12.5-36.5-12.5c-33 0-59.8 26.8-59.8 59.8c0 24 14.1 44.6 34.4 54.1c2 69.4 77.6 125.2 170.6 125.2s168.7-55.9 170.6-125.3c20.2-9.6 34.1-30.2 34.1-54c0-33-26.8-59.8-59.8-59.8c-13.7 0-26.3 4.6-36.4 12.4c-27.4-17-62.1-27.7-100-29.1l0-.2c0-25.4 18.9-46.5 43.4-49.9l0 0c4.4 18.8 21.3 32.8 41.5 32.8zM177.1 246.9c16.7 0 29.5 17.6 28.5 39.3s-13.5 29.6-30.3 29.6s-31.4-8.8-30.4-30.5s15.4-38.3 32.1-38.3zm190.1 38.3c1 21.7-13.7 30.5-30.4 30.5s-29.3-7.9-30.3-29.6c-1-21.7 11.8-39.3 28.5-39.3s31.2 16.6 32.1 38.3zm-48.1 56.7c-10.3 24.6-34.6 41.9-63 41.9s-52.7-17.3-63-41.9c-1.2-2.9 .8-6.2 3.9-6.5c18.4-1.9 38.3-2.9 59.1-2.9s40.7 1 59.1 2.9c3.1 .3 5.1 3.6 3.9 6.5z"],Rust:[512,512,[],"solid","M508.52,249.75,486.7,236.24c-.17-2-.34-3.93-.55-5.88l18.72-17.5a7.35,7.35,0,0,0-2.44-12.25l-24-9c-.54-1.88-1.08-3.78-1.67-5.64l15-20.83a7.35,7.35,0,0,0-4.79-11.54l-25.42-4.15c-.9-1.73-1.79-3.45-2.73-5.15l10.68-23.42a7.35,7.35,0,0,0-6.95-10.39l-25.82.91q-1.79-2.22-3.61-4.4L439,81.84A7.36,7.36,0,0,0,430.16,73L405,78.93q-2.17-1.83-4.4-3.61l.91-25.82a7.35,7.35,0,0,0-10.39-7L367.7,53.23c-1.7-.94-3.43-1.84-5.15-2.73L358.4,25.08a7.35,7.35,0,0,0-11.54-4.79L326,35.26c-1.86-.59-3.75-1.13-5.64-1.67l-9-24a7.35,7.35,0,0,0-12.25-2.44l-17.5,18.72c-1.95-.21-3.91-.38-5.88-.55L262.25,3.48a7.35,7.35,0,0,0-12.5,0L236.24,25.3c-2,.17-3.93.34-5.88.55L212.86,7.13a7.35,7.35,0,0,0-12.25,2.44l-9,24c-1.89.55-3.79,1.08-5.66,1.68l-20.82-15a7.35,7.35,0,0,0-11.54,4.79l-4.15,25.41c-1.73.9-3.45,1.79-5.16,2.73L120.88,42.55a7.35,7.35,0,0,0-10.39,7l.92,25.81c-1.49,1.19-3,2.39-4.42,3.61L81.84,73A7.36,7.36,0,0,0,73,81.84L78.93,107c-1.23,1.45-2.43,2.93-3.62,4.41l-25.81-.91a7.42,7.42,0,0,0-6.37,3.26,7.35,7.35,0,0,0-.57,7.13l10.66,23.41c-.94,1.7-1.83,3.43-2.73,5.16L25.08,153.6a7.35,7.35,0,0,0-4.79,11.54l15,20.82c-.59,1.87-1.13,3.77-1.68,5.66l-24,9a7.35,7.35,0,0,0-2.44,12.25l18.72,17.5c-.21,1.95-.38,3.91-.55,5.88L3.48,249.75a7.35,7.35,0,0,0,0,12.5L25.3,275.76c.17,2,.34,3.92.55,5.87L7.13,299.13a7.35,7.35,0,0,0,2.44,12.25l24,9c.55,1.89,1.08,3.78,1.68,5.65l-15,20.83a7.35,7.35,0,0,0,4.79,11.54l25.42,4.15c.9,1.72,1.79,3.45,2.73,5.14L42.56,391.12a7.35,7.35,0,0,0,.57,7.13,7.13,7.13,0,0,0,6.37,3.26l25.83-.91q1.77,2.22,3.6,4.4L73,430.16A7.36,7.36,0,0,0,81.84,439L107,433.07q2.18,1.83,4.41,3.61l-.92,25.82a7.35,7.35,0,0,0,10.39,6.95l23.43-10.68c1.69.94,3.42,1.83,5.14,2.73l4.15,25.42a7.34,7.34,0,0,0,11.54,4.78l20.83-15c1.86.6,3.76,1.13,5.65,1.68l9,24a7.36,7.36,0,0,0,12.25,2.44l17.5-18.72c1.95.21,3.92.38,5.88.55l13.51,21.82a7.35,7.35,0,0,0,12.5,0l13.51-21.82c2-.17,3.93-.34,5.88-.56l17.5,18.73a7.36,7.36,0,0,0,12.25-2.44l9-24c1.89-.55,3.78-1.08,5.65-1.68l20.82,15a7.34,7.34,0,0,0,11.54-4.78l4.15-25.42c1.72-.9,3.45-1.79,5.15-2.73l23.42,10.68a7.35,7.35,0,0,0,10.39-6.95l-.91-25.82q2.22-1.79,4.4-3.61L430.16,439a7.36,7.36,0,0,0,8.84-8.84L433.07,405q1.83-2.17,3.61-4.4l25.82.91a7.23,7.23,0,0,0,6.37-3.26,7.35,7.35,0,0,0,.58-7.13L458.77,367.7c.94-1.7,1.83-3.43,2.73-5.15l25.42-4.15a7.35,7.35,0,0,0,4.79-11.54l-15-20.83c.59-1.87,1.13-3.76,1.67-5.65l24-9a7.35,7.35,0,0,0,2.44-12.25l-18.72-17.5c.21-1.95.38-3.91.55-5.87l21.82-13.51a7.35,7.35,0,0,0,0-12.5Zm-151,129.08A13.91,13.91,0,0,0,341,389.51l-7.64,35.67A187.51,187.51,0,0,1,177,424.44l-7.64-35.66a13.87,13.87,0,0,0-16.46-10.68l-31.51,6.76a187.38,187.38,0,0,1-16.26-19.21H258.3c1.72,0,2.89-.29,2.89-1.91V309.55c0-1.57-1.17-1.91-2.89-1.91H213.47l.05-34.35H262c4.41,0,23.66,1.28,29.79,25.87,1.91,7.55,6.17,32.14,9.06,40,2.89,8.82,14.6,26.46,27.1,26.46H407a187.3,187.3,0,0,1-17.34,20.09Zm25.77,34.49A15.24,15.24,0,1,1,368,398.08h.44A15.23,15.23,0,0,1,383.24,413.32Zm-225.62-.68a15.24,15.24,0,1,1-15.25-15.25h.45A15.25,15.25,0,0,1,157.62,412.64ZM69.57,234.15l32.83-14.6a13.88,13.88,0,0,0,7.06-18.33L102.69,186h26.56V305.73H75.65A187.65,187.65,0,0,1,69.57,234.15ZM58.31,198.09a15.24,15.24,0,0,1,15.23-15.25H74a15.24,15.24,0,1,1-15.67,15.24Zm155.16,24.49.05-35.32h63.26c3.28,0,23.07,3.77,23.07,18.62,0,12.29-15.19,16.7-27.68,16.7ZM399,306.71c-9.8,1.13-20.63-4.12-22-10.09-5.78-32.49-15.39-39.4-30.57-51.4,18.86-11.95,38.46-29.64,38.46-53.26,0-25.52-17.49-41.59-29.4-49.48-16.76-11-35.28-13.23-40.27-13.23H116.32A187.49,187.49,0,0,1,221.21,70.06l23.47,24.6a13.82,13.82,0,0,0,19.6.44l26.26-25a187.51,187.51,0,0,1,128.37,91.43l-18,40.57A14,14,0,0,0,408,220.43l34.59,15.33a187.12,187.12,0,0,1,.4,32.54H423.71c-1.91,0-2.69,1.27-2.69,3.13v8.82C421,301,409.31,305.58,399,306.71ZM240,60.21A15.24,15.24,0,0,1,255.21,45h.45A15.24,15.24,0,1,1,240,60.21ZM436.84,214a15.24,15.24,0,1,1,0-30.48h.44a15.24,15.24,0,0,1-.44,30.48Z"],Ubuntu:[576,512,[],"solid","M469.2 75A75.6 75.6 0 1 0 317.9 75a75.6 75.6 0 1 0 151.2 0zM154.2 240.7A75.6 75.6 0 1 0 3 240.7a75.6 75.6 0 1 0 151.2 0zM57 346C75.6 392.9 108 433 150 461.1s91.5 42.6 142 41.7c-14.7-18.6-22.9-41.5-23.2-65.2c-6.8-.9-13.3-2.1-19.5-3.4c-26.8-5.7-51.9-17.3-73.6-34s-39.3-38.1-51.7-62.5c-20.9 9.9-44.5 12.8-67.1 8.2zm395.1 89.8a75.6 75.6 0 1 0 -151.2 0 75.6 75.6 0 1 0 151.2 0zM444 351.6c18.5 14.8 31.6 35.2 37.2 58.2c33.3-41.3 52.6-92.2 54.8-145.2s-12.5-105.4-42.2-149.4c-8.6 21.5-24 39.6-43.8 51.6c15.4 28.6 22.9 60.8 21.9 93.2s-10.7 64-28 91.6zM101.1 135.4c12.4 2.7 24.3 7.5 35.1 14.3c16.6-24.2 38.9-44.1 64.8-58S255.8 70.4 285.2 70c.2-5.9 .9-11.9 2-17.7c3.6-16.7 11.1-32.3 21.8-45.5c-47.7-3.8-95.4 6-137.6 28.5S94.3 91.7 70.8 133.4c2.7-.2 5.3-.3 8-.3c7.5 0 15 .8 22.4 2.3z"],Windows:[448,512,[],"solid","M0 93.7l183.6-25.3v177.4H0V93.7zm0 324.6l183.6 25.3V268.4H0v149.9zm203.8 28L448 480V268.4H203.8v177.9zm0-380.6v180.1H448V32L203.8 65.7z"],Whatsapp:[448,512,[],"regular","M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z"],"X-Twitter":[512,512,[],"regular","M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z"],Keyboard:[576,512,[],"regular","M64 112c-8.8 0-16 7.2-16 16l0 256c0 8.8 7.2 16 16 16l448 0c8.8 0 16-7.2 16-16l0-256c0-8.8-7.2-16-16-16L64 112zM0 128C0 92.7 28.7 64 64 64l448 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 448c-35.3 0-64-28.7-64-64L0 128zM176 320l224 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-224 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16zm-72-72c0-8.8 7.2-16 16-16l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16zm16-96l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16zm64 96c0-8.8 7.2-16 16-16l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16zm16-96l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16zm64 96c0-8.8 7.2-16 16-16l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16zm16-96l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16zm64 96c0-8.8 7.2-16 16-16l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16zm16-96l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16zm64 96c0-8.8 7.2-16 16-16l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16zm16-96l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16z"],IdCard:[576,512,[],"regular","M528 160l0 256c0 8.8-7.2 16-16 16l-192 0c0-44.2-35.8-80-80-80l-64 0c-44.2 0-80 35.8-80 80l-32 0c-8.8 0-16-7.2-16-16l0-256 480 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 32zM272 256a64 64 0 1 0 -128 0 64 64 0 1 0 128 0zm104-48c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-80 0zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-80 0z"],BookUser:[576,512,[],"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 32zM208 256a64 64 0 1 0 0-128 64 64 0 1 0 0 128zm-32 32c-44.2 0-80 35.8-80 80c0 8.8 7.2 16 16 16l192 0c8.8 0 16-7.2 16-16c0-44.2-35.8-80-80-80l-64 0zM376 144c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-80 0zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-80 0z"],Copy:[448,512,[],"regular","M384 336l-192 0c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l140.1 0L400 115.9 400 320c0 8.8-7.2 16-16 16zM192 384l192 0c35.3 0 64-28.7 64-64l0-204.1c0-12.7-5.1-24.9-14.1-33.9L366.1 14.1c-9-9-21.2-14.1-33.9-14.1L192 0c-35.3 0-64 28.7-64 64l0 256c0 35.3 28.7 64 64 64zM64 128c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-32-48 0 0 32c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l32 0 0-48-32 0z"],Eye:[576,512,[],"regular","M288 80c-65.2 0-118.8 29.6-159.9 67.7C89.6 183.5 63 226 49.4 256c13.6 30 40.2 72.5 78.6 108.3C169.2 402.4 222.8 432 288 432s118.8-29.6 159.9-67.7C486.4 328.5 513 286 526.6 256c-13.6-30-40.2-72.5-78.6-108.3C406.8 109.6 353.2 80 288 80zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 336c44.2 0 80-35.8 80-80s-35.8-80-80-80c-.7 0-1.3 0-2 0c1.3 5.1 2 10.5 2 16c0 35.3-28.7 64-64 64c-5.5 0-10.9-.7-16-2c0 .7 0 1.3 0 2c0 44.2 35.8 80 80 80zm0-208a128 128 0 1 1 0 256 128 128 0 1 1 0-256z"],EyeOff:[640,512,[],"regular","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zm151 118.3C226 97.7 269.5 80 320 80c65.2 0 118.8 29.6 159.9 67.7C518.4 183.5 545 226 558.6 256c-12.6 28-36.6 66.8-70.9 100.9l-53.8-42.2c9.1-17.6 14.2-37.5 14.2-58.7c0-70.7-57.3-128-128-128c-32.2 0-61.7 11.9-84.2 31.5l-46.1-36.1zM394.9 284.2l-81.5-63.9c4.2-8.5 6.6-18.2 6.6-28.3c0-5.5-.7-10.9-2-16c.7 0 1.3 0 2 0c44.2 0 80 35.8 80 80c0 9.9-1.8 19.4-5.1 28.2zm9.4 130.3C378.8 425.4 350.7 432 320 432c-65.2 0-118.8-29.6-159.9-67.7C121.6 328.5 95 286 81.4 256c8.3-18.4 21.5-41.5 39.4-64.8L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5l-41.9-33zM192 256c0 70.7 57.3 128 128 128c13.3 0 26.1-2 38.2-5.8L302 334c-23.5-5.4-43.1-21.2-53.7-42.3l-56.1-44.2c-.2 2.8-.3 5.6-.3 8.5z"],StickyNote:[448,512,[],"regular","M64 80c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l224 0 0-80c0-17.7 14.3-32 32-32l80 0 0-224c0-8.8-7.2-16-16-16L64 80zM288 480L64 480c-35.3 0-64-28.7-64-64L0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 224 0 5.5c0 17-6.7 33.3-18.7 45.3l-90.5 90.5c-12 12-28.3 18.7-45.3 18.7l-5.5 0z"],CreditCard:[576,512,[],"regular","M512 80c8.8 0 16 7.2 16 16l0 32L48 128l0-32c0-8.8 7.2-16 16-16l448 0zm16 144l0 192c0 8.8-7.2 16-16 16L64 432c-8.8 0-16-7.2-16-16l0-192 480 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 32zm56 304c-13.3 0-24 10.7-24 24s10.7 24 24 24l48 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0zm128 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l112 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-112 0z"],Hourglass:[384,512,[],"regular","M24 0C10.7 0 0 10.7 0 24S10.7 48 24 48l8 0 0 19c0 40.3 16 79 44.5 107.5L158.1 256 76.5 337.5C48 366 32 404.7 32 445l0 19-8 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l336 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 146 352 107.3 352 67l0-19 8 0c13.3 0 24-10.7 24-24s-10.7-24-24-24L24 0zM192 289.9l81.5 81.5C293 391 304 417.4 304 445l0 19L80 464l0-19c0-27.6 11-54 30.5-73.5L192 289.9zm0-67.9l-81.5-81.5C91 121 80 94.6 80 67l0-19 224 0 0 19c0 27.6-11 54-30.5 73.5L192 222.1z"],Bell:[448,512,[],"solid","M224 0c-17.7 0-32 14.3-32 32l0 19.2C119 66 64 130.6 64 208l0 18.8c0 47-17.3 92.4-48.5 127.6l-7.4 8.3c-8.4 9.4-10.4 22.9-5.3 34.4S19.4 416 32 416l384 0c12.6 0 24-7.4 29.2-18.9s3.1-25-5.3-34.4l-7.4-8.3C401.3 319.2 384 273.9 384 226.8l0-18.8c0-77.4-55-142-128-156.8L256 32c0-17.7-14.3-32-32-32zm45.3 493.3c12-12 18.7-28.3 18.7-45.3l-64 0-64 0c0 17 6.7 33.3 18.7 45.3s28.3 18.7 45.3 18.7s33.3-6.7 45.3-18.7z"],BellOff:[640,512,[],"solid","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7l-90.2-70.7c.2-.4 .4-.9 .6-1.3c5.2-11.5 3.1-25-5.3-34.4l-7.4-8.3C497.3 319.2 480 273.9 480 226.8l0-18.8c0-77.4-55-142-128-156.8L352 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 19.2c-42.6 8.6-79 34.2-102 69.3L38.8 5.1zM406.2 416L160 222.1l0 4.8c0 47-17.3 92.4-48.5 127.6l-7.4 8.3c-8.4 9.4-10.4 22.9-5.3 34.4S115.4 416 128 416l278.2 0zm-40.9 77.3c12-12 18.7-28.3 18.7-45.3l-64 0-64 0c0 17 6.7 33.3 18.7 45.3s28.3 18.7 45.3 18.7s33.3-6.7 45.3-18.7z"],Compass:[512,512,[],"solid","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm50.7-186.9L162.4 380.6c-19.4 7.5-38.5-11.6-31-31l55.5-144.3c3.3-8.5 9.9-15.1 18.4-18.4l144.3-55.5c19.4-7.5 38.5 11.6 31 31L325.1 306.7c-3.2 8.5-9.9 15.1-18.4 18.4zM288 256a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"],File:[384,512,[],"solid","M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 288c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zm384 64l-128 0L256 0 384 128z"],MessageCircle:[512,512,[],"solid","M512 240c0 114.9-114.6 208-256 208c-37.1 0-72.3-6.4-104.1-17.9c-11.9 8.7-31.3 20.6-54.3 30.6C73.6 471.1 44.7 480 16 480c-6.5 0-12.3-3.9-14.8-9.9c-2.5-6-1.1-12.8 3.4-17.4c0 0 0 0 0 0s0 0 0 0s0 0 0 0c0 0 0 0 0 0l.3-.3c.3-.3 .7-.7 1.3-1.4c1.1-1.2 2.8-3.1 4.9-5.7c4.1-5 9.6-12.4 15.2-21.6c10-16.6 19.5-38.4 21.4-62.9C17.7 326.8 0 285.1 0 240C0 125.1 114.6 32 256 32s256 93.1 256 208z"],Inbox:[512,512,[],"solid","M121 32C91.6 32 66 52 58.9 80.5L1.9 308.4C.6 313.5 0 318.7 0 323.9L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-92.1c0-5.2-.6-10.4-1.9-15.5l-57-227.9C446 52 420.4 32 391 32L121 32zm0 64l270 0 48 192-51.2 0c-12.1 0-23.2 6.8-28.6 17.7l-14.3 28.6c-5.4 10.8-16.5 17.7-28.6 17.7l-120.4 0c-12.1 0-23.2-6.8-28.6-17.7l-14.3-28.6c-5.4-10.8-16.5-17.7-28.6-17.7L73 288 121 96z"],Mail:[512,512,[],"solid","M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48L48 64zM0 176L0 384c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-208L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z"],MailOpen:[512,512,[],"solid","M64 208.1L256 65.9 448 208.1l0 47.4L289.5 373c-9.7 7.2-21.4 11-33.5 11s-23.8-3.9-33.5-11L64 255.5l0-47.4zM256 0c-12.1 0-23.8 3.9-33.5 11L25.9 156.7C9.6 168.8 0 187.8 0 208.1L0 448c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-239.9c0-20.3-9.6-39.4-25.9-51.4L289.5 11C279.8 3.9 268.1 0 256 0z"],Mic:[384,512,[],"solid","M192 0C139 0 96 43 96 96l0 160c0 53 43 96 96 96s96-43 96-96l0-160c0-53-43-96-96-96zM64 216c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c0 89.1 66.2 162.7 152 174.4l0 33.6-48 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l72 0 72 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0 0-33.6c85.8-11.7 152-85.3 152-174.4l0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c0 70.7-57.3 128-128 128s-128-57.3-128-128l0-40z"],MicOff:[640,512,[],"solid","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L472.1 344.7c15.2-26 23.9-56.3 23.9-88.7l0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c0 21.2-5.1 41.1-14.2 58.7L416 300.8 416 96c0-53-43-96-96-96s-96 43-96 96l0 54.3L38.8 5.1zM344 430.4c20.4-2.8 39.7-9.1 57.3-18.2l-43.1-33.9C346.1 382 333.3 384 320 384c-70.7 0-128-57.3-128-128l0-8.7L144.7 210c-.5 1.9-.7 3.9-.7 6l0 40c0 89.1 66.2 162.7 152 174.4l0 33.6-48 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l72 0 72 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0 0-33.6z"],Link:[640,512,["Chain"],"solid","M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"],House:[576,512,[],"solid","M575.8 255.5c0 18-15 32.1-32 32.1l-32 0 .7 160.2c0 2.7-.2 5.4-.5 8.1l0 16.2c0 22.1-17.9 40-40 40l-16 0c-1.1 0-2.2 0-3.3-.1c-1.4 .1-2.8 .1-4.2 .1L416 512l-24 0c-22.1 0-40-17.9-40-40l0-24 0-64c0-17.7-14.3-32-32-32l-64 0c-17.7 0-32 14.3-32 32l0 64 0 24c0 22.1-17.9 40-40 40l-24 0-31.9 0c-1.5 0-3-.1-4.5-.2c-1.2 .1-2.4 .2-3.6 .2l-16 0c-22.1 0-40-17.9-40-40l0-112c0-.9 0-1.9 .1-2.8l0-69.7-32 0c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L564.8 231.5c8 7 12 15 11 24z"],Gamepad:[640,512,[],"solid","M192 64C86 64 0 150 0 256S86 448 192 448l256 0c106 0 192-86 192-192s-86-192-192-192L192 64zM496 168a40 40 0 1 1 0 80 40 40 0 1 1 0-80zM392 304a40 40 0 1 1 80 0 40 40 0 1 1 -80 0zM168 200c0-13.3 10.7-24 24-24s24 10.7 24 24l0 32 32 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-32 0 0 32c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-32-32 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l32 0 0-32z"],Camera:[512,512,[],"solid","M149.1 64.8L138.7 96 64 96C28.7 96 0 124.7 0 160L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64l-74.7 0L362.9 64.8C356.4 45.2 338.1 32 317.4 32L194.6 32c-20.7 0-39 13.2-45.5 32.8zM256 192a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"],Printer:[512,512,[],"solid","M128 0C92.7 0 64 28.7 64 64l0 96 64 0 0-96 226.7 0L384 93.3l0 66.7 64 0 0-66.7c0-17-6.7-33.3-18.7-45.3L400 18.7C388 6.7 371.7 0 354.7 0L128 0zM384 352l0 32 0 64-256 0 0-64 0-16 0-16 256 0zm64 32l32 0c17.7 0 32-14.3 32-32l0-96c0-35.3-28.7-64-64-64L64 192c-35.3 0-64 28.7-64 64l0 96c0 17.7 14.3 32 32 32l32 0 0 64c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-64zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"],Server:[512,512,[],"solid","M64 32C28.7 32 0 60.7 0 96l0 64c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-64c0-35.3-28.7-64-64-64L64 32zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm48 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zM64 288c-35.3 0-64 28.7-64 64l0 64c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-64c0-35.3-28.7-64-64-64L64 288zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm56 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z"],Calendar:[448,512,[],"solid","M96 32l0 32L48 64C21.5 64 0 85.5 0 112l0 48 448 0 0-48c0-26.5-21.5-48-48-48l-48 0 0-32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 32L160 64l0-32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192L0 192 0 464c0 26.5 21.5 48 48 48l352 0c26.5 0 48-21.5 48-48l0-272z"],Pipette:[512,512,[],"solid","M341.6 29.2L240.1 130.8l-9.4-9.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-9.4-9.4L482.8 170.4c39-39 39-102.2 0-141.1s-102.2-39-141.1 0zM55.4 323.3c-15 15-23.4 35.4-23.4 56.6l0 42.4L5.4 462.2c-8.5 12.7-6.8 29.6 4 40.4s27.7 12.5 40.4 4L89.7 480l42.4 0c21.2 0 41.6-8.4 56.6-23.4L309.4 335.9l-45.3-45.3L143.4 411.3c-3 3-7.1 4.7-11.3 4.7L96 416l0-36.1c0-4.2 1.7-8.3 4.7-11.3L221.4 247.9l-45.3-45.3L55.4 323.3z"],Scroll:[576,512,[],"solid","M0 80l0 48c0 17.7 14.3 32 32 32l16 0 48 0 0-80c0-26.5-21.5-48-48-48S0 53.5 0 80zM112 32c10 13.4 16 30 16 48l0 304c0 35.3 28.7 64 64 64s64-28.7 64-64l0-5.3c0-32.4 26.3-58.7 58.7-58.7L480 320l0-192c0-53-43-96-96-96L112 32zM464 480c61.9 0 112-50.1 112-112c0-8.8-7.2-16-16-16l-245.3 0c-14.7 0-26.7 11.9-26.7 26.7l0 5.3c0 53-43 96-96 96l176 0 96 0z"],Smartphone:[384,512,[],"solid","M16 64C16 28.7 44.7 0 80 0L304 0c35.3 0 64 28.7 64 64l0 384c0 35.3-28.7 64-64 64L80 512c-35.3 0-64-28.7-64-64L16 64zM144 448c0 8.8 7.2 16 16 16l64 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-64 0c-8.8 0-16 7.2-16 16zM304 64L80 64l0 320 224 0 0-320z"],Settings:[512,512,[],"solid","M495.9 166.6c3.2 8.7 .5 18.4-6.4 24.6l-43.3 39.4c1.1 8.3 1.7 16.8 1.7 25.4s-.6 17.1-1.7 25.4l43.3 39.4c6.9 6.2 9.6 15.9 6.4 24.6c-4.4 11.9-9.7 23.3-15.8 34.3l-4.7 8.1c-6.6 11-14 21.4-22.1 31.2c-5.9 7.2-15.7 9.6-24.5 6.8l-55.7-17.7c-13.4 10.3-28.2 18.9-44 25.4l-12.5 57.1c-2 9.1-9 16.3-18.2 17.8c-13.8 2.3-28 3.5-42.5 3.5s-28.7-1.2-42.5-3.5c-9.2-1.5-16.2-8.7-18.2-17.8l-12.5-57.1c-15.8-6.5-30.6-15.1-44-25.4L83.1 425.9c-8.8 2.8-18.6 .3-24.5-6.8c-8.1-9.8-15.5-20.2-22.1-31.2l-4.7-8.1c-6.1-11-11.4-22.4-15.8-34.3c-3.2-8.7-.5-18.4 6.4-24.6l43.3-39.4C64.6 273.1 64 264.6 64 256s.6-17.1 1.7-25.4L22.4 191.2c-6.9-6.2-9.6-15.9-6.4-24.6c4.4-11.9 9.7-23.3 15.8-34.3l4.7-8.1c6.6-11 14-21.4 22.1-31.2c5.9-7.2 15.7-9.6 24.5-6.8l55.7 17.7c13.4-10.3 28.2-18.9 44-25.4l12.5-57.1c2-9.1 9-16.3 18.2-17.8C227.3 1.2 241.5 0 256 0s28.7 1.2 42.5 3.5c9.2 1.5 16.2 8.7 18.2 17.8l12.5 57.1c15.8 6.5 30.6 15.1 44 25.4l55.7-17.7c8.8-2.8 18.6-.3 24.5 6.8c8.1 9.8 15.5 20.2 22.1 31.2l4.7 8.1c6.1 11 11.4 22.4 15.8 34.3zM256 336a80 80 0 1 0 0-160 80 80 0 1 0 0 160z"],Map:[576,512,[],"solid","M384 476.1L192 421.2l0-385.3L384 90.8l0 385.3zm32-1.2l0-386.5L543.1 37.5c15.8-6.3 32.9 5.3 32.9 22.3l0 334.8c0 9.8-6 18.6-15.1 22.3L416 474.8zM15.1 95.1L160 37.2l0 386.5L32.9 474.5C17.1 480.8 0 469.2 0 452.2L0 117.4c0-9.8 6-18.6 15.1-22.3z"],Folder:[512,512,[],"solid","M64 480H448c35.3 0 64-28.7 64-64V160c0-35.3-28.7-64-64-64H288c-10.1 0-19.6-4.7-25.6-12.8L243.2 57.6C231.1 41.5 212.1 32 192 32H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64z"],FolderOpen:[576,512,[],"solid","M384 480l48 0c11.4 0 21.9-6 27.6-15.9l112-192c5.8-9.9 5.8-22.1 .1-32.1S555.5 224 544 224l-400 0c-11.4 0-21.9 6-27.6 15.9L48 357.1 48 96c0-8.8 7.2-16 16-16l117.5 0c4.2 0 8.3 1.7 11.3 4.7l26.5 26.5c21 21 49.5 32.8 79.2 32.8L416 144c8.8 0 16 7.2 16 16l0 32 48 0 0-32c0-35.3-28.7-64-64-64L298.5 96c-17 0-33.3-6.7-45.3-18.7L226.7 50.7c-12-12-28.3-18.7-45.3-18.7L64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l23.7 0L384 480z"],FolderClosed:[512,512,[],"solid","M448 480L64 480c-35.3 0-64-28.7-64-64L0 192l512 0 0 224c0 35.3-28.7 64-64 64zm64-320L0 160 0 96C0 60.7 28.7 32 64 32l128 0c20.1 0 39.1 9.5 51.2 25.6l19.2 25.6c6 8.1 15.5 12.8 25.6 12.8l160 0c35.3 0 64 28.7 64 64z"],Function:[384,512,[],"solid","M314.7 32c-38.8 0-73.7 23.3-88.6 59.1L170.7 224 64 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l80 0L98.9 396.3c-5 11.9-16.6 19.7-29.5 19.7L32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l37.3 0c38.8 0 73.7-23.3 88.6-59.1L213.3 288 320 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-80 0 45.1-108.3c5-11.9 16.6-19.7 29.5-19.7L352 96c17.7 0 32-14.3 32-32s-14.3-32-32-32l-37.3 0z"],Stop:[384,512,[],"solid","M0 128C0 92.7 28.7 64 64 64H320c35.3 0 64 28.7 64 64V384c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128z"],Image:[512,512,[],"solid","M448 80c8.8 0 16 7.2 16 16l0 319.8-5-6.5-136-176c-4.5-5.9-11.6-9.3-19-9.3s-14.4 3.4-19 9.3L202 340.7l-30.5-42.7C167 291.7 159.8 288 152 288s-15 3.7-19.5 10.1l-80 112L48 416.3l0-.3L48 96c0-8.8 7.2-16 16-16l384 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zm80 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"],Images:[576,512,[],"solid","M160 80l352 0c8.8 0 16 7.2 16 16l0 224c0 8.8-7.2 16-16 16l-21.2 0L388.1 178.9c-4.4-6.8-12-10.9-20.1-10.9s-15.7 4.1-20.1 10.9l-52.2 79.8-12.4-16.9c-4.5-6.2-11.7-9.8-19.4-9.8s-14.8 3.6-19.4 9.8L175.6 336 160 336c-8.8 0-16-7.2-16-16l0-224c0-8.8 7.2-16 16-16zM96 96l0 224c0 35.3 28.7 64 64 64l352 0c35.3 0 64-28.7 64-64l0-224c0-35.3-28.7-64-64-64L160 32c-35.3 0-64 28.7-64 64zM48 120c0-13.3-10.7-24-24-24S0 106.7 0 120L0 344c0 75.1 60.9 136 136 136l320 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-320 0c-48.6 0-88-39.4-88-88l0-224zm208 24a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"],Info:[512,512,[],"solid","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"],Bone:[576,512,[],"solid","M153.7 144.8c6.9 16.3 20.6 31.2 38.3 31.2l192 0c17.7 0 31.4-14.9 38.3-31.2C434.4 116.1 462.9 96 496 96c44.2 0 80 35.8 80 80c0 30.4-17 56.9-42 70.4c-3.6 1.9-6 5.5-6 9.6s2.4 7.7 6 9.6c25 13.5 42 40 42 70.4c0 44.2-35.8 80-80 80c-33.1 0-61.6-20.1-73.7-48.8C415.4 350.9 401.7 336 384 336l-192 0c-17.7 0-31.4 14.9-38.3 31.2C141.6 395.9 113.1 416 80 416c-44.2 0-80-35.8-80-80c0-30.4 17-56.9 42-70.4c3.6-1.9 6-5.5 6-9.6s-2.4-7.7-6-9.6C17 232.9 0 206.4 0 176c0-44.2 35.8-80 80-80c33.1 0 61.6 20.1 73.7 48.8z"],Puzzle:[512,512,[],"solid","M192 104.8c0-9.2-5.8-17.3-13.2-22.8C167.2 73.3 160 61.3 160 48c0-26.5 28.7-48 64-48s64 21.5 64 48c0 13.3-7.2 25.3-18.8 34c-7.4 5.5-13.2 13.6-13.2 22.8c0 12.8 10.4 23.2 23.2 23.2l56.8 0c26.5 0 48 21.5 48 48l0 56.8c0 12.8 10.4 23.2 23.2 23.2c9.2 0 17.3-5.8 22.8-13.2c8.7-11.6 20.7-18.8 34-18.8c26.5 0 48 28.7 48 64s-21.5 64-48 64c-13.3 0-25.3-7.2-34-18.8c-5.5-7.4-13.6-13.2-22.8-13.2c-12.8 0-23.2 10.4-23.2 23.2L384 464c0 26.5-21.5 48-48 48l-56.8 0c-12.8 0-23.2-10.4-23.2-23.2c0-9.2 5.8-17.3 13.2-22.8c11.6-8.7 18.8-20.7 18.8-34c0-26.5-28.7-48-64-48s-64 21.5-64 48c0 13.3 7.2 25.3 18.8 34c7.4 5.5 13.2 13.6 13.2 22.8c0 12.8-10.4 23.2-23.2 23.2L48 512c-26.5 0-48-21.5-48-48L0 343.2C0 330.4 10.4 320 23.2 320c9.2 0 17.3 5.8 22.8 13.2C54.7 344.8 66.7 352 80 352c26.5 0 48-28.7 48-64s-21.5-64-48-64c-13.3 0-25.3 7.2-34 18.8C40.5 250.2 32.4 256 23.2 256C10.4 256 0 245.6 0 232.8L0 176c0-26.5 21.5-48 48-48l120.8 0c12.8 0 23.2-10.4 23.2-23.2z"],Lock:[448,512,[],"solid","M144 144l0 48 160 0 0-48c0-44.2-35.8-80-80-80s-80 35.8-80 80zM80 192l0-48C80 64.5 144.5 0 224 0s144 64.5 144 144l0 48 16 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 256c0-35.3 28.7-64 64-64l16 0z"],LockOpen:[576,512,[],"solid","M352 144c0-44.2 35.8-80 80-80s80 35.8 80 80l0 48c0 17.7 14.3 32 32 32s32-14.3 32-32l0-48C576 64.5 511.5 0 432 0S288 64.5 288 144l0 48L64 192c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-192c0-35.3-28.7-64-64-64l-32 0 0-48z"],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"],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"],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"],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"],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"],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"],User:[512,512,[],"solid","M256 288A144 144 0 1 0 256 0a144 144 0 1 0 0 288zm-94.7 32C72.2 320 0 392.2 0 481.3c0 17 13.8 30.7 30.7 30.7l450.6 0c17 0 30.7-13.8 30.7-30.7C512 392.2 439.8 320 350.7 320l-189.4 0z"],HardDriveDownload:[512,512,[],"solid","M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 242.7-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7 288 32zM64 352c-35.3 0-64 28.7-64 64l0 32c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-32c0-35.3-28.7-64-64-64l-101.5 0-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352 64 352zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"],HardDriveUpload:[512,512,[],"solid","M288 109.3L288 352c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-242.7-73.4 73.4c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l128-128c12.5-12.5 32.8-12.5 45.3 0l128 128c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L288 109.3zM64 352l128 0c0 35.3 28.7 64 64 64s64-28.7 64-64l128 0c35.3 0 64 28.7 64 64l0 32c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64l0-32c0-35.3 28.7-64 64-64zM432 456a24 24 0 1 0 0-48 24 24 0 1 0 0 48z"],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"],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"],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"],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"],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"],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"],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"],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"],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"],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"],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"],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"],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"],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"],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"],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"],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"],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"],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"],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"],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"],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"],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"],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"],"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"],"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"],"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"],"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"],"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"]};e.ICONS=(()=>{const e={};for(let t in h){h[t][2].forEach((s=>e[s]=t))}return{...h,...e}})(),e.LucideIconAlias={Stop:"Square",Refresh:"RefreshCw",Left:"ChevronLeft",Right:"ChevronRight",Up:"ChevronUp",Down:"ChevronDown",MenuArrows:"ChevronsUpDown",RotateForward:"RotateCw",RotateRight:"RotateCw",RotateBack:"RotateCcw",RotateLeft:"RotateCcw"},e.clamp=function(e,t,s){return Math.min(Math.max(e,t),s)},e.round=function(e,t){return 0==t?Math.floor(e):+e.toFixed(t??2).replace(/([0-9]+(\.[0-9]+[1-9])?)(\.?0+$)/,"$1")},e.remapRange=function(e,t,s,n,i){return(e-t)*(i-n)/(s-t)+n},"undefined"!=typeof performance?e.getTime=performance.now.bind(performance):"undefined"!=typeof Date&&Date.now?e.getTime=Date.now.bind(Date):"undefined"!=typeof process?e.getTime=function(){const e=process.hrtime();return.001*e[0]+1e-6*e[1]}:e.getTime=function(){return(new Date).getTime()},e.doAsync=function(e,t){setTimeout(e,t??0)},e.getSupportedDOMName=function(e){console.assert("string"==typeof e,"getSupportedDOMName: Text is not a string!");let t=e.trim();return t=t.replace(/@/g,"_at_").replace(/\+/g,"_plus_").replace(/\./g,"_dot_"),t=t.replace(/[^a-zA-Z0-9_-]/g,"_"),/^[0-9]/.test(t)&&(t="_"+t),t},e.has=function(t){return e.components.indexOf(t)>-1},e.getExtension=function(e){return e.includes(".")?e.split(".").pop():null},e.stripHTML=function(e){const t=document.createElement("div");return t.innerHTML=e,t.textContent||t.innerText||""};const u=(e,t)=>{if(e.constructor===Number)return e;if(e.constructor===String){const s=parseFloat(e);if(e.endsWith("px"))return s;if(e.endsWith("%"))return s/100*t;if(e.endsWith("rem")||e.endsWith("em")){return s*16}if(e.endsWith("vw"))return s/100*window.innerWidth;if(e.endsWith("vh"))return s/100*window.innerHeight;if(e.startsWith("calc(")){const s=e.slice(5,-1).split(/([+\-])/);let n=0,i="+";for(let e of s)if(e=e.trim(),"+"===e||"-"===e)i=e;else{let s=u(e,t);n="+"===i?n+s:n-s}return n}}throw"Bad size format!"};function p(t){t="light"==t?"light":"dark",document.documentElement.setAttribute("data-theme",t),e.emit("@on_new_color_scheme",t)}function m(){return document.documentElement.getAttribute("data-theme")??"dark"}function g(e){if(!/^#(?:[A-Fa-f0-9]{3,4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/.test(e))throw`Invalid Hex Color: ${e}`;3!==(e=e.replace(/^#/,"")).length&&4!==e.length||(e=e.split("").map((e=>e+e)).join(""));const t=parseInt(e,16);return{r:(t>>(8===e.length?24:16)&255)/255,g:(t>>(8===e.length?16:8)&255)/255,b:(t>>(8===e.length?8:0)&255)/255,a:(8===e.length?255&t:4===e.length?parseInt(e.slice(-2),16):255)/255}}function f(e){let{r:t,g:s,b:n,a:i}=e;i=i??1;const o=Math.max(t,s,n),l=o-Math.min(t,s,n);let a=0;0!==l&&(a=o===t?(s-n)/l%6:o===s?(n-t)/l+2:(t-s)/l+4,a*=60,a<0&&(a+=360));return{h:a,s:0===o?0:l/o,v:o,a:i}}e.parsePixelSize=u,e.deepCopy=function(e){return JSON.parse(JSON.stringify(e))},e.setTheme=p,e.getTheme=m,e.switchTheme=function(){p("dark"==m()?"light":"dark")},e.setThemeColor=function(e,t){document.querySelector(":root").style.setProperty("--"+e,t)},e.getThemeColor=function(e){const t=getComputedStyle(document.querySelector(":root")),s=t.getPropertyValue("--"+e);if(s.includes("light-dark")){return"light"==t.getPropertyValue("color-scheme")?s.substring(s.indexOf("(")+1,s.indexOf(",")).replace(/\s/g,""):s.substring(s.indexOf(",")+1,s.indexOf(")")).replace(/\s/g,"")}return s},e.getBase64Image=function(e){const t=document.createElement("canvas");return t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0),t.toDataURL("image/png")},e.hexToRgb=g,e.hexToHsv=function(e){return f(g(e))},e.rgbToHex=function(e,t=255){const s=[e.r,e.g,e.b];return null!=e.a&&s.push(e.a),"#"+s.map((e=>{const s=(e=Math.floor(e*t)).toString(16);return 1===s.length?"0"+s:s})).join("")},e.rgbToCss=function(e){return{r:Math.floor(255*e.r),g:Math.floor(255*e.g),b:Math.floor(255*e.b),a:e.a}},e.rgbToHsv=f,e.hsvToRgb=function(e){const{h:t,s:s,v:n,a:i}=e,o=n*s,l=o*(1-Math.abs(t/60%2-1)),a=n-o;let r=0,c=0,d=0;return t<60?(r=o,c=l,d=0):t<120?(r=l,c=o,d=0):t<180?(r=0,c=o,d=l):t<240?(r=0,c=l,d=o):t<300?(r=l,c=0,d=o):(r=o,c=0,d=l),{r:r+a,g:c+a,b:d+a,a:i}},e.measureRealWidth=function(t,s=8){var n=document.createElement("span");n.className="lexinputmeasure",n.innerHTML=t,document.body.appendChild(n);var i=n.getBoundingClientRect();return e.UTILS.deleteElement(n),i.width+s},e.guidGenerator=function(){var e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return e()+"-"+e()+"-"+e()},e.buildTextPattern=function(e={}){let t=[];e.lowercase&&t.push("(?=.*[a-z])"),e.uppercase&&t.push("(?=.*[A-Z])"),e.digit&&t.push("(?=.*\\d)"),e.specialChar&&t.push("(?=.*[@#$%^&+=!])"),e.noSpaces&&t.push("(?!.*\\s)");let s=e.minLength||0,n=e.maxLength||"",i=`^${t.join("")}.{${s},${n}}$`;return e.asRegExp?new RegExp(i):i},e.makeDraggable=function(t,s={}){let n=0,i=0,o=null,l=s.targetClass,a=s.dragMargin??3,r=(s,o,l)=>{const r=t.parentElement?t.parentElement.getBoundingClientRect():{x:0,y:0,width:0,height:0},c="fixed"==t.style.position?new e.vec2(r.x,r.y):new e.vec2;l=l??s.clientX-n-r.x,o=o??s.clientY-i-r.y,t.style.left=e.clamp(l,a+c.x,c.x+r.width-t.offsetWidth-a)+"px",t.style.top=e.clamp(o,a+c.y,c.y+r.height-t.offsetHeight-a)+"px",t.style.translate="none"};s.autoAdjust&&r(null,parseInt(t.style.left),parseInt(t.style.top));let c=e.guidGenerator();t["draggable-id"]=c;let d=s.onMove?e=>{o&&s.onMove&&s.onMove(o)}:e=>{o&&r(e)},h=s.onDragStart;t.setAttribute("draggable",!0),t.addEventListener("mousedown",(function(e){o=e.target.classList.contains(l)||!l?e.target:null})),t.addEventListener("dragstart",(function(l){if(l.preventDefault(),l.stopPropagation(),l.stopImmediatePropagation(),!o)return;var a=new Image;a.src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=",l.dataTransfer.setDragImage(a,0,0),l.dataTransfer.effectAllowed="move";const r=l.target.getBoundingClientRect(),c=o.parentElement.getBoundingClientRect(),u="fixed"==o.style.position?new e.vec2(c.x,c.y):new e.vec2;n=l.clientX-r.x-u.x,i=l.clientY-r.y-u.y,document.addEventListener("mousemove",d),o.eventCatched=!0,(s.updateLayers??1)&&(e.activeDraggable&&(e.activeDraggable.style.zIndex=e.DRAGGABLE_Z_INDEX),e.activeDraggable=t,e.activeDraggable.style.zIndex=e.DRAGGABLE_Z_INDEX+1),h&&h(o,l)}),!1),document.addEventListener("mouseup",(e=>{o&&(o=null,document.removeEventListener("mousemove",d))}))},e.makeCollapsible=function(t,s,n,i={}){t.classList.add("collapsible");const o=i.collapsed??!0,l=e.makeIcon("Right");l.classList.add("collapser"),l.dataset.collapsed=o,l.style.marginLeft="auto",l.style.marginRight="0.2rem",l.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation(),this.dataset.collapsed?(delete this.dataset.collapsed,s.style.display="block"):(this.dataset.collapsed=!0,s.style.display="none")})),t.appendChild(l),(n=n??t.parentElement).appendChild(s)},e.makeCodeSnippet=function(t,s,n={}){if(!e.has("CodeEditor"))return void console.error("Import the CodeEditor component to create snippets!");const i=document.createElement("div");i.className="lexcodesnippet "+(n.className??""),i.style.width=s?s[0]:"auto",i.style.height=s?s[1]:"auto";const o=new e.Area({noAppend:!0});let l=new e.CodeEditor(o,{skipInfo:!0,disableEdition:!0,allowAddScripts:!1,name:n.tabName});if(l.setText(t,n.language??"Plain Text"),n.linesAdded){const e=l.root.querySelector(".code");for(let t of n.linesAdded)if(t.constructor==Number)e.childNodes[t-1].classList.add("added");else if(t.constructor==Array)for(let s=t[0]-1;s<=t[1]-1;s++)e.childNodes[s].classList.add("added")}if(n.linesRemoved){const e=l.root.querySelector(".code");for(let t of n.linesRemoved)if(t.constructor==Number)e.childNodes[t-1].classList.add("removed");else if(t.constructor==Array)for(let s=t[0]-1;s<=t[1]-1;s++)e.childNodes[s].classList.add("removed")}if(n.windowMode){const e=document.createElement("div");e.className="lexwindowbuttons";const t=document.createElement("span");t.style.background="#ee4f50";const s=document.createElement("span");s.style.background="#f5b720";const n=document.createElement("span");n.style.background="#53ca29",e.appendChild(t),e.appendChild(s),e.appendChild(n);l.root.querySelector(".lexareatabs").prepend(e)}return(n.lineNumbers??1)||l.root.classList.add("no-gutter"),i.appendChild(o.root),i},e.makeKbd=function(t,s=""){const n={Ctrl:"⌃",Enter:"↩",Shift:"⇧",CapsLock:"⇪",Meta:"⌘",Option:"⌥",Alt:"⌥",Tab:"⇥",ArrowUp:"↑",ArrowDown:"↓",ArrowLeft:"←",ArrowRight:"→",Space:"␣"},i=e.makeContainer(["auto","auto"],"flex flex-row ml-auto");for(const s of t)e.makeContainer(["auto","auto"],"self-center text-xs fg-secondary select-none",n[s]??s,i);return i},e.makeIcon=function(t,s={}){let n=null;const i=e=>{s.svgClass&&s.svgClass.length&&s.svgClass.split(" ").forEach((t=>e.classList.add(t)));const n=document.createElement("a");return n.title=s.title??"",n.className="lexicon "+(s.iconClass??""),n.appendChild(e),e.dataset.name=t,n};if(t.includes("@")){const e=t.split("@");t=e[0],s.variant=e[1]}let o=e.ICONS[t];const l=lucide[t]??lucide[e.LucideIconAlias[t]];if(o){o.constructor==String&&(o=e.ICONS[o]);const a=s.variant??"regular";o=("solid"==a?e.ICONS[`${t}@solid`]:o)??o;const r=o[3];if(a==r||!l||"regular"==r){if(n=document.createElementNS("http://www.w3.org/2000/svg","svg"),n.setAttribute("viewBox",`0 0 ${o[0]} ${o[1]}`),o[5]){const e=o[5].svgClass;e?.split(" ").forEach((e=>{n.classList.add(e)}));const t=o[5].svgAttributes;t?.split(" ").forEach((e=>{const t=e.split("=");n.setAttribute(t[0],t[1])}))}const e=document.createElement("path");if(e.setAttribute("fill","currentColor"),e.setAttribute("d",o[4]),n.appendChild(e),o[5]){const t=o[5].pathClass;t?.split(" ").forEach((t=>{e.classList.add(t)}));const s=o[5].pathAttributes;s?.split(" ").forEach((t=>{const s=t.split("=");e.setAttribute(s[0],s[1])}))}const t="\x3c!-- This icon might belong to a collection from Iconify - https://iconify.design/ - or !Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc. --\x3e";return n.innerHTML+=t,i(n)}}return console.assert(l,`No existing icon named _${t}_`),n=lucide.createElement(l,s),i(n)},e.registerIcon=function(t,s,n="none",i=[]){const o=(new DOMParser).parseFromString(s,"image/svg+xml").documentElement,l=o.querySelector("path"),a=o.getAttribute("viewBox").split(" "),r=l.getAttribute("d");let c=[],d=[];for(const e of o.attributes)switch(e.name){case"transform":case"fill":case"stroke-width":case"stroke-linecap":case"stroke-linejoin":c.push(`${e.name}=${e.value}`)}for(const e of l.attributes)switch(e.name){case"transform":case"fill":case"stroke-width":case"stroke-linecap":case"stroke-linejoin":d.push(`${e.name}=${e.value}`)}const h=[parseInt(a[2]),parseInt(a[3]),i,n,r,{svgAttributes:c.length?c.join(" "):null,pathAttributes:d.length?d.join(" "):null}];e.ICONS[t]&&console.warn(`${t} will be added/replaced in LX.ICONS`),e.ICONS[t]=h},e.registerCommandbarEntry=function(t,s){e.extraCommandbarEntries.push({name:t,callback:s})},e.UTILS={compareThreshold:(e,t,s,n)=>Math.abs(e-t)>=n||Math.abs(e-s)>=n,compareThresholdRange:(e,t,s,n)=>e>=s&&e<=n||t>=s&&t<=n||e<=s&&t>=n,deleteElement(e){e&&e.remove()},flushCss(e){e.offsetHeight},getControlPoints(e,t,s,n,i,o,l){var a=Math.sqrt(Math.pow(s-e,2)+Math.pow(n-t,2)),r=l*a/(a+Math.sqrt(Math.pow(i-s,2)+Math.pow(o-n,2))),c=l-r;return[s+r*(e-i),n+r*(t-o),s-c*(e-i),n-c*(t-o)]},drawSpline(t,s,n){t.save();for(var i=[],o=s.length,l=0;l<o-4;l+=2)i=i.concat(e.UTILS.getControlPoints(s[l],s[l+1],s[l+2],s[l+3],s[l+4],s[l+5],n));for(l=2;l<s.length-5;l+=2)t.beginPath(),t.moveTo(s[l],s[l+1]),t.bezierCurveTo(i[2*l-2],i[2*l-1],i[2*l],i[2*l+1],s[l+2],s[l+3]),t.stroke(),t.closePath();t.beginPath(),t.moveTo(s[0],s[1]),t.quadraticCurveTo(i[0],i[1],s[2],s[3]),t.stroke(),t.closePath(),t.beginPath(),t.moveTo(s[o-2],s[o-1]),t.quadraticCurveTo(i[2*o-10],i[2*o-9],s[o-4],s[o-3]),t.stroke(),t.closePath(),t.restore()}};class C{constructor(t={}){var s=document.createElement("div");s.className="lexarea",t.id&&(s.id=t.id),t.className&&(s.className+=" "+t.className);var n=t.width||"100%",i=t.height||"100%";this.setLimitBox(t.minWidth,t.minHeight,t.maxWidth,t.maxHeight),n.constructor==Number&&(n+="px"),i.constructor==Number&&(i+="px"),s.style.width=n,s.style.height=i,this.offset=0,this.root=s,this.size=[this.root.offsetWidth,this.root.offsetHeight],this.sections=[],this.panels=[];let o=document.getElementById("lexroot");o&&!t.skipAppend&&o.appendChild(this.root);let l=t.overlay;if(l){this.root.classList.add("overlay-"+l),t.left?this.root.style.left=t.left:t.right?this.root.style.right=t.right:t.top?this.root.style.top=t.top:t.bottom&&(this.root.style.bottom=t.bottom);if((t.draggable??!0)&&e.makeDraggable(s,t),t.resizeable&&s.classList.add("resizeable"),t.resize){this.splitBar=document.createElement("div");let a="left"==l||"right"==l?"horizontal":"vertical";if(this.type=l,this.splitBar.className="lexsplitbar "+a,"right"==l)this.splitBar.style.width=e.DEFAULT_SPLITBAR_SIZE+"px",this.splitBar.style.left=-e.DEFAULT_SPLITBAR_SIZE/2+"px";else if("left"==l){let p=Math.min(document.body.clientWidth-e.DEFAULT_SPLITBAR_SIZE,this.root.clientWidth);this.splitBar.style.width=e.DEFAULT_SPLITBAR_SIZE+"px",this.splitBar.style.left=p+e.DEFAULT_SPLITBAR_SIZE/2+"px"}else if("top"==l){let m=Math.min(document.body.clientHeight-e.DEFAULT_SPLITBAR_SIZE,this.root.clientHeight);this.splitBar.style.height=e.DEFAULT_SPLITBAR_SIZE+"px",this.splitBar.style.top=m+e.DEFAULT_SPLITBAR_SIZE/2+"px"}else"bottom"==l&&(this.splitBar.style.height=e.DEFAULT_SPLITBAR_SIZE+"px",this.splitBar.style.top=-e.DEFAULT_SPLITBAR_SIZE/2+"px");this.splitBar.addEventListener("mousedown",d),this.root.appendChild(this.splitBar);const r=this;let c=[0,0];function d(e){const t=r.root.ownerDocument;t.addEventListener("mousemove",h),t.addEventListener("mouseup",u),c[0]=e.x,c[1]=e.y,e.stopPropagation(),e.preventDefault(),document.body.classList.add("nocursor"),r.splitBar.classList.add("nocursor")}function h(t){switch(r.type){case"right":var s=c[0]-t.x,n=r.root.offsetWidth+s;r.root.style.width=n+"px";break;case"left":s=c[0]-t.x,n=Math.min(document.body.clientWidth-e.DEFAULT_SPLITBAR_SIZE,r.root.offsetWidth-s);r.root.style.width=n+"px",r.splitBar.style.left=n+e.DEFAULT_SPLITBAR_SIZE/2+"px";break;case"top":s=c[1]-t.y,n=Math.min(document.body.clientHeight-e.DEFAULT_SPLITBAR_SIZE,r.root.offsetHeight-s);r.root.style.height=n+"px",r.splitBar.style.top=n+e.DEFAULT_SPLITBAR_SIZE/2+"px";break;case"bottom":s=c[1]-t.y,n=r.root.offsetHeight+s;r.root.style.height=n+"px"}c[0]=t.x,c[1]=t.y,t.stopPropagation(),t.preventDefault(),r.onresize&&r.onresize(r.root.getBoundingClientRect())}function u(e){const t=r.root.ownerDocument;t.removeEventListener("mousemove",h),t.removeEventListener("mouseup",u),document.body.classList.remove("nocursor"),r.splitBar.classList.remove("nocursor")}}}}attach(e){if(this.sections.length)return void this.sections[1].attach(e);if(!e)throw"no content to attach";e.parent=this;let t=e.root?e.root:e;this.root.appendChild(t)}split(t={}){this.sections.length&&(this.offset=this.root.childNodes[0].offsetHeight,this._root=this.sections[0].root,this.root=this.sections[1].root);const s=t.type??"horizontal",n=t.sizes||["50%","50%"],i="auto"===t.sizes||t.sizes&&"auto"==t.sizes[0]&&"auto"==t.sizes[1],o=this.root.getBoundingClientRect();if(!n[1]||"auto"!=n[0]&&"auto"==n[1]){let e=n[0],s=t.top?t.top:0;e.constructor==Number&&(e+=s,e+="px"),n[1]="calc( 100% - "+e+" )"}let l=t.minimizable??!1,a=(t.resize??!0)||l,r=t.fixedSize??!a,c=0,d=[],h=[];if(this.offset=0,a&&(this.resize=a,this.splitBar=document.createElement("div"),this.splitBar.className="lexsplitbar "+s,"horizontal"==s?this.splitBar.style.width=e.DEFAULT_SPLITBAR_SIZE+"px":this.splitBar.style.height=e.DEFAULT_SPLITBAR_SIZE+"px",this.splitBar.addEventListener("mousedown",(function(e){const t=m.root.ownerDocument;t.addEventListener("mousemove",g),t.addEventListener("mouseup",f),e.stopPropagation(),e.preventDefault(),document.body.classList.add("nocursor"),m.splitBar.classList.add("nocursor")})),c=e.DEFAULT_SPLITBAR_SIZE/2),"horizontal"==s){if(this.root.style.display="flex",r)d[0]=`calc(${n[0]} - ${c}px)`,h[0]=`calc(${n[1]} - ${c}px)`;else{const t=o.width,s=e.parsePixelSize(n[0],t)/t*100,i=e.parsePixelSize(n[1],t)/t*100;d[0]=`calc(${s}% - ${c}px)`,h[0]=`calc(${i}% - ${c}px)`}d[1]="100%",h[1]="100%"}else{if(i)d[1]="auto",h[1]="auto";else if(r)d[1]="auto"==n[0]?"auto":`calc(${n[0]} - ${c}px)`,h[1]="auto"==n[1]?"auto":`calc(${n[1]} - ${c}px)`;else{const t=o.height,s=e.parsePixelSize(n[0],t)/t*100,i=e.parsePixelSize(n[1],t)/t*100;d[1]="auto"==n[0]?"auto":`calc(${s}% - ${c}px)`,h[1]="auto"==n[1]?"auto":`calc(${i}% - ${c}px)`}d[0]="100%",h[0]="100%"}let u=new C({width:d[0],height:d[1],skipAppend:!0,className:"split"+(t.menubar||t.sidebar?"":" origin")}),p=new C({width:h[0],height:h[1],skipAppend:!0,className:"split"});if(!(r||o.width&&o.height)){const t=new ResizeObserver((o=>{console.assert(1==o.length,"AreaResizeObserver: more than one entry");const l=o[0].contentRect;if(l.width&&l.height){if(this._update([l.width,l.height],!1),!i){if("horizontal"==s){const t=l.width,s=e.parsePixelSize(n[0],t)/t*100,i=e.parsePixelSize(n[1],t)/t*100;d[0]=`calc(${s}% - ${c}px)`,h[0]=`calc(${i}% - ${c}px)`}else{const t=l.height,s=e.parsePixelSize(n[0],t)/t*100,i=e.parsePixelSize(n[1],t)/t*100;d[1]="auto"==n[0]?"auto":`calc(${s}% - ${c}px)`,h[1]="auto"==n[1]?"auto":`calc(${i}% - ${c}px)`}u.root.style.width=d[0],u.root.style.height=d[1],p.root.style.width=h[0],p.root.style.height=h[1]}u._update(),p._update(),t.disconnect()}}));e.doAsync((()=>{t.observe(this.root)}),100)}if(i&&"vertical"==s){const e=new ResizeObserver((t=>{for(const e of t){const t=e.target.getComputedSize();p.root.style.height="calc(100% - "+t.height+"px )"}e.disconnect()}));e.observe(u.root)}if(a&&l&&(this.splitExtended=!1,p.root.addEventListener("animationend",(t=>{const n=getComputedStyle(p.root).opacity;p.root.classList.remove(t.animationName+"-"+s),p.root.style.opacity=n,e.flushCss(p.root)})),this.splitBar.addEventListener("contextmenu",(t=>{t.preventDefault(),e.addContextMenu(null,t,(e=>{e.add("Extend",{disabled:this.splitExtended,callback:()=>{this.extend()}}),e.add("Reduce",{disabled:!this.splitExtended,callback:()=>{this.reduce()}})}))}))),u.parentArea=this,p.parentArea=this,this.root.appendChild(u.root),a&&this.root.appendChild(this.splitBar),this.root.appendChild(p.root),this.sections=[u,p],this.type=s,this._update(o.width||o.height?[o.width,o.height]:void 0),!a)return this.sections;const m=this;function g(e){"horizontal"==m.type?m._moveSplit(-e.movementX):m._moveSplit(-e.movementY),e.stopPropagation(),e.preventDefault()}function f(e){const t=m.root.ownerDocument;t.removeEventListener("mousemove",g),t.removeEventListener("mouseup",f),document.body.classList.remove("nocursor"),m.splitBar.classList.remove("nocursor")}return this.sections}setLimitBox(e=0,t=0,s=1/0,n=1/0){this.minWidth=e,this.minHeight=t,this.maxWidth=s,this.maxHeight=n,0!=e&&(this.root.style.minWidth=`${e}px`),0!=t&&(this.root.style.minHeight=`${t}px`),s!=1/0&&(this.root.style.maxWidth=`${s}px`),n!=1/0&&(this.root.style.maxHeight=`${n}px`)}setSize(t){let[s,n]=t;null!=s&&s.constructor==Number&&(s+="px"),null!=n&&n.constructor==Number&&(n+="px"),s&&(this.root.style.width=s),n&&(this.root.style.height=n),this.onresize&&this.onresize(this.root.getBoundingClientRect()),e.doAsync((()=>{this.size=[this.root.clientWidth,this.root.clientHeight],this.propagateEvent("onresize")}),150)}extend(){if(this.splitExtended)return;let[t,s]=this.sections;this.splitExtended=!0,"vertical"==this.type?(this.offset=s.root.offsetHeight,s.root.classList.add("fadeout-vertical"),this._moveSplit(-1/0,!0)):(this.offset=s.root.offsetWidth-8,s.root.classList.add("fadeout-horizontal"),this._moveSplit(-1/0,!0,8)),e.doAsync((()=>this.propagateEvent("onresize")),150)}reduce(){if(!this.splitExtended)return;this.splitExtended=!1;let[t,s]=this.sections;"vertical"==this.type?(s.root.classList.add("fadein-vertical"),this._moveSplit(this.offset)):(s.root.classList.add("fadein-horizontal"),this._moveSplit(this.offset)),e.doAsync((()=>this.propagateEvent("onresize")),150)}hide(){this.root.classList.add("hidden")}show(){this.root.classList.remove("hidden")}toggle(e){this.root.classList.toggle("hidden",e)}propagateEvent(e){for(let t=0;t<this.sections.length;t++){const s=this.sections[t];s[e]&&s[e].call(this,s.root.getBoundingClientRect()),s.propagateEvent(e)}}addPanel(t){let s=new e.Panel(t);return this.attach(s),this.panels.push(s),s}addMenubar(t,s={}){let n=new e.Menubar(t,s);e.menubars.push(n);const[i,o]=this.split({type:"vertical",sizes:["48px",null],resize:!1,menubar:!0});return n.siblingArea=o,i.attach(n),i.isMenubar=!0,(s.sticky??1)&&(i.root.className+=" sticky top-0"),s.parentClass&&(i.root.className+=` ${s.parentClass}`),n}addSidebar(t,s={}){let n=new e.Sidebar(s);t&&t(n),n.update(),e.sidebars.push(n);const i=s.side??"left";console.assert("left"==i||"right"==i,"Invalid sidebar side: "+i);const o="left"==i,l=s.width??"16rem",a=o?[l,null]:[null,l],[r,c]=this.split({type:"horizontal",sizes:a,resize:!1,sidebar:!0});n.siblingArea=o?c:r;let d=o?r:c;return d.attach(n),d.isSidebar=!0,s.parentClass&&(d.root.className+=` ${s.parentClass}`),n}addOverlayButtons(e,t={}){if(this.sections.length)return void this.sections[1].addOverlayButtons(e,t);console.assert(e.constructor==Array&&e.length),this.root.style.position="relative",t.className="lexoverlaybuttons";let s=this.addPanel(t),n=null;const i=document.createElement("div");i.className="lexoverlaybuttonscontainer",i.appendChild(s.root),this.attach(i);const o=t.float;if(o)for(let e=0;e<o.length;e++){switch(o[e]){case"h":case"t":case"l":break;case"v":i.className+=" vertical";break;case"m":i.className+=" middle";break;case"b":i.className+=" bottom";break;case"c":i.className+=" center";break;case"r":i.className+=" right"}}const l=function(e,t,i){const o={width:"auto",selectable:e.selectable,selected:e.selected,icon:e.icon,img:e.img,className:e.class??"",title:e.name,overflowContainerX:s.root,swap:e.swap};t&&(n||(n=document.createElement("div"),n.className="lexoverlaygroup",s.queuedContainer=n),o.parent=n);let l=e.callback;if(e.options)s.addSelect(null,e.options,e.name,l,o);else{const t=s.addButton(null,e.name,(function(s,n){if(e.selectable)if(e.group){let t=e.selected;e.group.forEach((e=>e.selected=!1)),e.selected=!t}else e.selected=!e.selected;l&&l(s,n,t.root)}),o)}n&&i&&(s.root.appendChild(n),n=null,s.clearQueue())};!function(){s.clear();for(let t of e)if(t.constructor===Array)for(let e=0;e<t.length;++e){let s=t[e];s.group=t,l(s,!0,e==t.length-1)}else l(t);if(o){var t=0;s.root.childNodes.forEach((e=>{t+=e.offsetHeight})),i.className.includes("middle")&&(i.style.top="-moz-calc( 50% - "+.5*t+"px )",i.style.top="-webkit-calc( 50% - "+.5*t+"px )",i.style.top="calc( 50% - "+.5*t+"px )")}}()}addTabs(t={}){const s=new e.Tabs(this,t);return t.folding&&(this.parentArea._disableSplitResize(),this.root.style.paddingTop="4px"),s}_moveSplit(t,s=!1,n=0){if(!this.type)throw"No split area";if(void 0===t)return;const i=this.sections[0];var o=i.root;o.classList.contains("origin")||(o=o.parentElement);const l=this.sections[1],a=l.root,r="- "+e.DEFAULT_SPLITBAR_SIZE+"px";let c=null;if(s||(c=o.style.transition,o.style.transition=a.style.transition="none"),"horizontal"==this.type){var d=Math.max(a.offsetWidth+t,parseInt(l.minWidth));n&&(d=n);const e=d/this.size[0]*100,s=Math.max(0,100-e);o.style.width=`-moz-calc(${s}% ${r})`,o.style.width=`-webkit-calc( ${s}% ${r})`,o.style.width=`calc( ${s}% ${r})`,a.style.width=`${e}%`,a.style.width=`${e}%`,a.style.width=`${e}%`,i.maxWidth!=1/0&&(a.style.minWidth=`calc( 100% - ${parseInt(i.maxWidth)}px )`)}else{d=Math.max(a.offsetHeight+t+l.offset,parseInt(l.minHeight));n&&(d=n);const e=d/this.size[1]*100,s=Math.max(0,100-e);o.style.height=`-moz-calc(${s}% ${r})`,o.style.height=`-webkit-calc( ${s}% ${r})`,o.style.height=`calc( ${s}% ${r})`,a.style.height=`${e}%`,a.style.height=`${e}%`,a.style.height=`${e}%`,i.maxHeight!=1/0&&(a.style.minHeight=`calc( 100% - ${parseInt(i.maxHeight)}px )`)}s||(o.style.transition=a.style.transition=c),e.doAsync((()=>{this._update(),this.propagateEvent("onresize")}),10)}_disableSplitResize(){this.resize=!1,this.splitBar.remove(),delete this.splitBar}_update(e,t=!0){if(e)this.size=e;else{const e=this.root.getBoundingClientRect();this.size=[e.width,e.height]}if(t)for(var s=0;s<this.sections.length;s++)this.sections[s]._update()}}e.Area=C;class y{static NONE=0;static TEXT=1;static TEXTAREA=2;static BUTTON=3;static SELECT=4;static CHECKBOX=5;static TOGGLE=6;static RADIO=7;static BUTTONS=8;static COLOR=9;static RANGE=10;static NUMBER=11;static TITLE=12;static VECTOR=13;static TREE=14;static PROGRESS=15;static FILE=16;static LAYERS=17;static ARRAY=18;static LIST=19;static TAGS=20;static CURVE=21;static CARD=22;static IMAGE=23;static CONTENT=24;static CUSTOM=25;static SEPARATOR=26;static KNOB=27;static SIZE=28;static OTP=29;static PAD=30;static FORM=31;static DIAL=32;static COUNTER=33;static TABLE=34;static TABS=35;static DATE=36;static MAP2D=37;static LABEL=38;static BLANK=39;static NO_CONTEXT_TYPES=[y.BUTTON,y.LIST,y.FILE,y.PROGRESS];constructor(t,s,n,i={}){this.type=t,this.name=s,this.options=i,this._initialValue=n;const o=document.createElement("div");if(o.className="lexwidget",i.id&&(o.id=i.id),i.title&&(o.title=i.title),i.className&&(o.className+=" "+i.className),t!=y.TITLE&&(i.width&&(o.style.width=o.style.minWidth=i.width),i.maxWidth&&(o.style.maxWidth=i.maxWidth),i.minWidth&&(o.style.minWidth=i.minWidth),i.height&&(o.style.height=o.style.minHeight=i.height),e.widgetResizeObserver.observe(o)),null!=s){if(!i.hideName){let t=document.createElement("div");t.className="lexwidgetname",i.justifyName&&t.classList.add("float-"+i.justifyName),t.innerHTML=s,t.title=i.title??t.innerHTML,t.style.width=i.nameWidth||e.DEFAULT_NAME_WIDTH,t.style.minWidth=t.style.width,o.appendChild(t),o.domName=t;const l=this;t.addEventListener("contextmenu",(function(e){e.preventDefault(),l.oncontextmenu(e)})),i.skipReset||null==n||this._addResetProperty(t,(function(e){l.set(l._initialValue,!1,e),this.style.display="none"}))}}else i.hideName=!0;i.signal&&e.addSignal(i.signal,this),this.root=o,this.root.jsInstance=this,this.options=i}static _dispatchEvent(e,t,s,n,i){let o=new CustomEvent(t,{detail:s,bubbles:n,cancelable:i});e.dispatchEvent(o)}_addResetProperty(t,s){const n=e.makeIcon("Undo2",{iconClass:"ml-0 mr-1 px-1",title:"Reset"});return n.style.display="none",n.addEventListener("click",s),t.appendChild(n),n}_canPaste(){let e=this.type===y.CUSTOM?void 0!==navigator.clipboard.customIdx&&this.customIdx==navigator.clipboard.customIdx:navigator.clipboard.type===this.type;return e&=!0!==this.disabled,this.onAllowPaste&&(e=this.onAllowPaste(e)),e}_trigger(e,t,s=this){t&&t.call(s,e.value,e.domEvent,e.name)}value(){if(this.onGetValue)return this.onGetValue();console.warn("Can't get value of "+this.typeName())}set(e,t,s){if(this.onSetValue){let n=this.root.querySelector(".lexwidgetname .lexicon");if(n){n.style.display=e!=this.value()?"block":"none";const t=e.constructor===Array?function(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(e.length!==t.length)return!1;for(var s=0;s<e.length;++s)if(e[s]!==t[s])return!1;return!0}(e,this._initialValue):e==this._initialValue;n.style.display=t?"none":"block"}return this.onSetValue(e,t??!1,s)}console.warn("Can't set value of "+this.typeName())}oncontextmenu(t){y.NO_CONTEXT_TYPES.includes(this.type)||e.addContextMenu(this.typeName(),t,(e=>{e.add("Copy",(()=>{this.copy()})),e.add("Paste",{disabled:!this._canPaste(),callback:()=>{this.paste()}})}))}copy(){navigator.clipboard.type=this.type,navigator.clipboard.customIdx=this.customIdx,navigator.clipboard.data=this.value(),navigator.clipboard.writeText(navigator.clipboard.data)}paste(){this._canPaste()&&this.set(navigator.clipboard.data)}typeName(){switch(this.type){case y.TEXT:return"Text";case y.TEXTAREA:return"TextArea";case y.BUTTON:return"Button";case y.SELECT:return"Select";case y.CHECKBOX:return"Checkbox";case y.TOGGLE:return"Toggle";case y.RADIO:return"Radio";case y.COLOR:return"Color";case y.RANGE:return"Range";case y.NUMBER:return"Number";case y.VECTOR:return"Vector";case y.TREE:return"Tree";case y.PROGRESS:return"Progress";case y.FILE:return"File";case y.LAYERS:return"Layers";case y.ARRAY:return"Array";case y.LIST:return"List";case y.TAGS:return"Tags";case y.CURVE:return"Curve";case y.KNOB:return"Knob";case y.SIZE:return"Size";case y.PAD:return"Pad";case y.FORM:return"Form";case y.DIAL:return"Dial";case y.COUNTER:return"Counter";case y.TABLE:return"Table";case y.TABS:return"Tabs";case y.DATE:return"Date";case y.MAP2D:return"Map2D";case y.LABEL:return"Label";case y.BLANK:return"Blank";case y.CUSTOM:return this.customName}console.error(`Unknown Widget type: ${this.type}`)}refresh(){}}function b(t,s={}){let n=e.guidGenerator();e.Panel.prototype["add"+t]=function(i,o,l){s.nameWidth="100%";let a=new y(y.CUSTOM,i,null,s);this._attachWidget(a),a.customName=t,a.customIdx=n,a.onGetValue=()=>o,a.onSetValue=(t,s,n)=>{o=t,u(),r.querySelector(".lexcustomitems").toggleAttribute("hidden",!1),s||a._trigger(new e.IEvent(i,o,n),l)};const r=a.root;let c,d,h=s.default??{};const u=()=>{o&&(a.instance=o=Object.assign(e.deepCopy(h),o)),c&&c.remove(),d&&d.remove(),c=document.createElement("div"),c.className="lexcustomcontainer",c.style.width="100%",r.appendChild(c),r.dataset.opened=!1;const n=e.makeIcon(s.icon??"Box"),p=e.makeIcon("Menu");let m=t+(o?"":" [empty]"),g=this.addButton(null,m,((s,n)=>{o?(r.querySelector(".lexcustomitems").toggleAttribute("hidden"),r.dataset.opened=!r.querySelector(".lexcustomitems").hasAttribute("hidden")):e.addContextMenu(null,n,(e=>{e.add("New "+t,(()=>{o={},u(),r.querySelector(".lexcustomitems").toggleAttribute("hidden",!1),r.dataset.opened=!r.querySelector(".lexcustomitems").hasAttribute("hidden")}))}))}),{buttonClass:"custom"});const f=g.root.querySelector("span");if(f.prepend(n),f.appendChild(p),c.appendChild(g.root),o&&p.addEventListener("click",(t=>{t.stopImmediatePropagation(),t.stopPropagation(),e.addContextMenu(null,t,(e=>{e.add("Clear",(()=>{o=null,u()}))}))})),d=document.createElement("div"),d.className="lexcustomitems",d.toggleAttribute("hidden",!0),r.appendChild(d),o){this.queue(d);const t=(t,s,n)=>{o[t]=s,a._trigger(new e.IEvent(i,o,n),l)};for(let e in h){const s=o[e]??h[e];switch(s.constructor){case String:"#"===s[0]?this.addColor(e,s,t.bind(this,e)):this.addText(e,s,t.bind(this,e));break;case Number:this.addNumber(e,s,t.bind(this,e));break;case Boolean:this.addCheckbox(e,s,t.bind(this,e));break;case Array:s.length>4?this.addArray(e,s,t.bind(this,e)):this._addVector(s.length,e,s,t.bind(this,e))}}this.clearQueue()}};u()}}e.Widget=y,e.ADD_CUSTOM_WIDGET=b;class L{constructor(e,t,s){if(this.domEl=e,this.data=t,this.onevent=s.onevent,this.options=s,this.selected=[],this._forceClose=!1,t.constructor===Object)this._createItem(null,t);else for(let e of t)this._createItem(null,e)}_createItem(t,s,n=0,i){const o=this,l=this.domEl.querySelector(".lexnodetreefilter");if(s.children=s.children??[],l&&""!=l.value&&!s.id.includes(l.value)){for(var a=0;a<s.children.length;++a)this._createItem(s,s.children[a],n+1,i);return}const r=this.domEl.querySelector("ul");s.visible=s.visible??!0,s.parent=t;let c=s.children.length>0,d=this.selected.indexOf(s)>-1||s.selected;if(this.options.onlyFolders){let e=!1;s.children.forEach((t=>e|="folder"==t.type)),c=!!e}let h=document.createElement("li");h.className="lextreeitem datalevel"+n+(c?" parent":"")+(d?" selected":""),h.id=e.getSupportedDOMName(s.id),h.tabIndex="0",h.treeData=s;let u=this.options.skipDefaultIcon??1?null:"Dot";if(c&&(u=s.closed?"Right":"Down"),u&&h.appendChild(e.makeIcon(u,{iconClass:"hierarchy",svgClass:"xs"})),u=s.icon,u)if(s.icon.includes(".")){const e="https://raw.githubusercontent.com/jxarco/lexgui.js/master/";h.innerHTML+="<img src='"+(e+s.icon)+"'>"}else{const t=s.icon.split(" "),n=e.makeIcon(t[0],{iconClass:"tree-item-icon mr-2",svgClass:"md"+(t.length>1?` ${t.slice(0).join(" ")}`:"")});h.appendChild(n)}h.innerHTML+=s.rename?"":s.id,h.setAttribute("draggable",!0),h.style.paddingLeft=3+15*(n+1)+"px",r.appendChild(h),h.addEventListener("click",(t=>{if(m)return void(m=!1);t.shiftKey||(r.querySelectorAll("li").forEach((e=>{e.classList.remove("selected")})),this.selected.length=0);const n=this.selected.indexOf(s);if(n>-1?(h.classList.remove("selected"),this.selected.splice(n,1)):(h.classList.add("selected"),this.selected.push(s)),c&&s.id.length>1){if(s.closed=!1,o.onevent){const t=new e.TreeEvent(e.TreeEvent.NODE_CARETCHANGED,s,s.closed);o.onevent(t)}o.frefresh(s.id)}if(o.onevent){const n=new e.TreeEvent(e.TreeEvent.NODE_SELECTED,t.shiftKey?this.selected:s);n.multiple=t.shiftKey,o.onevent(n)}})),h.addEventListener("dblclick",(function(){if((o.options.rename??1)&&(s.rename=!0,o.refresh()),o.onevent){const t=new e.TreeEvent(e.TreeEvent.NODE_DBLCLICKED,s);o.onevent(t)}})),h.addEventListener("contextmenu",(t=>{if(t.preventDefault(),!o.onevent)return;const n=new e.TreeEvent(e.TreeEvent.NODE_CONTEXTMENU,this.selected.length>1?this.selected:s,t);n.multiple=this.selected.length>1,e.addContextMenu(n.multiple?"Selected Nodes":n.node.id,n.value,(e=>{n.panel=e})),o.onevent(n),this.options.addDefault&&(n.panel.items&&n.panel.add(""),n.panel.add("Select Children",(()=>{const e=t=>{if(!t.closed)for(let s of t.children??[]){if(!s)continue;this.domEl.querySelector("#"+s.id).classList.add("selected"),this.selected.push(s),e(s)}};this.domEl.querySelectorAll(".selected").forEach((e=>e.classList.remove("selected"))),this.selected.length=0,e(s)})),n.panel.add("Delete",{callback:()=>{if(!s.parent)return;if(o.onevent){const n=new e.TreeEvent(e.TreeEvent.NODE_DELETED,s,t);o.onevent(n)}let n=s.parent.children;const i=n.indexOf(s);n.splice(i,1),this.refresh()}}))})),h.addEventListener("keydown",(t=>{if(!s.rename)if(t.preventDefault(),"Delete"==t.key){if(o.onevent){const n=new e.TreeEvent(e.TreeEvent.NODE_DELETED,this.selected.length>1?this.selected:s,t);n.multiple=this.selected.length>1,o.onevent(n)}for(let e of this.selected){let t=e.parent.children;const s=t.indexOf(e);t.splice(s,1)}this.selected.length=0,this.refresh()}else if("ArrowUp"==t.key||"ArrowDown"==t.key){var n=this.selected.length>1?"ArrowUp"==t.key?this.selected.shift():this.selected.pop():this.selected[0],i=this.domEl.querySelector("#"+e.getSupportedDOMName(n.id)),l="ArrowUp"==t.key?i.previousSibling:i.nextSibling;l&&l.click()}}));const p=document.createElement("input");p.toggleAttribute("hidden",!s.rename),p.className="bg-none",p.value=s.id,h.appendChild(p),s.rename&&(h.classList.add("selected"),p.focus()),p.addEventListener("keyup",(function(t){if("Enter"==t.key){if(this.value=this.value.replace(/\s/g,"_"),o.onevent){const t=new e.TreeEvent(e.TreeEvent.NODE_RENAMED,s,this.value);o.onevent(t)}s.id=e.getSupportedDOMName(this.value),delete s.rename,o.frefresh(s.id),r.querySelector("#"+s.id).classList.add("selected")}else"Escape"==t.key&&(delete s.rename,o.frefresh(s.id))})),p.addEventListener("blur",(function(e){delete s.rename,o.refresh()})),(this.options.draggable??1)&&(t&&h.addEventListener("dragstart",(e=>{window.__tree_node_dragged=s})),h.addEventListener("dragover",(e=>{e.preventDefault()}),!1),h.addEventListener("dragenter",(e=>{e.target.classList.add("draggingover")})),h.addEventListener("dragleave",(e=>{e.target.classList.remove("draggingover")})),h.addEventListener("drop",(t=>{t.preventDefault();let n=window.__tree_node_dragged;if(!n)return;let i=s;if(n.id==i.id)return void console.warn("Cannot parent node to itself!");const l=function(e,t){var s=!1;for(var n of t.children){if(n.id==e.id)return!0;s|=l(e,n)}return s};if(l(i,n))return void console.warn("Cannot parent node to a current child!");if(o.onevent){const t=new e.TreeEvent(e.TreeEvent.NODE_DRAGGED,n,i);o.onevent(t)}const a=n.parent.children.findIndex((e=>e.id==n.id)),r=n.parent.children.splice(a,1);i.children.push(r[0]),o.refresh(),delete window.__tree_node_dragged})));let m=!1;c&&h.querySelector("a.hierarchy").addEventListener("click",(function(t){if(m=!0,t.stopImmediatePropagation(),t.stopPropagation(),t.altKey){const e=function(t){for(var s of(t.closed=!t.closed,t.children))e(s)};e(s)}else s.closed=!s.closed;if(o.onevent){const t=new e.TreeEvent(e.TreeEvent.NODE_CARETCHANGED,s,s.closed);o.onevent(t)}o.frefresh(s.id)}));const g=document.createElement("div");if(h.appendChild(g),s.actions)for(let t=0;t<s.actions.length;++t){const n=s.actions[t],i=e.makeIcon(n.icon,{title:n.name});i.addEventListener("click",(function(e){n.callback&&(n.callback(s,i),e.stopPropagation())})),g.appendChild(i)}if(!s.skipVisibility){const t=new e.Button(null,"",((t,n)=>{if(n.stopPropagation(),s.visible=void 0!==s.visible&&!s.visible,o.onevent){const t=new e.TreeEvent(e.TreeEvent.NODE_VISIBILITY,s,s.visible);o.onevent(t)}}),{icon:s.visible?"Eye":"EyeOff",swap:s.visible?"EyeOff":"Eye",title:"Toggle visible",className:"p-0 m-0",buttonClass:"bg-none"});g.appendChild(t.root)}const f=function(e,t){if(e.id==t)return!0;let s=!1;for(var n of e?.children??[])s|=f(n,t);return s},v=f(s,i);if(!s.closed||v)for(a=0;a<s.children.length;++a){let e=s.children[a];this.options.onlyFolders&&"folder"!=e.type||this._createItem(s,e,n+1,i)}}refresh(e,t){if(this.data=e??this.data,this.domEl.querySelector("ul").innerHTML="",this.data.constructor===Object)this._createItem(null,this.data,0,t);else for(let e of this.data)this._createItem(null,e,0,t)}frefresh(e){this.refresh();var t=this.domEl.querySelector("#"+e);t&&t.focus()}select(e){this.refresh(null,e),this.domEl.querySelectorAll(".selected").forEach((e=>e.classList.remove("selected")));const t=this.domEl.querySelector("#"+e);console.assert(t,"NodeTree: Can't select node "+e),t.classList.add("selected"),this.selected=[t.treeData],t.focus()}}e.NodeTree=L;e.Blank=class extends y{constructor(e,t){super(y.BLANK),this.root.style.width=e??"auto",this.root.style.height=t??"8px"}};e.Title=class extends y{constructor(t,s={}){if(console.assert(t,"Can't create Title Widget without text!"),super(y.TITLE,null,null,s),this.root.className=`lextitle ${this.root.className}`,s.icon){let t=e.makeIcon(s.icon,{iconClass:"mr-2"});t.querySelector("svg").style.color=s.iconColor||"",this.root.appendChild(t)}let n=document.createElement("span");if(n.innerText=t,this.root.appendChild(n),Object.assign(this.root.style,s.style??{}),null!=s.link){let e=document.createElement("a");e.innerText=t,e.href=s.link,e.target=s.target??"",e.className="lextitle link",Object.assign(e.style,s.style??{}),this.root.replaceWith(e)}}};e.TextInput=class extends y{constructor(t,s,n,i={}){super(y.TEXT,t,String(s),i),this.onGetValue=()=>s,this.onSetValue=(i,o,a)=>{this.valid(i)&&this._lastValueTriggered!=i&&(this._lastValueTriggered=s=i,l.value=i,o||this._trigger(new e.IEvent(t,i,a),n))},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";o.style.width=i.inputWidth??`calc( 100% - ${t})`},this.valid=e=>{if(!(e=e??this.value()).length||""==l.pattern)return!0;return new RegExp(l.pattern).test(e)};let o=document.createElement("div");o.className=i.warning?" lexwarning":"",o.style.display="flex",o.style.position="relative",this.root.appendChild(o),this.disabled=(i.disabled||i.warning)??!!i.url;let l=null;if(this.disabled)i.url?(l=document.createElement("a"),l.href=i.url,l.target="_blank",l.innerHTML=s??"",l.style.textAlign=i.float??"",l.className="lextext ellipsis-overflow"):(l=document.createElement("input"),l.disabled=!0,l.value=s,l.style.textAlign=i.float??"",l.className="lextext ellipsis-overflow "+(i.inputClass??""));else{l=document.createElement("input"),l.className="lextext "+(i.inputClass??""),l.type=i.type||"",l.value=s||"",l.style.textAlign=i.float??"",l.setAttribute("placeholder",i.placeholder??""),i.required&&l.setAttribute("required",i.required),i.pattern&&l.setAttribute("pattern",i.pattern);const t=i.trigger??"default";if("default"==t?(l.addEventListener("keyup",(e=>{"Enter"==e.key&&l.blur()})),l.addEventListener("focusout",(e=>{this.set(e.target.value,!1,e)}))):"input"==t&&l.addEventListener("input",(e=>{this.set(e.target.value,!1,e)})),l.addEventListener("mousedown",(function(e){e.stopImmediatePropagation(),e.stopPropagation()})),i.icon){l.style.paddingLeft="1.75rem";const t=e.makeIcon(i.icon,{iconClass:"absolute z-1 ml-2",svgClass:"sm"});o.appendChild(t)}}i.fit&&l.classList.add("size-content"),Object.assign(l.style,i.style??{}),o.appendChild(l),e.doAsync(this.onResize.bind(this))}};e.TextArea=class extends y{constructor(t,s,n,i={}){super(y.TEXTAREA,t,s,i),this.onGetValue=()=>s,this.onSetValue=(i,o,a)=>{l.value=s=i,o||this._trigger(new e.IEvent(t,i,a),n)},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";o.style.width=i.inputWidth??`calc( 100% - ${t})`};let o=document.createElement("div");o.className="lextextarea",o.style.display="flex",this.root.appendChild(o);let l=document.createElement("textarea");l.value=s??"",l.className=i.inputClass??"",l.style.textAlign=i.float??"",Object.assign(l.style,i.style??{}),i.fitHeight&&l.classList.add("size-content"),(i.resize??1)||l.classList.add("resize-none"),o.appendChild(l),i.disabled&&(this.disabled=!0,l.setAttribute("disabled",!0)),i.placeholder&&l.setAttribute("placeholder",i.placeholder);const a=i.trigger??"default";if("default"==a?(l.addEventListener("keyup",(function(e){"Enter"==e.key&&l.blur()})),l.addEventListener("focusout",(e=>{this.set(e.target.value,!1,e)}))):"input"==a&&l.addEventListener("input",(e=>{this.set(e.target.value,!1,e)})),i.icon){const t=e.makeIcon(i.icon,{iconClass:"absolute z-1 ml-2",svgClass:"sm"});o.appendChild(t)}e.doAsync((()=>{o.style.height=i.height??"",this.onResize()}),10)}};e.Button=class extends y{constructor(t,s,n,i={}){super(y.BUTTON,t,null,i),this.onGetValue=()=>o.querySelector("input")?.checked,this.onSetValue=(t,s,n)=>{if(i.swap)this.root.setState(t,s);else if(o.innerHTML="",i.icon){const t=e.makeIcon(i.icon);o.prepend(t)}else if(i.img){let e=document.createElement("img");e.src=i.img,o.prepend(e)}else o.innerHTML=`<span>${t??""}</span>`},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";o.style.width=`calc( 100% - ${t})`};var o=document.createElement("button");if(o.title=i.tooltip?"":i.title??"",o.className="lexbutton p-1 "+(i.buttonClass??""),this.root.appendChild(o),i.selected&&o.classList.add("selected"),i.icon){const t=e.makeIcon(i.icon);o.prepend(t),o.classList.add("justify-center")}else if(i.img){let e=document.createElement("img");e.src=i.img,o.prepend(e)}else o.innerHTML=`<span>${s||""}</span>`;i.disabled&&(this.disabled=!0,o.setAttribute("disabled",!0));let l=o;if(i.swap){o.classList.add("swap"),o.querySelector("a").classList.add("swap-off");const t=document.createElement("input");t.className="p-0 border-0",t.type="checkbox",o.prepend(t);const s=e.makeIcon(i.swap,{iconClass:"swap-on"});o.appendChild(s),this.root.swap=function(e){const t=o.querySelector("input");t.checked=!t.checked,e||l.click()},this.root.setState=function(e,t){o.querySelector("input").checked=e,t||l.click()}}l.addEventListener("click",(l=>{i.selectable&&(i.parent&&i.parent.querySelectorAll(".lexbutton.selected").forEach((e=>{e!=o&&e.classList.remove("selected")})),o.classList.toggle("selected"));const a=o.querySelector("input");this._trigger(new e.IEvent(t,a?.checked??s,l),n)})),i.tooltip&&e.asTooltip(o,i.title??t),e.doAsync(this.onResize.bind(this))}};e.ComboButtons=class extends y{constructor(t,s,n={}){const i=!n.noSelection;let o=i&&(n.toggle??!1),l=document.createElement("div");l.className="lexcombobuttons ",n.skipReset=!0,n.float&&(l.className+=n.float);let a=[],r=document.createElement("div");r.className="lexcombobuttonsbox ",l.appendChild(r);for(let t of s){if(!t.value)throw"Set 'value' for each button!";let s=document.createElement("button");if(s.className="lexbutton combo",s.title=t.icon?t.value:"",s.id=t.id??"",s.dataset.value=t.value,n.buttonClass&&s.classList.add(n.buttonClass),i&&(t.selected||n.selected?.includes(t.value))&&(s.classList.add("selected"),a=a.concat([t.value])),t.icon){const n=e.makeIcon(t.icon);s.appendChild(n)}else s.innerHTML=`<span>${t.value}</span>`;t.disabled&&s.setAttribute("disabled",!0),s.addEventListener("click",(e=>{a=[],i&&(o?s.classList.toggle("selected"):(l.querySelectorAll("button").forEach((e=>e.classList.remove("selected"))),s.classList.add("selected"))),l.querySelectorAll("button").forEach((e=>{e.classList.contains("selected")&&a.push(e.dataset.value)})),!o&&a.length>1?console.error("Enable _options.toggle_ to allow selecting multiple options in ComboButtons."):(a=a[0],this.set(t.value,!1,s.classList.contains("selected")))})),r.appendChild(s)}a.length>1?o||(n.toggle=!0,o=i,console.warn(`Multiple options selected in '${t}' ComboButtons. Enabling _toggle_ mode.`)):a=a[0],super(y.BUTTONS,t,null,n),this.onGetValue=()=>a,this.onSetValue=(n,r,c)=>{if(i&&null==c&&(l.querySelectorAll("button").forEach((e=>e.classList.remove("selected"))),l.querySelectorAll("button").forEach((e=>{a&&a.indexOf(e.dataset.value)>-1&&e.classList.add("selected")}))),!r&&n.constructor!=Array){const i=c,l=s.filter((e=>e.value==n))[0]?.callback;this._trigger(new e.IEvent(t,o?[n,i]:n,null),l)}},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";l.style.width=`calc( 100% - ${t})`},this.root.appendChild(l),e.doAsync(this.onResize.bind(this))}};e.Card=class extends y{constructor(t,s={}){s.hideName=!0,super(y.CARD,t,null,s);let n=document.createElement("div");if(n.className="lexcard",n.style.width="100%",this.root.appendChild(n),s.img){let e=document.createElement("img");e.src=s.img,n.appendChild(e),null!=s.link&&(e.style.cursor="pointer",e.addEventListener("click",(function(){const e=n.querySelector("a");e&&e.click()})))}let i=document.createElement("span");if(i.innerText=t,n.appendChild(i),null!=s.link){let e=document.createElement("a");e.innerText=t,e.href=s.link,e.target=s.target??"",i.innerText="",i.appendChild(e)}s.callback&&(n.style.cursor="pointer",n.addEventListener("click",(n=>{this._trigger(new e.IEvent(t,null,n),s.callback)})))}};e.Form=class extends y{constructor(t,s,n,i={}){if(s.constructor!=Object)return void console.error("Form data must be an Object");i.hideName=!0,super(y.FORM,t,null,i),this.onGetValue=()=>o.formData,this.onSetValue=(t,s,n)=>{o.formData=t;const i=o.querySelectorAll(".lexwidget");for(let n=0;n<i.length;++n){if(i[n].jsInstance.type!=e.Widget.TEXT)continue;let o=i[n].querySelector(".lexwidgetname").innerText,l=i[n].querySelector(".lextext input");l.value=t[o]??"",y._dispatchEvent(l,"focusout",s)}};let o=document.createElement("div");o.className="lexformdata",o.style.width="100%",o.formData={},this.root.appendChild(o);for(let t in s){let n=s[t];if(n.constructor!=Object&&(n={},s[t]=n),n.placeholder=n.placeholder??t,n.width="100%",!i.skipLabels){const s=new e.TextInput(null,t,null,{disabled:!0,inputClass:"formlabel nobg"});o.appendChild(s.root)}n.textWidget=new e.TextInput(null,n.constructor==Object?n.value:n,(e=>{o.formData[t]=e}),n),o.appendChild(n.textWidget.root),o.formData[t]=n.constructor==Object?n.value:n}const l=e.makeContainer(["100%","auto"],"flex flex-row","",o);if(i.secondaryActionName||i.secondaryActionCallback){const t=new e.Button(null,i.secondaryActionName??"Cancel",((e,t)=>{n&&n(o.formData,t)}),{width:"100%",minWidth:"0",buttonClass:i.secondaryButtonClass??"primary"});l.appendChild(t.root)}const a=new e.Button(null,i.primaryActionName??"Submit",((e,t)=>{for(let e in s){if(!s[e].textWidget.valid())return}n&&n(o.formData,t)}),{width:"100%",minWidth:"0",buttonClass:i.primaryButtonClass??"contrast"});l.appendChild(a.root)}};class E extends y{constructor(t,s,n,i,o={}){super(y.SELECT,t,n,o),this.onGetValue=()=>n,this.onSetValue=(o,l,a)=>{n=o;let c=null;if(u.childNodes.forEach((e=>{e.classList.remove("selected"),e.getAttribute("value")==o&&(c=e)})),console.assert(c,`Item ${o} does not exist in the Select.`),c.classList.add("selected"),r.refresh(n),h){h.root.querySelector("input").value="";const e=this._filterOptions(s,"");d.refresh(e)}l||this._trigger(new e.IEvent(t,n,a),i)},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";l.style.width=o.inputWidth??`calc( 100% - ${t})`};let l=document.createElement("div");l.className="lexselect",this.root.appendChild(l);let a=document.createElement("div");a.className="lexselect lexoption",a.name=t,a.iValue=n,o.overflowContainer&&(o.overflowContainerX=o.overflowContainerY=o.overflowContainer);let r=new e.Button(null,n,((e,t)=>{if(d.unfocus_event)return void delete d.unfocus_event;c.classList.remove("place-above");c.hasAttribute("open")?c.close():(c.show(),(e=>{const t=r.root,s=t.getBoundingClientRect(),n=e.parentElement.closest("dialog")??e.parentElement.closest(".lexcolorpicker");{const i=o.overflowContainerY??e.getParentArea(),l=e.offsetHeight;let a=s.y,r=window.innerHeight;if(i){const e=i.getBoundingClientRect();r=e.y+e.height}if(n){const e=n.getBoundingClientRect();a-=e.y,r-=e.y}e.style.top=a+t.offsetHeight+"px",a+l>r&&(e.style.top=a-l+"px",e.classList.add("place-above"))}{const t=o.overflowContainerX??e.getParentArea(),i=e.offsetWidth;let l=s.x;e.style.minWidth=s.width+"px",n&&(l-=n.getBoundingClientRect().x),e.style.left=l+"px";let a=window.innerWidth;if(t){const e=t.getBoundingClientRect();a=e.x+e.width}l+i>a&&(e.style.left=l-(i-s.width)+"px")}})(c)),h&&h.root.querySelector("input").focus()}),{buttonClass:"array",skipInlineCount:!0,disabled:o.disabled});r.root.style.width="100%",r.root.querySelector("span").appendChild(e.makeIcon("Down",{svgClass:"sm"})),l.appendChild(r.root),r.refresh=e=>{const t=r.root.querySelector("span");""==t.innerText?t.innerText=e:t.innerHTML=t.innerHTML.replaceAll(t.innerText,e)};const c=document.createElement("dialog");c.className="lexselectoptions";let d=document.createElement("ul");d.tabIndex=-1,d.className="lexoptions",c.appendChild(d),d.addEventListener("focusout",(function(e){if(e.stopPropagation(),e.stopImmediatePropagation(),e.relatedTarget===r.root.querySelector("button"))this.unfocus_event=!0,setTimeout((()=>delete this.unfocus_event),200);else{if(e.relatedTarget&&c.contains(e.relatedTarget))return;if("lexinput-filter"==e.target.className)return}c.close()}));let h=null;if(o.filter){const t=e.deepCopy(o);t.placeholder=t.placeholder??"Search...",t.skipWidget=t.skipWidget??!0,t.trigger="input",t.icon="Search",t.className="lexfilter",t.inputClass="outline",h=new e.TextInput(null,o.filterValue??"",(e=>{const t=this._filterOptions(s,e);d.refresh(t)}),t),h.root.querySelector(".lextext").style.border="1px solid transparent";h.root.querySelector("input").addEventListener("focusout",(function(e){e.relatedTarget&&"UL"==e.relatedTarget.tagName&&e.relatedTarget.classList.contains("lexoptions")||c.close()})),d.appendChild(h.root)}const u=document.createElement("span");u.className="lexselectinnerlist",d.appendChild(u),d.refresh=t=>{if(u.innerHTML="",!t.length){let e=o.emptyMsg??"No options found.",t=document.createElement("div");t.className="option",t.innerHTML=e;let s=document.createElement("li");return s.className="lexselectitem empty",s.appendChild(t),void u.appendChild(s)}for(let s=0;s<t.length;s++){let i=t[s],o=document.createElement("li"),l=document.createElement("div");l.className="option",o.appendChild(l);const r=e=>{this.set(e.currentTarget.getAttribute("value"),!1,e),c.close()};if(o.addEventListener("click",r),i.constructor!=Object){const t="@"===i[0];t?(l.innerHTML="<span>"+i.substr(1)+"</span>",o.removeEventListener("click",r)):(l.innerHTML=`<span>${i}</span>`,l.appendChild(e.makeIcon("Check")),l.value=i,o.setAttribute("value",i),i==n&&(o.classList.add("selected"),a.innerHTML=i)),o.classList.add(t?"lexselectlabel":"lexselectitem")}else{let e=document.createElement("img");e.src=i.src,o.setAttribute("value",i.value),o.className="lexlistitem",l.innerText=i.value,l.className+=" media",l.prepend(e),l.setAttribute("value",i.value),l.setAttribute("data-index",s),l.setAttribute("data-src",i.src),l.setAttribute("title",i.value),n==i.value&&o.classList.add("selected")}u.appendChild(o)}},d.refresh(s),l.appendChild(c),e.doAsync(this.onResize.bind(this))}_filterOptions(e,t){const s=!t.length;let n=[];for(let i=0;i<e.length;i++){let o=e[i];if(!s){let e="string"==typeof o?o:o.value;const s=t.toLowerCase();if(!e.toLowerCase().includes(s))continue}n.push(o)}return n}}e.Select=E;e.Curve=class extends y{constructor(t,s,n,i={}){let o=JSON.parse(JSON.stringify(s));super(y.CURVE,t,o,i),this.onGetValue=()=>JSON.parse(JSON.stringify(a.element.value)),this.onSetValue=(s,i,o)=>{a.element.value=JSON.parse(JSON.stringify(s)),a.redraw(),i||this._trigger(new e.IEvent(t,a.element.value,o),n)},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";l.style.width=`calc( 100% - ${t})`};var l=document.createElement("div");l.className="lexcurve",this.root.appendChild(l),i.callback=(s,i)=>{this._trigger(new e.IEvent(t,s,i),n)},i.name=t;let a=new e.CanvasCurve(s,i);l.appendChild(a.element),this.curveInstance=a;new ResizeObserver((e=>{for(const t of e)a.canvas.width=t.contentRect.width,a.redraw()})).observe(l),e.doAsync(this.onResize.bind(this))}};e.Dial=class extends y{constructor(t,s,n,i={}){let o=JSON.parse(JSON.stringify(s));super(y.DIAL,t,o,i),this.onGetValue=()=>JSON.parse(JSON.stringify(a.element.value)),this.onSetValue=(s,i,o)=>{a.element.value=JSON.parse(JSON.stringify(s)),a.redraw(),i||this._trigger(new e.IEvent(t,a.element.value,o),n)},this.onResize=t=>{const s=this.root.domName?.style.width??"0px";l.style.width=`calc( 100% - ${s})`,e.flushCss(l),a.element.style.height=a.element.offsetWidth+"px",a.canvas.width=a.element.offsetWidth,l.style.width=a.element.offsetWidth+"px",a.canvas.height=a.canvas.width,a.redraw()};var l=document.createElement("div");l.className="lexcurve",this.root.appendChild(l),i.callback=(s,i)=>{this._trigger(new e.IEvent(t,s,i),n)},i.name=t;let a=new e.CanvasDial(this,s,i);l.appendChild(a.element),this.dialInstance=a,e.doAsync(this.onResize.bind(this))}};e.Layers=class extends y{constructor(t,s,n,i={}){super(y.LAYERS,t,s,i),this.onGetValue=()=>s,this.onSetValue=(i,o,l)=>{s=i,this.setLayers(s),o||this._trigger(new e.IEvent(t,s,l),n)},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";o.style.width=`calc( 100% - ${t})`};var o=document.createElement("div");o.className="lexlayers",this.root.appendChild(o),this.setLayers=e=>{o.innerHTML="";let t=e.toString(2),s=t.length;for(let e=0;e<16-s;++e)t="0"+t;for(let s=0;s<16;++s){let n=document.createElement("div");if(n.className="lexlayer",null!=e){const e=t[16-s-1];null!=e&&"1"==e&&n.classList.add("selected")}n.innerText=s+1,n.title="Bit "+s+", value "+(1<<s),o.appendChild(n),n.addEventListener("click",(t=>{t.stopPropagation(),t.stopImmediatePropagation(),t.target.classList.toggle("selected");const n=e^1<<s;this.set(n,!1,t)}))}},this.setLayers(s),e.doAsync(this.onResize.bind(this))}};e.ItemArray=class extends y{constructor(t,s=[],n,i={}){i.nameWidth="100%",super(y.ARRAY,t,null,i),this.onGetValue=()=>s,this.onSetValue=(i,o,l)=>{s=i,this._updateItems(),o||this._trigger(new e.IEvent(t,s,l),n)};let o=document.createElement("div");o.className="lexarray",o.style.width="100%",this.root.appendChild(o),this.root.dataset.opened=!1;let l=`Array (size ${s.length})`;const a=new e.Button(null,l,(()=>{this.root.dataset.opened="true"!=this.root.dataset.opened,this.root.querySelector(".lexarrayitems").toggleAttribute("hidden")}),{buttonClass:"array"});a.root.querySelector("span").appendChild(e.makeIcon("Down",{svgClass:"sm"})),o.appendChild(a.root);let r=document.createElement("div");r.className="lexarrayitems",r.toggleAttribute("hidden",!0),this.root.appendChild(r),this._updateItems=()=>{let o=this.root.querySelector(".lexbutton.array span");for(let e of o.childNodes)if(e.nodeType===Node.TEXT_NODE){e.textContent=`Array (size ${s.length})`;break}r.innerHTML="";for(let o=0;o<s.length;++o){const l=s[o];let a=i.innerValues?"select":l.constructor,c=null;switch(a){case String:c=new e.TextInput(o+"",l,(function(e,t){s[o]=e,n(s)}),{nameWidth:"12px",className:"p-0",skipReset:!0});break;case Number:c=new x(o+"",l,(function(e,t){s[o]=e,n(s)}),{nameWidth:"12px",className:"p-0",skipReset:!0});break;case"select":c=new E(o+"",i.innerValues,l,(function(e,t){s[o]=e,n(s)}),{nameWidth:"12px",className:"p-0",skipReset:!0})}console.assert(c,`Value of type ${a} cannot be modified in ItemArray`),r.appendChild(c.root);const d=new e.Button(null,"",((i,o)=>{s.splice(s.indexOf(l),1),this._updateItems(),this._trigger(new e.IEvent(t,s,o),n)}),{title:"Remove item",icon:"Trash3"});c.root.appendChild(d.root)}const l=new e.Button(null,e.makeIcon("Plus",{svgClass:"sm"}).innerHTML+"Add item",((o,l)=>{s.push(i.innerValues?i.innerValues[0]:""),this._updateItems(),this._trigger(new e.IEvent(t,s,l),n)}),{buttonClass:"array"});r.appendChild(l.root)},this._updateItems()}};e.List=class extends y{constructor(t,s,n,i,o={}){super(y.LIST,t,n,o),this.onGetValue=()=>n,this.onSetValue=(o,a,r)=>{l.querySelectorAll(".lexlistitem").forEach((e=>e.classList.remove("selected")));let c=null;for(let e=0;e<s.length;++e){const t=s[e];if(t==o||t.constructor==Array&&t[0]==o){c=e;break}}c?(l.children[c].classList.toggle("selected"),n=o,a||this._trigger(new e.IEvent(t,o,r),i)):console.error(`Cannot find item ${o} in List.`)},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";l.style.width=`calc( 100% - ${t})`},this._updateValues=o=>{s=o,l.innerHTML="";for(let o=0;o<s.length;++o){let a=null,r=s[o];r.constructor===Array&&(a=r[1],r=r[0]);let c=document.createElement("div");c.className="lexlistitem"+(n==r?" selected":""),a&&c.appendChild(e.makeIcon(a)),c.innerHTML+=`<span>${r}</span>`,c.addEventListener("click",(s=>{l.querySelectorAll(".lexlistitem").forEach((e=>e.classList.remove("selected"))),c.classList.toggle("selected"),n=r,this._trigger(new e.IEvent(t,r,s),i)})),l.appendChild(c)}};let l=document.createElement("div");l.className="lexlist",this.root.appendChild(l),this._updateValues(s),e.doAsync(this.onResize.bind(this))}};e.Tags=class extends y{constructor(t,s,n,i={}){s=s.replace(/\s/g,"").split(",");let o=[].concat(s);super(y.TAGS,t,o,i),this.onGetValue=()=>[].concat(s),this.onSetValue=(i,o,l)=>{s=[].concat(i),this.generateTags(s),o||this._trigger(new e.IEvent(t,s,l),n)},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";l.style.width=`calc( 100% - ${t})`};const l=document.createElement("div");l.className="lextags",this.root.appendChild(l),this.generateTags=t=>{l.innerHTML="";for(let s=0;s<t.length;++s){const n=t[s],i=document.createElement("span");i.className="lextag",i.innerHTML=n;const o=e.makeIcon("X",{svgClass:"sm"});i.appendChild(o),o.addEventListener("click",(e=>{i.remove(),t.splice(t.indexOf(n),1),this.set(t,!1,e)})),l.appendChild(i)}let s=document.createElement("input");s.value="",s.placeholder="Add tag...",l.appendChild(s),s.onkeydown=e=>{const n=s.value.replace(/\s/g,"");if(" "==e.key||"Enter"==e.key){if(e.preventDefault(),!n.length||t.indexOf(n)>-1)return;t.push(n),this.set(t,!1,e)}},s.focus()},this.generateTags(s),e.doAsync(this.onResize.bind(this))}};e.Checkbox=class extends y{constructor(t,s,n,i={}){if(!t&&!i.label)throw"Set Widget Name or at least a label!";super(y.CHECKBOX,t,s,i),this.onGetValue=()=>s,this.onSetValue=(i,o,a)=>{i!=s&&(l.checked=s=i,this.root.querySelector(".lexcheckboxsubmenu")?.toggleAttribute("hidden",!i),o||this._trigger(new e.IEvent(t,i,a),n))},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";o.style.width=i.inputWidth??`calc( 100% - ${t})`};var o=document.createElement("div");o.className="lexcheckboxcont",this.root.appendChild(o);let l=document.createElement("input");l.type="checkbox",l.className="lexcheckbox "+(i.className??"primary"),l.checked=s,l.disabled=i.disabled??!1,o.appendChild(l);let a=document.createElement("span");if(a.className="checkboxtext",a.innerHTML=i.label??"On",o.appendChild(a),l.addEventListener("change",(e=>{this.set(l.checked,!1,e)})),i.suboptions){let t=document.createElement("div");t.className="lexcheckboxsubmenu",t.toggleAttribute("hidden",!l.checked);const s=new e.Panel;s.queue(t),i.suboptions.call(this,s),s.clearQueue(),this.root.appendChild(t)}e.doAsync(this.onResize.bind(this))}};e.Toggle=class extends y{constructor(t,s,n,i={}){if(!t&&!i.label)throw"Set Widget Name or at least a label!";super(y.TOGGLE,t,s,i),this.onGetValue=()=>l.checked,this.onSetValue=(i,o,a)=>{i!=s&&(l.checked=s=i,this.root.querySelector(".lextogglesubmenu")?.toggleAttribute("hidden",!i),o||this._trigger(new e.IEvent(t,i,a),n))},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";o.style.width=i.inputWidth??`calc( 100% - ${t})`};var o=document.createElement("div");o.className="lextogglecont",this.root.appendChild(o);let l=document.createElement("input");l.type="checkbox",l.className="lextoggle "+(i.className??""),l.checked=s,l.iValue=s,l.disabled=i.disabled??!1,o.appendChild(l);let a=document.createElement("span");if(a.className="toggletext",a.innerHTML=i.label??"On",o.appendChild(a),l.addEventListener("change",(e=>{this.set(l.checked,!1,e)})),i.suboptions){let t=document.createElement("div");t.className="lextogglesubmenu",t.toggleAttribute("hidden",!l.checked);const s=new e.Panel;s.queue(t),i.suboptions.call(this,s),s.clearQueue(),this.root.appendChild(t)}e.doAsync(this.onResize.bind(this))}};e.RadioGroup=class extends y{constructor(t,s,n,i,o={}){super(y.RADIO,t,null,o);let l=null;this.onGetValue=()=>{const e=a.querySelectorAll("button");return l?[l,e[l]]:void 0},this.onSetValue=(t,s,o)=>{t=t[0]??t,console.assert(t.constructor==Number,"RadioGroup _value_ must be an Array index!");const l=a.querySelectorAll("button");l.forEach((e=>{e.checked=!1,e.classList.remove("checked")}));const r=l[t];r.checked=!r.checked,r.classList.toggle("checked"),s||this._trigger(new e.IEvent(null,[t,n[t]],o),i)};var a=document.createElement("div");a.className="lexradiogroup "+(o.className??""),this.root.appendChild(a);let r=document.createElement("span");r.innerHTML=s,a.appendChild(r);for(let e=0;e<n.length;++e){const t=document.createElement("div");t.className="lexradiogroupitem",a.appendChild(t);const s=document.createElement("button");s.className="flex p-0 rounded-lg cursor-pointer",s.disabled=o.disabled??!1,t.appendChild(s),s.addEventListener("click",(t=>{this.set(e,!1,t)}));const i=document.createElement("span");s.appendChild(i);const l=document.createElement("span");l.innerHTML=n[e],t.appendChild(l)}o.selected&&(console.assert(o.selected.constructor==Number,"RadioGroup _selected_ must be an Array index!"),l=o.selected,this.set(l,!0))}};e.ColorInput=class extends y{constructor(t,s,n,i={}){s=s??"#000000";const o=i.useAlpha??(s.constructor===Object&&"a"in s||s.constructor===String&&[5,9].includes(s.length)),l=new e.Color(s);s=o?l.hex:l.hex.substr(0,7),super(y.COLOR,t,s,i),this.onGetValue=()=>{const t=new e.Color(s);return i.useRGB?t.rgb:s},this.onSetValue=(l,a,r)=>{const u=new e.Color(l);if(c.style.color=s=u.hex.substr(0,7),o&&(d.style.color=s=u.hex),this._skipTextUpdate||h.set(s,!0,r),!a){let l=s;i.useRGB&&(l=u.rgb,o||delete l.a),this._trigger(new e.IEvent(t,l,r),n)}},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";a.style.width=`calc( 100% - ${t})`};var a=document.createElement("span");a.className="lexcolor",this.root.appendChild(a),this.picker=new e.ColorPicker(s,{colorModel:i.useRGB?"RGB":"Hex",useAlpha:o,onChange:e=>{this._fromColorPicker=!0,this.set(e.hex),delete this._fromColorPicker}});let r=e.makeContainer(["18px","18px"],"flex flex-row bg-contrast rounded overflow-hidden","",a);r.tabIndex="1",r.addEventListener("click",(t=>{i.disabled||(this._popover=new e.Popover(r,[this.picker]))}));let c=document.createElement("div");c.className="lexcolorsample",c.style.color=s,r.appendChild(c);let d=null;o?(d=document.createElement("div"),d.className="lexcolorsample",d.style.color=s,r.appendChild(d)):c.style.width="18px";const h=new e.TextInput(null,s,(e=>{this._skipTextUpdate=!0,this.set(e),delete this._skipTextUpdate}),{width:"calc( 100% - 24px )",disabled:i.disabled});h.root.style.marginLeft="6px",a.appendChild(h.root),e.doAsync(this.onResize.bind(this))}};e.RangeInput=class extends y{constructor(t,s,n,i={}){super(y.RANGE,t,s,i),this.onGetValue=()=>s,this.onSetValue=(o,a,r)=>{isNaN(o)||(l.value=s=e.clamp(+o,+l.min,+l.max),a||this._trigger(new e.IEvent(t,i.left?+l.max-s+ +l.min:s,r),n))},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";o.style.width=i.inputWidth??`calc( 100% - ${t})`};const o=document.createElement("div");o.className="lexrange",this.root.appendChild(o);let l=document.createElement("input");l.className="lexrangeslider "+(i.className??""),l.min=i.min??0,l.max=i.max??100,l.step=i.step??1,l.type="range",l.disabled=i.disabled??!1,s.constructor==Number&&(s=e.clamp(s,+l.min,+l.max)),i.left&&(s=+l.max-s+ +l.min),l.value=s,o.appendChild(l),i.left&&l.classList.add("left"),(i.fill??1)||l.classList.add("no-fill"),l.addEventListener("input",(e=>{this.set(e.target.valueAsNumber,!1,e)}),{passive:!1}),l.addEventListener("mousedown",(function(e){i.onPress&&i.onPress.bind(l)(e,l)}),!1),l.addEventListener("mouseup",(function(e){i.onRelease&&i.onRelease.bind(l)(e,l)}),!1),this.setLimits=(e,t,s)=>{l.min=e??l.min,l.max=t??l.max,l.step=s??l.step,y._dispatchEvent(l,"input",!0)},e.doAsync(this.onResize.bind(this))}};class x extends y{constructor(t,s,n,i={}){super(y.NUMBER,t,s,i),this.onGetValue=()=>s,this.onSetValue=(o,a,c)=>{isNaN(o)||(s=e.clamp(+o,+r.min,+r.max),r.value=s=e.round(s,i.precision),l.querySelector(".lexinputslider")&&(l.querySelector(".lexinputslider").value=s),a||this._trigger(new e.IEvent(t,s,c),n))},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";o.style.width=i.inputWidth??`calc( 100% - ${t})`};var o=document.createElement("div");o.className="lexnumber",this.root.appendChild(o);let l=document.createElement("div");l.className="numberbox",o.appendChild(l);let a=e.makeContainer(["auto","100%"],"relative flex flex-row cursor-text","",l),r=document.createElement("input");r.id="number_"+e.guidGenerator(),r.className="vecinput",r.min=i.min??-1e24,r.max=i.max??1e24,r.step=i.step??"any",r.type="number",s.constructor==Number&&(s=e.clamp(s,+r.min,+r.max),s=e.round(s,i.precision)),r.value=r.iValue=s,a.appendChild(r);const c=e.makeIcon("MoveVertical",{iconClass:"drag-icon hidden-opacity",svgClass:"sm"});if(a.appendChild(c),i.units){let t=e.makeContainer(["auto","auto"],"px-2 bg-secondary content-center",i.units,a,{"word-break":"keep-all"});r.unitBox=t}if(i.disabled&&(this.disabled=r.disabled=!0),!i.skipSlider&&void 0!==i.min&&void 0!==i.max){let t=e.makeContainer(["100%","auto"],"","",l),n=document.createElement("input");n.className="lexinputslider",n.min=i.min,n.max=i.max,n.step=i.step??1,n.type="range",n.value=s,n.addEventListener("input",(e=>{this.set(n.valueAsNumber,!1,e)}),!1),n.addEventListener("mousedown",(function(e){i.onPress&&i.onPress.bind(n)(e,n)}),!1),n.addEventListener("mouseup",(function(e){i.onRelease&&i.onRelease.bind(n)(e,n)}),!1),t.appendChild(n),this.setLimits=(e,t,i)=>{r.min=n.min=e??r.min,r.max=n.max=t??r.max,r.step=i??r.step,n.step=i??n.step,this.set(s,!0)}}r.addEventListener("input",(function(t){s=+this.valueAsNumber,s=e.round(s,i.precision)}),!1),r.addEventListener("wheel",(e=>{if(e.preventDefault(),r!==document.activeElement)return;let t=i.step??1;e.shiftKey?t*=10:e.altKey&&(t*=.1),s=+r.valueAsNumber-t*(e.deltaY>0?1:-1),this.set(s,!1,e)}),{passive:!1}),r.addEventListener("change",(e=>{this.set(r.valueAsNumber,!1,e)}),{passive:!1});var d=this;let h=e=>{let t=-e.movementY;if(0!=t){let n=i.step??1;e.shiftKey?n*=10:e.altKey&&(n*=.1),s=+r.valueAsNumber+n*t,this.set(s,!1,e)}e.stopPropagation(),e.preventDefault()},u=e=>{var t=d.root.ownerDocument;t.removeEventListener("mousemove",h),t.removeEventListener("mouseup",u),document.body.classList.remove("noevents"),c.classList.add("hidden-opacity"),document.pointerLockElement&&document.exitPointerLock(),i.onRelease&&i.onRelease.bind(r)(e,r)};a.addEventListener("mousedown",(t=>{if(document.activeElement!=r&&t.button==e.MOUSE_LEFT_CLICK){var s=d.root.ownerDocument;s.addEventListener("mousemove",h),s.addEventListener("mouseup",u),document.body.classList.add("noevents"),c.classList.remove("hidden-opacity"),t.stopImmediatePropagation(),t.stopPropagation(),document.pointerLockElement||a.requestPointerLock(),i.onPress&&i.onPress.bind(r)(t,r)}})),e.doAsync(this.onResize.bind(this))}}e.NumberInput=x;e.Vector=class extends y{constructor(t,s,n,i,o={}){t=e.clamp(t,2,4),n=n??new Array(t).fill(0),super(y.VECTOR,s,[].concat(n),o),this.onGetValue=()=>{let e=this.root.querySelectorAll("input[type='number']"),t=[];for(var s of e)t.push(+s.value);return t},this.onSetValue=(t,n,a)=>{if(l.length==t.length){for(let s=0;s<l.length;++s){let n=t[s];n=e.clamp(n,+l[s].min,+l[s].max),n=e.round(n,o.precision)??0,l[s].value=t[s]=n}n||this._trigger(new e.IEvent(s,t,a),i)}else console.error("Input length does not match vector length.")},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";a.style.width=`calc( 100% - ${t})`};const l=[];var a=document.createElement("div");a.className="lexvector",this.root.appendChild(a),this.disabled=o.disabled??!1;const r=this;for(let d=0;d<t;++d){let h=document.createElement("div");h.className="vecbox",h.innerHTML="<span class='"+e.Panel.VECTOR_COMPONENTS[d]+"'></span>";let u=document.createElement("input");u.className="vecinput v"+t,u.min=o.min??-1e24,u.max=o.max??1e24,u.step=o.step??"any",u.type="number",u.id="vec"+t+"_"+e.guidGenerator(),u.idx=d,l[d]=u,h.appendChild(u),n[d].constructor==Number&&(n[d]=e.clamp(n[d],+u.min,+u.max),n[d]=e.round(n[d],o.precision)),u.value=u.iValue=n[d];const p=e.makeIcon("MoveVertical",{iconClass:"drag-icon hidden-opacity",svgClass:"sm"});function m(t){if(document.activeElement!=u&&t.button==e.MOUSE_LEFT_CLICK){var s=r.root.ownerDocument;s.addEventListener("mousemove",g),s.addEventListener("mouseup",f),document.body.classList.add("noevents"),p.classList.remove("hidden-opacity"),t.stopImmediatePropagation(),t.stopPropagation(),document.pointerLockElement||h.requestPointerLock(),o.onPress&&o.onPress.bind(u)(t,u)}}function g(t){let s=-t.movementY;if(0!=s){let n=o.step??1;if(t.shiftKey?n=10:t.altKey&&(n=.1),c.locked)for(let t of r.root.querySelectorAll(".vecinput"))t.value=e.round(+t.valueAsNumber+n*s,o.precision),y._dispatchEvent(t,"change");else u.value=e.round(+u.valueAsNumber+n*s,o.precision),y._dispatchEvent(u,"change")}t.stopPropagation(),t.preventDefault()}function f(e){var t=r.root.ownerDocument;t.removeEventListener("mousemove",g),t.removeEventListener("mouseup",f),document.body.classList.remove("noevents"),p.classList.add("hidden-opacity"),document.pointerLockElement&&document.exitPointerLock(),o.onRelease&&o.onRelease.bind(u)(e,u)}h.appendChild(p),this.disabled&&(u.disabled=!0),u.addEventListener("wheel",(function(t){if(t.preventDefault(),this!==document.activeElement)return;let s=o.step??1;if(t.shiftKey?s=10:t.altKey&&(s=.1),c.locked)for(let n of r.querySelectorAll(".vecinput"))n.value=e.round(+n.valueAsNumber-s*(t.deltaY>0?1:-1),o.precision),y._dispatchEvent(n,"change");else this.value=e.round(+this.valueAsNumber-s*(t.deltaY>0?1:-1),o.precision),y._dispatchEvent(u,"change")}),{passive:!1}),u.addEventListener("change",(t=>{if(isNaN(t.target.value))return;let s=e.clamp(t.target.value,+u.min,+u.max);if(s=e.round(s,o.precision),c.locked)for(let e of l)e.value=s,n[e.idx]=s;else u.value=s,n[t.target.idx]=s;this.set(n,!1,t)}),!1),h.addEventListener("mousedown",m),a.appendChild(h)}void 0===o.min&&void 0===o.max||(this.setLimits=(e,t,s)=>{for(let n of l)n.min=e??n.min,n.max=t??n.max,n.step=s??n.step;this.set(n,!0)});const c=new e.Button(null,"",(e=>{c.locked=e}),{title:"Lock",icon:"LockOpen",swap:"Lock",buttonClass:"bg-none p-0"});a.appendChild(c.root),e.doAsync(this.onResize.bind(this))}};e.SizeInput=class extends y{constructor(t,s,n,i={}){super(y.SIZE,t,s,i),this.onGetValue=()=>{const e=[];for(let t=0;t<this.root.dimensions.length;++t)e.push(this.root.dimensions[t].value());return e},this.onSetValue=(e,t,s)=>{for(let s=0;s<this.root.dimensions.length;++s)this.root.dimensions[s].set(e[s],t)},this.root.aspectRatio=2==s.length?s[0]/s[1]:null,this.root.dimensions=[];for(let t=0;t<s.length;++t){const o=new e.Panel;if(this.root.dimensions[t]=o.addNumber(null,s[t],(e=>{const s=this.value();if(this.root.locked){const n=0==t?1/this.root.aspectRatio:this.root.aspectRatio,i=(1+t)%2;s[i]=e*n,this.root.dimensions[i].set(s[i],!0)}n&&n(s)}),{min:0,disabled:i.disabled,precision:i.precision,className:"flex-fill"}),this.root.appendChild(this.root.dimensions[t].root),t+1!=s.length){const t=e.makeIcon("X",{svgClass:"fg-accent font-bold"});this.root.appendChild(t)}}if(i.units){let e=document.createElement("span");e.className="select-none fg-tertiary font-medium",e.innerText=i.units,this.root.appendChild(e)}if(this.root.aspectRatio){const t=new e.Button(null,"",(e=>{if(this.root.locked=e,e){const e=this.value();this.root.aspectRatio=e[0]/e[1]}}),{title:"Lock Aspect Ratio",icon:"LockOpen",swap:"Lock",buttonClass:"bg-none p-0"});this.root.appendChild(t.root)}}};e.OTPInput=class extends y{constructor(t,s,n,i={}){const o=i.pattern??"xxx-xxx",l=(o.match(/x/g)||[]).length;(s=String(s)).length||(s="x".repeat(l)),super(y.OTP,t,s,i),this.onGetValue=()=>+s,this.onSetValue=(i,o,l)=>{c(s=i),o||this._trigger(new e.IEvent(t,+i,l),n)},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";a.style.width=`calc( 100% - ${t})`},this.disabled=i.disabled??!1;const a=document.createElement("div");a.className="lexotp flex flex-row items-center",this.root.appendChild(a);const r=o.split("-"),c=t=>{a.innerHTML="";let s=0,n=0;for(let i=0;i<r.length;++i){const o=r[i];for(let i=0;i<o.length;++i){let l=t[s++];l="x"==l?"":l;const r=e.makeContainer(["36px","30px"],"lexotpslot border-top border-bottom border-left px-3 cursor-text select-none font-medium outline-none",l,a);r.tabIndex="1",this.disabled&&r.classList.add("disabled");const c=s;0==i?r.className+=" rounded-l":i==o.length-1&&(r.className+=" rounded-r border-right"),r.addEventListener("click",(()=>{if(this.disabled)return;a.querySelectorAll(".lexotpslot").forEach((e=>e.classList.remove("active")));const e=a.querySelectorAll(".lexotpslot")[n];e.classList.add("active"),e.focus()})),r.addEventListener("blur",(()=>{this.disabled||e.doAsync((()=>{a.contains(document.activeElement)||a.querySelectorAll(".lexotpslot").forEach((e=>e.classList.remove("active")))}),10)})),r.addEventListener("keyup",(e=>{if(!this.disabled)if(/[^0-9]+/g.test(e.key))if("ArrowLeft"==e.key||"ArrowRight"==e.key){const t="ArrowLeft"==e.key?-1:1,s=a.querySelectorAll(".lexotpslot")[n+t];s&&(a.querySelectorAll(".lexotpslot")[n].classList.remove("active"),s.classList.add("active"),s.focus(),n+=t)}else"Enter"!=e.key||t.includes("x")||this.set(t);else{const s=e.key;console.assert(NaN!=parseInt(s)),r.innerHTML=s,t=t.substring(0,c-1)+s+t.substring(c);const i=a.querySelectorAll(".lexotpslot")[n+1];i?(a.querySelectorAll(".lexotpslot")[n].classList.remove("active"),i.classList.add("active"),i.focus(),n++):this.set(t)}}))}i<r.length-1&&e.makeContainer(["auto","auto"],"mx-2","-",a)}console.assert(s==t.length,"OTP Value/Pattern Mismatch!")};c(s)}};e.Pad=class extends y{constructor(t,s,n,i={}){super(y.PAD,t,null,i),this.onGetValue=()=>a.value.xy,this.onSetValue=(s,i,o)=>{a.value.set(s[0],s[1]),r(a.value),i||this._trigger(new e.IEvent(t,a.value.xy),n)},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";o.style.width=`calc( 100% - ${t})`};var o=document.createElement("div");o.className="lexpad",this.root.appendChild(o);let l=document.createElement("div");l.id="lexpad-"+t,l.className="lexinnerpad",l.style.width=i.padSize??"96px",l.style.height=i.padSize??"96px",o.appendChild(l);let a=document.createElement("div");a.className="lexpadthumb",a.value=new e.vec2(s[0],s[1]),a.min=i.min??0,a.max=i.max??1,l.appendChild(a);let r=t=>{const[s,n]=[l.offsetWidth,l.offsetHeight],i=new e.vec2(e.remapRange(t.x,a.min,a.max,0,1),e.remapRange(t.y,a.min,a.max,0,1));a.style.transform=`translate(calc( ${s*i.x}px - 50% ), calc( ${n*i.y}px - 50%)`};l.addEventListener("mousedown",(function(e){if(document.activeElement==a)return;var t=c.root.ownerDocument;t.addEventListener("mousemove",d),t.addEventListener("mouseup",h),document.body.classList.add("nocursor"),document.body.classList.add("noevents"),e.stopImmediatePropagation(),e.stopPropagation(),a.classList.add("active"),i.onPress&&i.onPress.bind(a)(e,a)}));let c=this;function d(s){const i=l.getBoundingClientRect(),o=new e.vec2(s.x-i.x,s.y-i.y);o.clp(0,l.offsetWidth,o);const[r,d]=[l.offsetWidth,l.offsetHeight],h=o.div(new e.vec2(l.offsetWidth,l.offsetHeight));a.style.transform=`translate(calc( ${r*h.x}px - 50% ), calc( ${d*h.y}px - 50%)`,a.value=new e.vec2(e.remapRange(h.x,0,1,a.min,a.max),e.remapRange(h.y,0,1,a.min,a.max)),c._trigger(new e.IEvent(t,a.value.xy,s),n),s.stopPropagation(),s.preventDefault()}function h(e){var t=c.root.ownerDocument;t.removeEventListener("mousemove",d),t.removeEventListener("mouseup",h),document.body.classList.remove("nocursor"),document.body.classList.remove("noevents"),a.classList.remove("active"),i.onRelease&&i.onRelease.bind(a)(e,a)}e.doAsync((()=>{this.onResize(),r(a.value)}))}};e.Progress=class extends y{constructor(t,s,n={}){super(y.PROGRESS,t,s,n),this.onGetValue=()=>o.value,this.onSetValue=(e,t,s)=>{this.root.querySelector("meter").value=e,l(),this.root.querySelector("span")&&(this.root.querySelector("span").innerText=e)},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";i.style.width=`calc( 100% - ${t})`};const i=document.createElement("div");i.className="lexprogress",this.root.appendChild(i);let o=document.createElement("meter");o.id="lexprogressbar-"+t,o.className="lexprogressbar",o.step="any",o.min=n.min??0,o.max=n.max??1,o.low=n.low??o.low,o.high=n.high??o.high,o.optimum=n.optimum??o.optimum,o.value=s,i.appendChild(o);const l=()=>{let t=e.getThemeColor("global-selected");null!=o.low&&o.value<o.low?t=e.getThemeColor("global-color-error"):null!=o.high&&o.value<o.high&&(t=e.getThemeColor("global-color-warning")),o.style.background=`color-mix(in srgb, ${t} 20%, transparent)`};if(n.showValue){document.getElementById("progressvalue-"+t)&&document.getElementById("progressvalue-"+t).remove();let e=document.createElement("span");e.id="progressvalue-"+t,e.style.padding="0px 5px",e.innerText=s,i.appendChild(e)}if(n.editable){o.classList.add("editable");let t=t=>{var n=this.root.ownerDocument;n.addEventListener("mousemove",s),n.addEventListener("mouseup",i),document.body.classList.add("noevents"),o.classList.add("grabbing"),t.stopImmediatePropagation(),t.stopPropagation();const l=o.getBoundingClientRect(),a=e.round(e.remapRange(t.offsetX,0,l.width,o.min,o.max));this.set(a,!1,t)},s=t=>{if(0!=t.movementX){const s=o.getBoundingClientRect(),i=e.round(e.remapRange(t.offsetX-s.x,0,s.width,o.min,o.max));this.set(i,!1,t),n.callback&&n.callback(i,t)}t.stopPropagation(),t.preventDefault()},i=e=>{var t=this.root.ownerDocument;t.removeEventListener("mousemove",s),t.removeEventListener("mouseup",i),document.body.classList.remove("noevents"),o.classList.remove("grabbing")};o.addEventListener("mousedown",t)}l(),e.doAsync(this.onResize.bind(this))}};e.FileInput=class extends y{constructor(t,s,n={}){super(y.FILE,t,null,n);let i=n.local??!0,o=n.type??"text",l=n.read??!0;this.onResize=e=>{const t=this.root.domName?.style.width??"0px";a.style.width=`calc( 100% - ${t})`};let a=document.createElement("input");if(a.className="lexfileinput",a.type="file",a.disabled=n.disabled??!1,this.root.appendChild(a),n.placeholder&&(a.placeholder=n.placeholder),a.addEventListener("change",(function(e){const t=e.target.files;if(t.length)if(l){n.onBeforeRead&&n.onBeforeRead();const e=new FileReader;"text"===o?e.readAsText(t[0]):"buffer"===o?e.readAsArrayBuffer(t[0]):"bin"===o?e.readAsBinaryString(t[0]):"url"===o&&e.readAsDataURL(t[0]),e.onload=e=>{s.call(this,e.target.result,t[0])}}else s(t[0])})),a.addEventListener("cancel",(function(e){s(null)})),i){let t=null;const s=new e.Button(null,"",(()=>{t||(t=new e.Dialog("Load Settings",(e=>{e.addSelect("Type",["text","buffer","bin","url"],o,(e=>{o=e})),e.addButton(null,"Reload",(e=>{a.dispatchEvent(new Event("change"))}))}),{onclose:e=>{e.remove(),t=null}}))}),{skipInlineCount:!0,title:"Settings",disabled:n.disabled,icon:"Settings"});this.root.appendChild(s.root)}e.doAsync(this.onResize.bind(this))}};e.Tree=class extends y{constructor(t,s,n={}){n.hideName=!0,super(y.TREE,t,null,n);let i=document.createElement("div");if(i.className="lextree",this.root.appendChild(i),t){let e=document.createElement("span");e.innerHTML=t,i.appendChild(e)}let o=document.createElement("div");if(o.className="lextreetools",t||(o.className+=" notitle"),n.icons)for(let t of n.icons){const s=e.makeIcon(t.icon,{title:t.name});s.addEventListener("click",t.callback),o.appendChild(s)}n.filter=n.filter??!0;let l=null;if(n.filter){l=document.createElement("input"),l.className="lexnodetreefilter",l.setAttribute("placeholder","Filter.."),l.style.width="100%",l.addEventListener("input",(()=>{this.innerTree.refresh()}));let t=e.makeIcon("Search");o.appendChild(l),o.appendChild(t)}(n.icons||n.filter)&&i.appendChild(o);let a=document.createElement("ul");a.addEventListener("contextmenu",(function(e){e.preventDefault()})),i.appendChild(a),this.innerTree=new L(i,s,n)}};e.TabSections=class extends y{constructor(t,s,n={}){if(n.hideName=!0,super(y.TABS,t,null,n),s.constructor!=Array)throw"Param @tabs must be an Array!";const i=n.vertical??!0,o=!i&&(n.showNames??!1);let l=document.createElement("div");l.className="lextabscontainer",i||(l.className+=" horizontal");let a=document.createElement("div");a.className="tabs",l.appendChild(a),this.root.appendChild(l);for(let t=0;t<s.length;++t){const n=s[t];console.assert(n.name);const i=0==t;let r=document.createElement("div");r.className="lextab "+(t==s.length-1?"last":"")+(i?"selected":""),r.innerHTML=o?n.name:"",r.appendChild(e.makeIcon(n.icon??"Hash",{title:n.name}));let c=document.createElement("div");if(c.id=n.name.replace(/\s/g,""),c.className="widgets",i||c.toggleAttribute("hidden",!0),l.appendChild(c),r.addEventListener("click",(e=>{a.querySelectorAll(".lextab").forEach((e=>{e.classList.remove("selected")})),r.classList.add("selected"),l.querySelectorAll(".widgets").forEach((e=>{e.toggleAttribute("hidden",!0)}));l.querySelector("#"+c.id).toggleAttribute("hidden"),n.onSelect&&n.onSelect(this,c)})),a.appendChild(r),n.onCreate){const t=new e.Panel;t.queue(c),n.onCreate.call(this,t),t.clearQueue()}}}};e.Counter=class extends y{constructor(t,s,n,i={}){super(y.COUNTER,t,s,i),this.onGetValue=()=>h.count,this.onSetValue=(s,i,a)=>{s=e.clamp(s,o,l),h.count=s,h.innerHTML=s,i||this._trigger(new e.IEvent(t,s,a),n)};const o=i.min??0,l=i.max??100,a=i.step??1,r=document.createElement("div");r.className="lexcounter",this.root.appendChild(r);const c=new e.Button(null,"",((e,t)=>{let s=a??1;t.shiftKey&&(s*=10),this.set(h.count-s,!1,t)}),{skipInlineCount:!0,title:"Minus",icon:"Minus"});r.appendChild(c.root);const d=document.createElement("div");d.className="lexcounterbox",r.appendChild(d);const h=document.createElement("span");if(h.className="lexcountervalue",h.innerHTML=s,h.count=s,d.appendChild(h),i.label){const e=document.createElement("span");e.className="lexcounterlabel",e.innerHTML=i.label,d.appendChild(e)}const u=new e.Button(null,"",((e,t)=>{let s=a??1;t.shiftKey&&(s*=10),this.set(h.count+s,!1,t)}),{skipInlineCount:!0,title:"Plus",icon:"Plus"});r.appendChild(u.root)}};e.Table=class extends y{constructor(t,s,n={}){if(!s)throw"Data is needed to create a table!";super(y.TABLE,t,null,n),this.onResize=e=>{const t=this.root.domName?.style.width??"0px";i.style.width=`calc( 100% - ${t})`};const i=document.createElement("div");i.className="lextable",this.root.appendChild(i),this.centered=n.centered??!1,!0===this.centered&&i.classList.add("centered"),this.filter=n.filter??!1,this.toggleColumns=n.toggleColumns??!1,this.customFilters=n.customFilters??!1,this.activeCustomFilters={},this._currentFilter=n.filterValue,s.head=s.head??[],s.body=s.body??[],s.checkMap={},s.colVisibilityMap={},s.head.forEach(((e,t)=>{s.colVisibilityMap[t]=!0}));const o=(e,t,s,n)=>s[e]<n[e]?-t:s[e]>n[e]?t:0,l=(e,t)=>{s.body=s.body.sort(o.bind(this,e,t)),this.refresh()};if(this.filter||this.customFilters||this.toggleColumns){const t=e.makeContainer(["100%","auto"],"flex flex-row");if(this.filter){const s=e.deepCopy(n);s.placeholder=`Filter ${this.filter}...`,s.skipWidget=!0,s.trigger="input",s.inputClass="outline";let i=new e.TextInput(null,this._currentFilter??"",(e=>{this._currentFilter=e,this.refresh()}),s);t.appendChild(i.root)}if(this.customFilters){const s=e.makeIcon("CirclePlus",{svgClass:"sm"}),n='<div class="lexcontainer border-right self-center mx-1" style="width: 1px; height: 70%;"></div>';for(let i of this.customFilters)i.widget=new e.Button(null,s.innerHTML+i.name,(t=>{const o=i.widget.root.querySelector("span");if(i.options){const t=i.options.map(((t,l)=>{const a={name:t,checked:!!this.activeCustomFilters[t],callback:(t,l,a)=>{l?this.activeCustomFilters[t]=i.name:delete this.activeCustomFilters[t];const r=Object.keys(this.activeCustomFilters).filter((e=>this.activeCustomFilters[e]==i.name)),c=r.reduce(((t,s)=>t+e.badge(s,"bg-tertiary fg-secondary text-sm border-0")),"");o.innerHTML=s.innerHTML+i.name+(r.length?n:"")+c,this.refresh()}};return a}));new e.DropdownMenu(i.widget.root,t,{side:"bottom",align:"start"})}else if("range"==i.type){console.assert(null!=i.min&&null!=i.max,"Range filter needs min and max values!");const t=e.makeContainer(["240px","auto"],"text-md"),l=new e.Panel;e.makeContainer(["100%","auto"],"px-3 p-2 pb-0 text-md font-medium",i.name,t),i.start=i.start??i.min,i.end=i.end??i.max,l.refresh=()=>{l.clear(),l.sameLine(2,"justify-center"),l.addNumber(null,i.start,(t=>{i.start=t;const l=i.start!=i.min||i.end!=i.max;o.innerHTML=s.innerHTML+i.name+(l?n+e.badge(`${i.start} - ${i.end} ${i.units??""}`,"bg-tertiary fg-secondary text-sm border-0"):""),this.refresh()}),{skipSlider:!0,min:i.min,max:i.max,step:i.step,units:i.units}),l.addNumber(null,i.end,(t=>{i.end=t;const l=i.start!=i.min||i.end!=i.max;o.innerHTML=s.innerHTML+i.name+(l?n+e.badge(`${i.start} - ${i.end} ${i.units??""}`,"bg-tertiary fg-secondary text-sm border-0"):""),this.refresh()}),{skipSlider:!0,min:i.min,max:i.max,step:i.step,units:i.units}),l.addButton(null,"Reset",(()=>{i.start=i.min,i.end=i.max,o.innerHTML=s.innerHTML+i.name,l.refresh(),this.refresh()}),{buttonClass:"contrast"})},l.refresh(),t.appendChild(l.root),new e.Popover(i.widget.root,[t],{side:"bottom"})}}),{buttonClass:"px-2 primary dashed"}),t.appendChild(i.widget.root);this._resetCustomFiltersBtn=new e.Button(null,"resetButton",(e=>{this.activeCustomFilters={},this._resetCustomFiltersBtn.root.classList.add("hidden");for(let e of this.customFilters)e.widget.root.querySelector("span").innerHTML=s.innerHTML+e.name,"range"==e.type&&(e.start=e.min,e.end=e.max);this.refresh()}),{title:"Reset filters",tooltip:!0,icon:"X"}),t.appendChild(this._resetCustomFiltersBtn.root),this._resetCustomFiltersBtn.root.classList.add("hidden")}if(this.toggleColumns){const n=e.makeIcon("Settings2"),i=new e.Button("toggleColumnsBtn",n.innerHTML+"View",((t,n)=>{const i=s.head.map(((e,t)=>{const n={name:e,icon:"Check",callback:()=>{s.colVisibilityMap[t]=!s.colVisibilityMap[t];a.querySelectorAll(`tr > *:nth-child(${t+this.rowOffsetCount+1})`).forEach((e=>{e.style.display="none"===e.style.display?"":"none"}))}};return s.colVisibilityMap[t]||delete n.icon,n}));new e.DropdownMenu(n.target,i,{side:"bottom",align:"end"})}),{hideName:!0});t.appendChild(i.root),i.root.style.marginLeft="auto"}i.appendChild(t)}const a=document.createElement("table");i.appendChild(a),this.refresh=()=>{this._currentFilter=this._currentFilter??"",a.innerHTML="",this.rowOffsetCount=0;{const t=document.createElement("thead");t.className="lextablehead",a.appendChild(t);const i=document.createElement("tr");if(n.sortable){const e=document.createElement("th");e.style.width="0px",i.appendChild(e),this.rowOffsetCount++}if(n.selectable){const e=document.createElement("th");e.style.width="0px";const t=document.createElement("input");t.type="checkbox",t.className="lexcheckbox accent",t.checked=s.checkMap[":root"]??!1,e.appendChild(t),t.addEventListener("change",(function(){s.checkMap[":root"]=this.checked;const e=a.querySelector("tbody");for(const t of e.childNodes)s.checkMap[t.getAttribute("rowId")]=this.checked,t.querySelector("input[type='checkbox']").checked=this.checked})),this.rowOffsetCount++,i.appendChild(e)}for(const t of s.head){const n=document.createElement("th");n.innerHTML=`<span>${t}</span>`,n.querySelector("span").appendChild(e.makeIcon("MenuArrows",{svgClass:"sm"}));const o=s.head.indexOf(t);this.centered&&this.centered.indexOf(o)>-1&&n.classList.add("centered");const r=[{name:"Asc",icon:"ArrowUpAZ",callback:l.bind(this,o,1)},{name:"Desc",icon:"ArrowDownAZ",callback:l.bind(this,o,-1)}];this.toggleColumns&&r.push(null,{name:"Hide",icon:"EyeOff",callback:()=>{s.colVisibilityMap[o]=!1;a.querySelectorAll(`tr > *:nth-child(${o+this.rowOffsetCount+1})`).forEach((e=>{e.style.display="none"===e.style.display?"":"none"}))}}),n.addEventListener("click",(t=>{new e.DropdownMenu(t.target,r,{side:"bottom",align:"start"})})),i.appendChild(n)}if(n.rowActions){const e=document.createElement("th");e.className="sm",i.appendChild(e)}t.appendChild(i)}{const t=document.createElement("tbody");t.className="lextablebody",a.appendChild(t);let i=null,o=!1,l=null;document.addEventListener("mouseup",(t=>{if(null===i)return;document.removeEventListener("mousemove",r);const n=a.rows[i];if(n.dY=0,n.classList.remove("dragging"),Array.from(a.rows).forEach((e=>{e.style.transform="",e.style.transition="none"})),e.flushCss(n),l){const e=i-1,t=l[1]-1,n=s.body[e];let o=0;if(e==t)return;if(e>t)for(let n=e;n>t;--n)s.body[n]=s.body[n-1];else{o=1;for(let n=e;n<t;++n)s.body[n]=s.body[n+1]}s.body[t]=n;l[0].parentNode.insertChildAtIndex(l[0],t+o),l=null}i=null,e.doAsync((()=>{Array.from(a.rows).forEach((e=>{e.style.transition="transform 0.2s ease-in"}))}))}));let r=e=>{if(!i)return;const t=a.rows[i];t.dY=t.dY??0,t.dY+=e.movementY,t.style.transform=`translateY(${t.dY}px)`};for(let c=0;c<s.body.length;++c){const d=s.body[c];if(this.filter){const t=s.head.indexOf(this.filter);if(t>-1){if(!e.stripHTML(d[t]).toLowerCase().includes(this._currentFilter.toLowerCase()))continue}}if(Object.keys(this.activeCustomFilters).length){let e={};this._resetCustomFiltersBtn.root.classList.remove("hidden");for(let t in this.activeCustomFilters){const n=this.activeCustomFilters[t];e[n]=e[n]??!1;const i=s.head.indexOf(n);i>-1&&(e[n]|=d[i]===t)}if(!Object.values(e).reduce(((e,t)=>t*e),!0))continue}if(this.customFilters){let e={};for(let t of this.customFilters){const n=t.name;if("range"==t.type){e[n]=e[n]??!1;const i=s.head.indexOf(n);if(i>-1){const s=parseFloat(d[i]),o=t.start??t.min,l=t.end??t.max;e[n]|=s>=o&&s<=l}}else t.type}if(!Object.values(e).reduce(((e,t)=>t*e),!0))continue}const h=document.createElement("tr"),u=e.getSupportedDOMName(d.join("-"));if(h.setAttribute("rowId",u.substr(0,32)),n.sortable){const t=document.createElement("td");t.style.width="0px";const s=e.makeIcon("GripVertical");t.appendChild(s),s.draggable=!0,s.addEventListener("dragstart",(e=>{e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),i=h.rowIndex,h.classList.add("dragging"),document.addEventListener("mousemove",r)}),!1),h.addEventListener("mouseenter",(function(t){if(t.preventDefault(),null!=i&&this.rowIndex!=i&&o!=this.rowIndex){o=this.rowIndex;const t=a.rows[i],s=""!=this.style.transform;this.rowIndex>i?(l=[t,s?this.rowIndex-1:this.rowIndex],this.style.transform=s?"":`translateY(-${this.offsetHeight}px)`):(l=[t,s?this.rowIndex+1:this.rowIndex],this.style.transform=s?"":`translateY(${this.offsetHeight}px)`),e.doAsync((()=>{o=!1}))}})),h.appendChild(t)}if(n.selectable){const e=document.createElement("td"),t=document.createElement("input");t.type="checkbox",t.className="lexcheckbox accent",t.checked=s.checkMap[u],e.appendChild(t),t.addEventListener("change",(function(){s.checkMap[u]=this.checked;const e=a.querySelector("thead input[type='checkbox']");if(this.checked){Array.from(a.querySelectorAll("tbody input[type='checkbox']")).filter((e=>!e.checked)).length||(e.checked=s.checkMap[":root"]=!0)}else e.checked=s.checkMap[":root"]=!1})),h.appendChild(e)}for(const e of d){const t=document.createElement("td");t.innerHTML=`${e}`;const s=d.indexOf(e);this.centered&&this.centered.indexOf(s)>-1&&t.classList.add("centered"),h.appendChild(t)}if(n.rowActions){const t=document.createElement("td");t.style.width="0px";const i=document.createElement("div");i.className="lextablebuttons",t.appendChild(i);for(const t of n.rowActions){let o=null;"delete"==t?(o=e.makeIcon("Trash3",{title:"Delete Row"}),o.addEventListener("click",(function(){s.body.splice(c,1),h.remove()}))):"menu"==t?(o=e.makeIcon("Ellipsis",{title:"Menu"}),o.addEventListener("click",(function(t){if(!n.onMenuAction)return;const i=n.onMenuAction(c,s);console.assert(i.length,"Add items to the Menu Action Dropdown!"),new e.DropdownMenu(t.target,i,{side:"bottom",align:"end"})}))):(console.assert(t.constructor==Object),o=e.makeIcon(t.icon,{title:t.title}),t.callback&&o.addEventListener("click",(e=>{t.callback(d,a,e)&&this.refresh()}))),console.assert(o),i.appendChild(o)}h.appendChild(t)}t.appendChild(h)}}for(const e in s.colVisibilityMap){const t=parseInt(e);if(!s.colVisibilityMap[t]){a.querySelectorAll(`tr > *:nth-child(${t+this.rowOffsetCount+1})`).forEach((e=>{e.style.display="none"===e.style.display?"":"none"}))}}},this.refresh(),e.doAsync(this.onResize.bind(this))}};e.DatePicker=class extends y{constructor(t,s,n,i={}){if(super(y.DATE,t,null,i),i.today){const e=new Date;s=`${e.getDate()}/${e.getMonth()+1}/${e.getFullYear()}`}this.onGetValue=()=>s,this.onSetValue=(i,o,a)=>{s=i,this.calendar.fromDateString(i),l(this.calendar.getFullDate()),o||this._trigger(new e.IEvent(t,i,a),n)},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";o.style.width=`calc( 100% - ${t})`};const o=document.createElement("div");o.className="lexdate",this.root.appendChild(o),this.calendar=new e.Calendar(s,{onChange:e=>{this.set(`${e.day}/${e.month}/${e.year}`)},...i});const l=t=>{o.innerHTML="";const s=e.makeIcon("Calendar"),n=new e.Button(null,t??"Pick a date",(()=>{this._popover=new e.Popover(n.root,[this.calendar])}),{buttonClass:`flex flex-row px-3 ${t?"":"fg-tertiary"} justify-between`});n.root.querySelector("button").appendChild(s),o.appendChild(n.root)};l(s?this.calendar.getFullDate():null),e.doAsync(this.onResize.bind(this))}};e.Map2D=class extends y{constructor(t,s,n,i={}){super(y.MAP2D,t,null,i),this.onGetValue=()=>this.map2d.weightsObj,this.onSetValue=(e,t,s)=>{},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";o.style.width=`calc( 100% - ${t})`};var o=document.createElement("div");o.className="lexmap2d",this.root.appendChild(o),this.map2d=new e.CanvasMap2D(s,n,i);const l=e.makeIcon("SquareMousePointer"),a=new e.Button(null,"Open Map",(()=>{this._popover=new e.Popover(a.root,[this.map2d])}),{buttonClass:"flex flex-row px-3 fg-secondary justify-between"});a.root.querySelector("button").appendChild(l),o.appendChild(a.root),e.doAsync(this.onResize.bind(this))}};class w{constructor(e={}){var t=document.createElement("div");t.className="lexpanel",e.id&&(t.id=e.id),e.className&&(t.className+=" "+e.className),t.style.width=e.width||"100%",t.style.height=e.height||"100%",Object.assign(t.style,e.style??{}),this.root=t,this.branches=[],this.widgets={},this._branchOpen=!1,this._currentBranch=null,this._queue=[],this._inlineWidgetsLeft=-1,this._inline_queued_container=null}get(e){return this.widgets[e]}getValue(e){let t=this.widgets[e];if(!t)throw"No widget called "+e;return t.value()}setValue(e,t,s){let n=this.widgets[e];if(!n)throw"No widget called "+e;return n.set(t,s)}attach(e){console.assert(e,"No content to attach!"),e.parent=this,this.root.appendChild(e.root?e.root:e)}clear(){this._branchOpen=!1,this.branches=[],this._currentBranch=null;for(let t in this.widgets)if(this.widgets[t].options&&this.widgets[t].options.signal){const s=this.widgets[t].options.signal;for(let n=0;n<e.signals[s].length;n++)e.signals[s][n]==this.widgets[t]&&(e.signals[s]=[...e.signals[s].slice(0,n),...e.signals[s].slice(n+1)])}if(this.signals)for(let t=0;t<this.signals.length;t++){let s=Object.values(this.signals[t])[0],n=s.options.signal;for(let t=0;t<e.signals[n].length;t++)e.signals[n][t]==s&&(e.signals[n]=[...e.signals[n].slice(0,t),...e.signals[n].slice(t+1)])}this.widgets={},this.root.innerHTML=""}sameLine(e,t){this._inline_queued_container=this.queuedContainer,this._inlineWidgetsLeft=e??1/0,this._inlineExtraClass=t??null}endLine(e){if(e=e??this._inlineExtraClass,-1!=this._inlineWidgetsLeft){this._inlineWidgetsLeft=-1,this._inlineContainer||(this._inlineContainer=document.createElement("div"),this._inlineContainer.className="lexinlinewidgets",e&&(this._inlineContainer.className+=` ${e}`));for(let e of this._inlineWidgets){e.constructor==Array?this._inline_queued_container?this._inlineContainer.appendChild(e[0]):e[1].appendChild(e[0]):this._inlineContainer.appendChild(e)}this._inline_queued_container?this._inline_queued_container.appendChild(this._inlineContainer):this._currentBranch?this._currentBranch.content.appendChild(this._inlineContainer):this.root.appendChild(this._inlineContainer),delete this._inlineWidgets,delete this._inlineContainer,delete this._inlineExtraClass}else console.warn("No pending widgets to be inlined!")}branch(t,s={}){this._branchOpen&&this.merge();var n=new e.Branch(t,s);return n.panel=this,this._branchOpen=!0,this._currentBranch=n,this.branches.push(n),this.root.appendChild(n.root),s.filter&&this._addFilter(s.filter,{callback:this._searchWidgets.bind(this,n.name)}),n}merge(){this._branchOpen=!1,this._currentBranch=null}_pick(e,t){return void 0===e?t:e}_attachWidget(e,t={}){null!=e.name&&(this.widgets[e.name]=e),e.options.signal&&!e.name&&(this.signals||(this.signals=[]),this.signals.push({[e.options.signal]:e}));const s=s=>{t.container?t.container.appendChild(s):this.queuedContainer?this.queuedContainer.appendChild(s):this._currentBranch?(t.skipWidget||this._currentBranch.widgets.push(e),this._currentBranch.content.appendChild(s)):(s.className+=" nobranch w-full",this.root.appendChild(s))},n=e=>{this.queuedContainer?this._inlineWidgets.push([e,this.queuedContainer]):this._inlineWidgets.push(e)};return this._inlineWidgetsLeft>0&&!t.skipInlineCount?(this._inlineWidgets||(this._inlineWidgets=[]),n(e.root),this._inlineWidgetsLeft--,this._inlineWidgetsLeft||this.endLine()):s(e.root),e}_addFilter(t,s={}){s.placeholder=t.constructor==String?t:"Filter properties..",s.skipWidget=s.skipWidget??!0,s.skipInlineCount=!0;const n=new e.TextInput(null,null,null,s).root;n.className+=" lexfilter";let i=document.createElement("input");i.className="lexinput-filter",i.setAttribute("placeholder",s.placeholder),i.style.width="100%",i.value=s.filterValue||"";let o=e.makeIcon("Search");return n.appendChild(o),n.appendChild(i),i.addEventListener("input",(e=>{s.callback&&s.callback(i.value,e)})),n}_searchWidgets(e,t){for(let s of this.branches){if(s.name!==e)continue;for(let e of s.widgets)e.domEl.classList.contains("lexfilter")||e.domEl.remove();this.queue(s.content);const n=!t.length;for(let e of s.widgets){if(!n){if(!e.name)continue;t.toLowerCase();if(!e.name.toLowerCase().includes(t))continue}this.queuedContainer.appendChild(e.domEl)}return void this.clearQueue()}}getBranch(e){return e?this.branches.find((t=>t.name==e)):this._currentBranch}queue(e){!e&&this._currentBranch&&(e=this._currentBranch.root),this.queuedContainer&&this._queue.push(this.queuedContainer),this.queuedContainer=e}clearQueue(){this._queue&&this._queue.length?this.queuedContainer=this._queue.pop():delete this.queuedContainer}addSeparator(){var t=document.createElement("div");t.className="lexseparator";let s=new e.Widget(e.Widget.SEPARATOR);s.root=t,this._currentBranch?(this._currentBranch.content.appendChild(t),this._currentBranch.widgets.push(s)):this.root.appendChild(t)}addBlank(t,s){const n=new e.Blank(t,s);return this._attachWidget(n)}addTitle(t,s={}){const n=new e.Title(t,s);return this._attachWidget(n)}addText(t,s,n,i={}){const o=new e.TextInput(t,s,n,i);return this._attachWidget(o)}addTextArea(t,s,n,i={}){const o=new e.TextArea(t,s,n,i);return this._attachWidget(o)}addLabel(t,s={}){s.disabled=!0,s.inputClass=(s.inputClass??"")+" nobg";const n=this.addText(null,t,null,s);return n.type=e.Widget.LABEL,n}addButton(t,s,n,i={}){const o=new e.Button(t,s,n,i);return this._attachWidget(o)}addComboButtons(t,s,n={}){const i=new e.ComboButtons(t,s,n);return this._attachWidget(i)}addCard(t,s={}){const n=new e.Card(t,s);return this._attachWidget(n)}addForm(t,s,n,i={}){const o=new e.Form(t,s,n,i);return this._attachWidget(o)}addContent(t,s,n={}){if(console.assert(s,"Empty content!"),s.constructor==String){const e=document.createElement("div");e.innerHTML=s,s=e.childElementCount>1?e:e.firstElementChild}n.hideName=!0;let i=new e.Widget(e.Widget.CONTENT,t,null,n);return i.root.appendChild(s),this._attachWidget(i)}async addImage(t,s,n={}){console.assert(s,"Empty src/url for Image!");let i=document.createElement("div");i.className="leximage",i.style.width="100%";let o=document.createElement("img");o.src=s,Object.assign(o.style,n.style??{}),i.appendChild(o);let l=new e.Widget(e.Widget.IMAGE,t,null,n);return l.root.appendChild(i),o.decode(),this._attachWidget(l)}addSelect(t,s,n,i,o={}){const l=new e.Select(t,s,n,i,o);return this._attachWidget(l)}addCurve(t,s,n,i={}){const o=new e.Curve(t,s,n,i);return this._attachWidget(o)}addDial(t,s,n,i={}){const o=new e.Dial(t,s,n,i);return this._attachWidget(o)}addLayers(t,s,n,i={}){const o=new e.Layers(t,s,n,i);return this._attachWidget(o)}addArray(t,s=[],n,i={}){const o=new e.ItemArray(t,s,n,i);return this._attachWidget(o)}addList(t,s,n,i,o={}){const l=new e.List(t,s,n,i,o);return this._attachWidget(l)}addTags(t,s,n,i={}){const o=new e.Tags(t,s,n,i);return this._attachWidget(o)}addCheckbox(t,s,n,i={}){const o=new e.Checkbox(t,s,n,i);return this._attachWidget(o)}addToggle(t,s,n,i={}){const o=new e.Toggle(t,s,n,i);return this._attachWidget(o)}addRadioGroup(t,s,n,i,o={}){const l=new e.RadioGroup(t,s,n,i,o);return this._attachWidget(l)}addColor(t,s,n,i={}){const o=new e.ColorInput(t,s,n,i);return this._attachWidget(o)}addRange(t,s,n,i={}){const o=new e.RangeInput(t,s,n,i);return this._attachWidget(o)}addNumber(t,s,n,i={}){const o=new e.NumberInput(t,s,n,i);return this._attachWidget(o)}static VECTOR_COMPONENTS={0:"x",1:"y",2:"z",3:"w"};_addVector(t,s,n,i,o={}){const l=new e.Vector(t,s,n,i,o);return this._attachWidget(l)}addVector2(e,t,s,n){return this._addVector(2,e,t,s,n)}addVector3(e,t,s,n){return this._addVector(3,e,t,s,n)}addVector4(e,t,s,n){return this._addVector(4,e,t,s,n)}addSize(t,s,n,i={}){const o=new e.SizeInput(t,s,n,i);return this._attachWidget(o)}addOTP(t,s,n,i={}){const o=new e.OTPInput(t,s,n,i);return this._attachWidget(o)}addPad(t,s,n,i={}){const o=new e.Pad(t,s,n,i);return this._attachWidget(o)}addProgress(t,s,n={}){const i=new e.Progress(t,s,n);return this._attachWidget(i)}addFile(t,s,n={}){const i=new e.FileInput(t,s,n);return this._attachWidget(i)}addTree(t,s,n={}){const i=new e.Tree(t,s,n);return this._attachWidget(i)}addTabSections(t,s,n={}){const i=new e.TabSections(t,s,n);return this._attachWidget(i)}addCounter(t,s,n,i={}){const o=new e.Counter(t,s,n,i);return this._attachWidget(o)}addTable(t,s,n={}){const i=new e.Table(t,s,n);return this._attachWidget(i)}addDate(t,s,n,i={}){const o=new e.DatePicker(t,s,n,i);return this._attachWidget(o)}addMap2D(t,s,n,i={}){const o=new e.Map2D(t,s,n,i);return this._attachWidget(o)}}e.Panel=w;class k{constructor(t,s={}){this.name=t;var n=document.createElement("div");n.className="lexbranch",s.id&&(n.id=s.id),s.className&&(n.className+=" "+s.className),n.style.margin="0 auto";var i=this;this.closed=s.closed??!1,this.root=n,this.widgets=[];var o=document.createElement("div");if(o.className="lexbranchtitle",s.icon){const t=e.makeIcon(s.icon,{iconClass:"mr-2"});o.appendChild(t)}o.innerHTML+=t||"Branch";const l=e.makeIcon("Right",{iconClass:"switch-branch-button",svgClass:"sm"});o.appendChild(l),n.appendChild(o);var a=document.createElement("div");a.id=t.replace(/\s/g,""),a.className="lexbranchcontent",n.appendChild(a),this.content=a,this._addBranchSeparator(),this.closed&&(o.classList.add("closed"),n.classList.add("closed"),this.grabber.setAttribute("hidden",!0),e.doAsync((()=>{this.content.setAttribute("hidden",!0)}),10)),this.onclick=function(t){this.classList.toggle("closed"),this.parentElement.classList.toggle("closed"),i.content.toggleAttribute("hidden"),i.grabber.toggleAttribute("hidden"),e.emit("@on_branch_closed",this.classList.contains("closed"))},this.oncontextmenu=function(t){t.preventDefault(),t.stopPropagation(),this.parentElement.classList.contains("dialog")||e.addContextMenu("Dock",t,(e=>{t.preventDefault(),e.add("Floating",i._onMakeFloating.bind(i))}),{icon:"WindowRestore"})},o.addEventListener("click",this.onclick),o.addEventListener("contextmenu",this.oncontextmenu)}_onMakeFloating(){const t=new e.Dialog(this.name,(e=>{for(let t of this.widgets)e.root.appendChild(t.root)}),{dockable:!0}),s=Array.from(this.root.parentElement.childNodes).indexOf(this.root);console.assert(s>=0,"Branch not found!"),t.branchData={name:this.name,widgets:this.widgets,closed:this.closed,panel:this.panel,childIndex:s},this.root.remove()}_addBranchSeparator(){const t=document.createElement("div");t.className="lexwidgetseparator",t.style.width="100%",t.style.background="none";const s=document.createElement("div");s.innerHTML="▾",t.appendChild(s),e.doAsync((()=>{s.style.marginLeft=parseFloat(e.DEFAULT_NAME_WIDTH)/100*this.content.offsetWidth+"px"}),10);const n=document.createElement("div");n.style.width="1px",n.style.marginLeft="6px",n.style.marginTop="2px",n.style.height="0px",s.appendChild(n),s.addEventListener("mousedown",(function(e){var t=i.root.ownerDocument;t.addEventListener("mouseup",l),t.addEventListener("mousemove",o),e.stopPropagation(),e.preventDefault();const s=i.root.offsetHeight-i.root.children[0].offsetHeight;n.style.height=s-3+"px",document.body.classList.add("nocursor")})),this.grabber=s;let i=this;function o(t){let n=t.movementX;if(0!=n){const t=parseFloat(s.style.marginLeft);s.style.marginLeft=e.clamp(t+n,32,i.content.offsetWidth-32)+"px"}}function l(e){i._updateWidgets(),n.style.height="0px";var t=i.root.ownerDocument;t.removeEventListener("mouseup",l),t.removeEventListener("mousemove",o),document.body.classList.remove("nocursor")}this.content.appendChild(t)}_updateWidgets(){var t=this.grabber.style.marginLeft;for(let s=0;s<this.widgets.length;s++){let n=this.widgets[s];const i=n.root;if(i.children.length<2)continue;let o=i.children[0],l=i.children[1];switch(o.style.width=t,o.style.minWidth=t,n.type){case e.Widget.CUSTOM:case e.Widget.ARRAY:continue}l.style.width="-moz-calc( 100% - "+t+" )",l.style.width="-webkit-calc( 100% - "+t+" )",l.style.width="calc( 100% - "+t+" )"}}}e.Branch=k;class M{constructor(e,t={}){this.root=document.createElement("div"),this.root.className="lexmenubar",t.float&&(this.root.style.justifyContent=t.float),this.buttons=[],this.icons={},this.shorts={},this.items=e??[],this.createEntries()}_resetMenubar(e){this.root.querySelectorAll(".lexmenuentry").forEach((e=>{e.classList.remove("selected"),delete e.dataset.built})),this._currentDropdown&&(this._currentDropdown.destroy(),this._currentDropdown=null),this.focused=e??!1}createEntries(){for(let t of this.items){let s=t.name,n=e.getSupportedDOMName(s);if(this.root.querySelector("#"+n))continue;let i=document.createElement("div");i.className="lexmenuentry",i.id=n,i.innerHTML="<span>"+s+"</span>",i.tabIndex="1",this.root.appendChild(i);const o=()=>{this._resetMenubar(!0),i.classList.add("selected"),i.dataset.built="true",this._currentDropdown=e.addDropdownMenu(i,t.submenu??[],{side:"bottom",align:"start",onBlur:()=>{this._resetMenubar()}})};i.addEventListener("click",(()=>{const e=t.callback;e?e.call(this,s,i):(o(),this.focused=!0)})),i.addEventListener("mouseover",(e=>{this.focused&&!i.dataset.built&&o()}))}}getButton(e){return this.buttons[e]}getSubitem(e,t){let s=null,n=t[0];for(let i=0;i<e.length;i++)if(e[i][n])return 1==t.length?(s=e[i],s):(t.splice(0,1),this.getSubitem(e[i][n],t))}getItem(e){const t=e.split("/");return this.getSubitem(this.items,t)}setButtonIcon(t,s,n,i={}){if(!t)throw"Set Button Name!";let o=this.buttons[t];if(o)return o.innerHTML="",void o.appendChild(e.makeIcon(s,{svgClass:"xl"}));o=document.createElement("div");const l=i.disabled??!1;o.className="lexmenubutton main"+(l?" disabled":""),o.title=t,o.appendChild(e.makeIcon(s,{svgClass:"xl"})),"right"==i.float&&(o.right=!0),this.root.lastChild&&this.root.lastChild.right?this.root.lastChild.before(o):"left"==i.float?this.root.prepend(o):this.root.appendChild(o);const a=o.querySelector("a");a.addEventListener("click",(e=>{n&&!l&&n.call(this,a,e)})),this.buttons[t]=o}setButtonImage(e,t,s,n={}){if(!e)throw"Set Button Name!";let i=this.buttons[e];if(i)return void(i.querySelector("img").src=t);i=document.createElement("div");const o=n.disabled??!1;i.className="lexmenubutton main"+(o?" disabled":""),i.title=e,i.innerHTML="<a><image src='"+t+"' class='lexicon' style='height:32px;'></a>","right"==n.float&&(i.right=!0),this.root.lastChild&&this.root.lastChild.right?this.root.lastChild.before(i):"left"==n.float?this.root.prepend(i):this.root.appendChild(i);const l=i.querySelector("a");l.addEventListener("click",(e=>{s&&!o&&s.call(this,l,e)})),this.buttons[e]=i}addButtons(t,s={}){if(!t)throw"No buttons to add!";this.buttonContainer||(this.buttonContainer=document.createElement("div"),this.buttonContainer.className="lexmenubuttons",this.buttonContainer.classList.add(s.float??"center"),"right"==s.position&&(this.buttonContainer.right=!0),this.root.lastChild&&this.root.lastChild.right?this.root.lastChild.before(this.buttonContainer):this.root.appendChild(this.buttonContainer));for(let s=0;s<t.length;++s){const n=t[s],i=n.title,o=new e.Button(i,"",n.callback,{title:i,buttonClass:"bg-none",disabled:n.disabled,icon:n.icon,hideName:!0,swap:n.swap});this.buttonContainer.appendChild(o.root),i&&(this.buttons[i]=o.root)}}}e.Menubar=M;class _{constructor(t={}){if(this.root=document.createElement("div"),this.root.className="lexsidebar "+(t.className??""),this._displaySelected=t.displaySelected??!1,Object.defineProperty(_.prototype,"displaySelected",{get:function(){return this._displaySelected},set:function(e){this._displaySelected=e,this._displaySelected||this.root.querySelectorAll(".lexsidebarentry").forEach((e=>e.classList.remove("selected")))},enumerable:!0,configurable:!0}),this.side=t.side??"left",this.collapsable=t.collapsable??!0,this._collapseWidth=t.collapseToIcons??1?"58px":"0px",this.collapsed=!1,this.filterString="",e.doAsync((()=>{this.root.parentElement.ogWidth=this.root.parentElement.style.width,this.root.parentElement.style.transition="width 0.25s ease-out",this.resizeObserver=new ResizeObserver((e=>{for(const t of e)this.siblingArea.setSize(["calc(100% - "+t.contentRect.width+"px )",null])}))}),10),!t.skipHeader&&(this.header=t.header??this._generateDefaultHeader(t),console.assert(this.header.constructor===HTMLDivElement,"Use an HTMLDivElement to build your custom header"),this.header.className="lexsidebarheader",this.root.appendChild(this.header),this.collapsable)){const t=e.makeIcon("left"==this.side?"PanelLeft":"PanelRight",{title:"Toggle Sidebar",iconClass:"toggler"});this.header.appendChild(t),t.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),this.toggleCollapsed()}))}if(t.filter){const t=new e.TextInput(null,"",((e,t)=>{this.filterString=e,this.update()}),{inputClass:"outline",placeholder:"Search...",icon:"Search",className:"lexsidebarfilter"});this.filter=t.root,this.root.appendChild(this.filter)}this.content=document.createElement("div"),this.content.className="lexsidebarcontent",this.root.appendChild(this.content),t.skipFooter||(this.footer=t.footer??this._generateDefaultFooter(t),console.assert(this.footer.constructor===HTMLDivElement,"Use an HTMLDivElement to build your custom footer"),this.footer.className="lexsidebarfooter",this.root.appendChild(this.footer));new ResizeObserver((e=>{const t=(this.header?.offsetHeight??0)+(this.filter?.offsetHeight??0)+(this.footer?.offsetHeight??0);this.content.style.height=`calc(100% - ${t}px)`})).observe(this.root),this.items=[],this.icons={},this.groups={}}_generateDefaultHeader(t){const s=document.createElement("div");s.addEventListener("click",(e=>{this.collapsed?(e.preventDefault(),e.stopPropagation(),this.toggleCollapsed()):t.onHeaderPressed&&t.onHeaderPressed(e)}));const n=document.createElement("span");if(n.className="lexavatar",s.appendChild(n),t.headerImage){const e=document.createElement("img");e.src=t.headerImage,n.appendChild(e)}else if(t.headerIcon){const s=e.makeIcon(t.headerIcon);n.appendChild(s)}{const e=document.createElement("div");e.className="infodefault",s.appendChild(e);const n=document.createElement("span");n.innerHTML=t.headerTitle??"",e.appendChild(n);const i=document.createElement("span");i.innerHTML=t.headerSubtitle??"",e.appendChild(i)}return s}_generateDefaultFooter(t){const s=document.createElement("div");s.addEventListener("click",(e=>{t.onFooterPressed&&t.onFooterPressed(e,s)}));const n=document.createElement("span");if(n.className="lexavatar",s.appendChild(n),t.footerImage){const e=document.createElement("img");e.src=t.footerImage,n.appendChild(e)}else if(t.footerIcon){const s=e.makeIcon(t.footerIcon);n.appendChild(s)}{const e=document.createElement("div");e.className="infodefault",s.appendChild(e);const n=document.createElement("span");n.innerHTML=t.footerTitle??"",e.appendChild(n);const i=document.createElement("span");i.innerHTML=t.footerSubtitle??"",e.appendChild(i)}const i=e.makeIcon("MenuArrows");return s.appendChild(i),s}toggleCollapsed(t){if(this.collapsable){if(this.collapsed=t??!this.collapsed,this.collapsed?(this.root.classList.add("collapsing"),this.root.parentElement.style.width=this._collapseWidth):(this.root.classList.remove("collapsing"),this.root.classList.remove("collapsed"),this.root.parentElement.style.width=this.root.parentElement.ogWidth),!this.resizeObserver)throw"Wait until ResizeObserver has been created!";this.resizeObserver.observe(this.root.parentElement),e.doAsync((()=>{this.root.classList.toggle("collapsed",this.collapsed),this.resizeObserver.unobserve(this.root.parentElement),this.root.querySelectorAll(".lexsidebarentrycontent").forEach((e=>e.dataset.disableTooltip=!this.collapsed))}),250)}}separator(){this.currentGroup=null,this.add("")}group(e,t){this.currentGroup=e,this.groups[e]=t}add(e,t={}){t.constructor==Function&&(t={callback:t});const s=e.split("/"),n=s[s.length-1];this.icons[n]=t.icon;let i=0;const o=(e,n)=>{if(null==e)return;let l=null;if(n.forEach((t=>{const s=Object.keys(t).find((t=>t==e));s&&(l=t[s])})),l)o(s[i++],l);else{let l={};l[e]=[];const a=s[i++];a||(l.callback=t.callback,l.group=this.currentGroup,l.options=t),n.push(l),o(a,l[e])}};o(s[i++],this.items)}select(t){let s=e.getSupportedDOMName(t);const n=this.items.find((e=>e.name===s));n&&n.dom.click()}update(){this.content.innerHTML="";for(let e of this.items)delete e.dom;for(let t of this.items){const s=t.options??{};if(t.dom)continue;let n=t.name=Object.keys(t)[0];if(this.filterString.length&&!n.toLowerCase().includes(this.filterString.toLowerCase()))continue;let i=e.getSupportedDOMName(n),o=null,l=document.createElement("div");if(l.id=i,l.className="lexsidebarentry "+(s.className??""),this.displaySelected&&s.selected&&l.classList.add("selected"),t.group){const s=t.group.replace(/\s/g,"").replaceAll(".","");if(o=this.content.querySelector("#"+s),o){if(!o.classList.contains("lexsidebargroup"))throw"Bad id: "+t.group}else{o=document.createElement("div"),o.id=s,o.className="lexsidebargroup",this.content.appendChild(o);let n=document.createElement("div");n.className="lexsidebargrouptitle",o.appendChild(n);let i=document.createElement("div");if(i.innerHTML=t.group,n.appendChild(i),null!=this.groups[t.group]){const s=e.makeIcon(this.groups[t.group].icon,{svgClass:"sm"});n.appendChild(s),s.addEventListener("click",(e=>{this.groups[t.group].callback&&this.groups[t.group].callback(t.group,e)}))}}}if(""==i){let e=document.createElement("div");e.className="lexsidebarseparator",this.content.appendChild(e);continue}this.collapseContainer?(this.collapseContainer.appendChild(l),this.collapseQueue--,this.collapseQueue||delete this.collapseContainer):o?o.appendChild(l):this.content.appendChild(l);let a=document.createElement("div");if(a.className="lexsidebarentrycontent",l.appendChild(a),t.dom=l,"checkbox"==s.type){t.value=s.value??!1;const i=new e.Panel;t.checkbox=i.addCheckbox(null,t.value,((e,i)=>{i.preventDefault(),i.stopPropagation();const o=s.callback;t.value=e,o&&o.call(this,n,e,i)}),{className:"accent",label:n,signal:"@checkbox_"+n}),a.appendChild(i.root.childNodes[0])}else{if(s.icon){const t=e.makeIcon(s.icon,{iconClass:"lexsidebarentryicon"});a.appendChild(t),e.asTooltip(a,n,{side:"right",offset:16,active:!1})}let t=document.createElement("a");t.innerHTML=n,a.appendChild(t),s.content&&a.appendChild(s.content)}const r=null!=s.collapsable?s.collapsable:s.collapsable||t[n].length;if(l.addEventListener("click",(e=>{if(!e.target||!e.target.classList.contains("lexcheckbox")){if(r)a.querySelector(".collapser").click();else{const i=s.callback;i&&i.call(this,n,t.value,e),t.checkbox&&(t.value=!t.value,t.checkbox.set(t.value,!0))}this.displaySelected&&(this.root.querySelectorAll(".lexsidebarentry").forEach((e=>e.classList.remove("selected"))),l.classList.add("selected"))}})),s.action){const t=e.makeIcon(s.action.icon??"Ellipsis",{title:s.action.name});a.appendChild(t),t.addEventListener("click",(e=>{e.preventDefault(),e.stopImmediatePropagation();const t=s.action.callback;t&&t.call(this,n,e)}))}else if(r){const t=document.createElement("div");t.className="collapsablecontainer",Object.assign(t.style,{width:"100%",display:"none"}),e.makeCollapsible(a,t,o??this.content),this.collapseQueue=s.collapsable,this.collapseContainer=t}if(!t[n].length)continue;let c=document.createElement("div");c.className="lexsidebarsubentrycontainer",r?(this.collapseContainer.appendChild(c),delete this.collapseContainer):o?(c.classList.add("collapsablecontainer"),o.appendChild(c)):this.content.appendChild(c);for(let s=0;s<t[n].length;++s){const i=t[n][s],o=i.options??{},a=i.name=Object.keys(i)[0];if(this.filterString.length&&!a.toLowerCase().includes(this.filterString.toLowerCase()))continue;let r=document.createElement("div");if(r.innerHTML=`<span>${a}</span>`,o.action){const t=e.makeIcon(o.action.icon??"Ellipsis",{title:o.action.name});r.appendChild(t),t.addEventListener("click",(e=>{e.preventDefault(),e.stopImmediatePropagation();const t=o.action.callback;t&&t.call(this,a,e)}))}r.className="lexsidebarentry",r.id=a,c.appendChild(r),r.addEventListener("click",(e=>{const t=o.callback;t&&t.call(this,a,r,e),this.displaySelected&&(this.root.querySelectorAll(".lexsidebarentry").forEach((e=>e.classList.remove("selected"))),l.classList.add("selected"))}))}}}}e.Sidebar=_;class T{static NONE=0;static ASSET_SELECTED=1;static ASSET_DELETED=2;static ASSET_RENAMED=3;static ASSET_CLONED=4;static ASSET_DBLCLICKED=5;static ENTER_FOLDER=6;static ASSET_CHECKED=7;constructor(t,s,n){this.type=t||e.TreeEvent.NONE,this.item=s,this.value=n,this.multiple=!1}string(){switch(this.type){case T.NONE:return"assetview_event_none";case T.ASSET_SELECTED:return"assetview_event_selected";case T.ASSET_DELETED:return"assetview_event_deleted";case T.ASSET_RENAMED:return"assetview_event_renamed";case T.ASSET_CLONED:return"assetview_event_cloned";case T.ASSET_DBLCLICKED:return"assetview_event_dblclicked";case T.ENTER_FOLDER:return"assetview_event_enter_folder";case T.ASSET_CHECKED:return"assetview_event_checked"}}}e.AssetViewEvent=T;class S{static LAYOUT_CONTENT=0;static LAYOUT_LIST=1;static MAX_PAGE_ELEMENTS=50;constructor(t={}){this.rootPath="https://raw.githubusercontent.com/jxarco/lexgui.js/master/",this.layout=t.layout??S.LAYOUT_CONTENT,this.contentPage=1,t.rootPath&&(t.rootPath.constructor!==String?console.warn("Asset Root Path must be a String (now is "+path.constructor.name+")"):this.rootPath=t.rootPath);let s=document.createElement("div");s.className="lexassetbrowser",this.root=s;let n=new e.Area({width:"100%",height:"100%"});s.appendChild(n.root);let i,o,l=n;this.skipBrowser=t.skipBrowser??!1,this.skipPreview=t.skipPreview??!1,this.useNativeTitle=t.useNativeTitle??!1,this.onlyFolders=t.onlyFolders??!0,this.allowMultipleSelection=t.allowMultipleSelection??!1,this.previewActions=t.previewActions??[],this.contextMenu=t.contextMenu??[],this.onRefreshContent=t.onRefreshContent,document.body.appendChild(this.root),this.skipBrowser||([i,o]=n.split({type:"horizontal",sizes:["15%","85%"]}),l=o,i.setLimitBox(210,0),o.setLimitBox(512,0)),this.skipPreview||([l,o]=l.split({type:"horizontal",sizes:["80%","20%"]})),this.allowedTypes=t.allowedTypes||["None","Image","Mesh","Script","JSON","Clip"],this.prevData=[],this.nextData=[],this.data=[],this._processData(this.data,null),this.currentData=this.data,this.path=["@"],this.skipBrowser||this._createTreePanel(i),this._createContentPanel(l),this.skipPreview||(this.previewPanel=o.addPanel({className:"lexassetcontentpanel",style:{overflow:"scroll"}})),document.body.removeChild(this.root)}load(e,t){this.prevData.length=0,this.nextData.length=0,this.data=e,this._processData(this.data,null),this.currentData=this.data,this.path=["@"],this.skipBrowser||this._createTreePanel(this.area),this._refreshContent(),this.onevent=t}clear(){this.previewPanel&&this.previewPanel.clear(),this.leftPanel&&this.leftPanel.clear(),this.rightPanel&&this.rightPanel.clear()}_processData(e,t){e.constructor!==Array&&(e.folder=t,e.children=e.children??[]);let s=e.constructor===Array?e:e.children;for(var n=0;n<s.length;++n)this._processData(s[n],e)}_updatePath(t){this.path.length=0;const s=e=>{if(!e)return;let t=(e.children?e.children:e)[0];t&&t.folder&&(this.path.push(t.folder.id??"@"),s(t.folder.folder))};s(t),e.emit("@on_folder_change",this.path.reverse().join("/"))}_createTreePanel(t){this.leftPanel?this.leftPanel.clear():this.leftPanel=t.addPanel({className:"lexassetbrowserpanel"});let s={id:"/",children:this.data};const n=this.leftPanel.addTree("Content Browser",s,{filter:!1,onlyFolders:this.onlyFolders,onevent:t=>{let s=t.node,n=t.value;switch(t.type){case e.TreeEvent.NODE_SELECTED:t.multiple||this._enterFolder(s),s.parent||(this.prevData.push(this.currentData),this.currentData=this.data,this._refreshContent(),this.path=["@"],e.emit("@on_folder_change",this.path.join("/")));break;case e.TreeEvent.NODE_DRAGGED:s.folder=n,this._refreshContent()}}});this.tree=n.innerTree}_setContentLayout(e){this.layout=e,this._refreshContent()}_createContentPanel(t){this.rightPanel?this.rightPanel.clear():this.rightPanel=t.addPanel({className:"lexassetcontentpanel flex flex-col overflow-hidden"});const s=(e,t)=>{if(!this.allowNextPage)return;const s=this.contentPage;this.contentPage+=e,this.contentPage=Math.min(this.contentPage,1+((this.currentData.length-1)/S.MAX_PAGE_ELEMENTS|0)),this.contentPage=Math.max(this.contentPage,1),s!=this.contentPage&&this._refreshContent()};this.rightPanel.sameLine(),this.rightPanel.addSelect("Filter",this.allowedTypes,this.allowedTypes[0],(e=>this._refreshContent.call(this,null,e)),{width:"30%",minWidth:"128px"}),this.rightPanel.addText(null,this.searchValue??"",(e=>this._refreshContent.call(this,e,null)),{placeholder:"Search assets.."}),this.rightPanel.addButton(null,"",((t,s)=>{const n=e.addContextMenu("Sort by",s,(e=>{e.add("Name",(()=>this._sortData("id"))),e.add("Type",(()=>this._sortData("type"))),e.add(""),e.add("Ascending",(()=>this._sortData())),e.add("Descending",(()=>this._sortData(null,!0)))})),i=this.parent.root.parentElement;i.classList.contains("lexdialog")&&(n.root.style.zIndex=+getComputedStyle(i).zIndex+1)}).bind(this),{title:"Sort",icon:"ArrowUpNarrowWide"}),this.rightPanel.addButton(null,"",((t,s)=>{const n=e.addContextMenu("Layout",s,(e=>{e.add("Content",(()=>this._setContentLayout(S.LAYOUT_CONTENT))),e.add(""),e.add("List",(()=>this._setContentLayout(S.LAYOUT_LIST)))})),i=this.parent.root.parentElement;i.classList.contains("lexdialog")&&(n.root.style.zIndex=+getComputedStyle(i).zIndex+1)}).bind(this),{title:"View",icon:"GripHorizontal"}),this.rightPanel.addButton(null,"",s.bind(this,-1),{title:"Previous Page",icon:"ChevronsLeft",className:"ml-auto"}),this.rightPanel.addButton(null,"",s.bind(this,1),{title:"Next Page",icon:"ChevronsRight"});const n="Page "+this.contentPage+" / "+(1+((this.currentData.length-1)/S.MAX_PAGE_ELEMENTS|0));this.rightPanel.addText(null,n,null,{inputClass:"nobg",disabled:!0,signal:"@on_page_change",maxWidth:"16ch"}),this.rightPanel.endLine(),this.skipBrowser||(this.rightPanel.sameLine(),this.rightPanel.addComboButtons(null,[{value:"Left",icon:"ArrowLeft",callback:e=>{this.prevData.length&&(this.nextData.push(this.currentData),this.currentData=this.prevData.pop(),this._refreshContent(),this._updatePath(this.currentData))}},{value:"Right",icon:"ArrowRight",callback:e=>{this.nextData.length&&(this.prevData.push(this.currentData),this.currentData=this.nextData.pop(),this._refreshContent(),this._updatePath(this.currentData))}},{value:"Refresh",icon:"Refresh",callback:e=>{this._refreshContent()}}],{noSelection:!0}),this.rightPanel.addText(null,this.path.join("/"),null,{inputClass:"nobg",disabled:!0,signal:"@on_folder_change",style:{fontWeight:"600",fontSize:"15px"}}),this.rightPanel.endLine()),this.content=document.createElement("ul"),this.content.className="lexassetscontent",this.rightPanel.root.appendChild(this.content),this.content.addEventListener("dragenter",(function(e){e.preventDefault(),this.classList.add("dragging")})),this.content.addEventListener("dragleave",(function(e){e.preventDefault(),this.classList.remove("dragging")})),this.content.addEventListener("drop",(e=>{e.preventDefault(),this._processDrop(e)})),this.content.addEventListener("click",(function(){this.querySelectorAll(".lexassetitem").forEach((e=>e.classList.remove("selected")))})),this._refreshContent()}_refreshContent(t,s){const n=this.layout==S.LAYOUT_CONTENT;this.filter=s??this.filter??"None",this.searchValue=t??this.searchValue??"",this.content.innerHTML="",this.content.className=n?"lexassetscontent":"lexassetscontent list";let i=this;const o=function(t){const s=t.type.charAt(0).toUpperCase()+t.type.slice(1),o=e.getExtension(t.id),l="Folder"===s;let a=document.createElement("li");if(a.className="lexassetitem "+t.type.toLowerCase(),a.tabIndex=-1,i.content.appendChild(a),i.useNativeTitle)a.title=s+": "+t.id;else{let e=document.createElement("span");e.className="lexitemdesc",e.innerHTML="File: "+t.id+"<br>Type: "+s,i.content.appendChild(e),a.addEventListener("mousemove",(t=>{if(!n)return;const s=a.getBoundingClientRect(),i=t.target.getBoundingClientRect(),o=e.parentElement.getBoundingClientRect();let l=i.x-o.x-(i.x-s.x),r=i.y-o.y-(i.y-s.y);t.target.classList.contains("lexassettitle")&&(r+=i.y-s.y),e.style.left=l+t.offsetX+12+"px",e.style.top=r+t.offsetY+"px"})),a.addEventListener("mouseenter",(()=>{n&&(e.style.display="unset")})),a.addEventListener("mouseleave",(()=>{n&&setTimeout((()=>{e.style.display="none"}),100)}))}if(i.allowMultipleSelection){let e=document.createElement("input");e.type="checkbox",e.className="lexcheckbox",e.checked=t.selected,e.addEventListener("change",((e,s)=>{if(t.selected=!t.selected,i.onevent){const s=new T(T.ASSET_CHECKED,e.shiftKey?[t]:t);s.multiple=!!e.shiftKey,i.onevent(s)}e.stopPropagation(),e.stopImmediatePropagation()})),a.appendChild(e)}let r=document.createElement("span");if(r.className="lexassettitle",r.innerText=t.id,a.appendChild(r),!i.skipPreview){let s=null;if(t.src&&(["png","jpg"].indexOf(e.getExtension(t.src))>-1||t.src.includes("data:image/"))||l||!n){s=document.createElement("img");let e=t.unknown_extension?i.rootPath+"images/file.png":l?i.rootPath+"images/folder.png":t.src;s.src=n||l?e:i.rootPath+"images/file.png",a.appendChild(s)}else{s=document.createElement("svg"),s.className="asset-file-preview",a.appendChild(s);let e=document.createElement("text");s.appendChild(e),e.innerText=o&&o!=t.id?"."+o.toUpperCase():t.type.toUpperCase();var c=2.5/e.innerText.length;if(c<1){var d=64*c;e.style.fontSize=d+"px",s.style.paddingTop="calc(50% - "+(.5*e.offsetHeight+10)+"px)"}}}if(!l){let e=document.createElement("span");e.className="lexassetinfo",e.innerText=s,a.appendChild(e)}return a.addEventListener("click",(function(s){s.stopImmediatePropagation(),s.stopPropagation();const n=s.detail==e.MOUSE_DOUBLE_CLICK;if(n){if(l)return void i._enterFolder(t)}else s.shiftKey||i.content.querySelectorAll(".lexassetitem").forEach((e=>e.classList.remove("selected"))),this.classList.add("selected"),i.selectedItem=t,i.skipPreview||i._previewAsset(t);if(i.onevent){const e=new T(n?T.ASSET_DBLCLICKED:T.ASSET_SELECTED,s.shiftKey?[t]:t);e.multiple=!!s.shiftKey,i.onevent(e)}})),i.contextMenu&&a.addEventListener("contextmenu",(function(s){s.preventDefault();const n=i.content.querySelectorAll(".selected").length;e.addContextMenu(n>1?n+" selected":l?t.id:t.type,s,(e=>{n<=1&&e.add("Rename"),l||e.add("Clone",i._cloneItem.bind(i,t)),n<=1&&e.add("Properties"),e.add(""),e.add("Delete",i._deleteItem.bind(i,t))}))})),a.addEventListener("dragstart",(function(e){e.preventDefault()}),!1),a},l=new FileReader,a=this.currentData.filter((e=>("None"==this.filter||e.type.toLowerCase()==this.filter.toLowerCase())&&e.id.toLowerCase().includes(this.searchValue.toLowerCase())));(s||t)&&(this.contentPage=1);const r=(this.contentPage-1)*S.MAX_PAGE_ELEMENTS,c=Math.min(r+S.MAX_PAGE_ELEMENTS,a.length);for(let n=r;n<c;++n){let i=a[n];i.path?e.request({url:i.path,dataType:"blob",success:e=>{i.bytesize=e.size,l.readAsDataURL(e),l.onload=e=>{i.src=e.currentTarget.result,i._path=i.path,delete i.path,this._refreshContent(t,s)}}}):i.domEl=o(i)}this.allowNextPage=a.length-1>S.MAX_PAGE_ELEMENTS;const d="Page "+this.contentPage+" / "+(1+((a.length-1)/S.MAX_PAGE_ELEMENTS|0));e.emit("@on_page_change",d),this.onRefreshContent&&this.onRefreshContent(t,s)}_previewAsset(t){const s=t.src&&t.src.includes("data:image/");if(this.previewPanel.clear(),this.previewPanel.branch("Asset"),"image"==t.type||t.src){(["png","jpg"].indexOf(e.getExtension(t.src))>-1||s)&&this.previewPanel.addImage(null,t.src,{style:{width:"100%"}})}const n={disabled:!0};this.previewPanel.addText("Filename",t.id,null,n),t.lastModified&&this.previewPanel.addText("Last Modified",new Date(t.lastModified).toLocaleString(),null,n),(t._path||t.src)&&this.previewPanel.addText("URL",t._path?t._path:t.src,null,n),this.previewPanel.addText("Path",this.path.join("/"),null,n),this.previewPanel.addText("Type",t.type,null,n),t.bytesize&&this.previewPanel.addText("Size",(t.bytesize/1024).toPrecision(3)+" KBs",null,n),"folder"==t.type&&this.previewPanel.addText("Files",t.children?t.children.length.toString():"0",null,n),this.previewPanel.addSeparator();const i=[...this.previewActions];i.length||i.push({name:"Download",callback:()=>e.downloadURL(t.src,t.id)});for(let e of i)e.type&&e.type!==t.type||e.path&&e.path!==this.path.join("/")||this.previewPanel.addButton(null,e.name,e.callback.bind(this,t));this.previewPanel.merge()}_processDrop(e){const t=new FileReader,s=e.dataTransfer.files.length;for(let n=0;n<e.dataTransfer.files.length;++n){const i=e.dataTransfer.files[n],o=this.currentData.find((e=>e.id===i.name));o||(t.readAsDataURL(i),t.onload=e=>{let t=i.name.substr(i.name.lastIndexOf(".")+1).toLowerCase(),o={id:i.name,src:e.currentTarget.result,extension:t,lastModified:i.lastModified};switch(t){case"png":case"jpg":o.type="image";break;case"js":case"css":o.type="script";break;case"json":o.type="json";break;case"obj":o.type="mesh";break;default:o.type=t,o.unknown_extension=!0}this.currentData.push(o),n==s-1&&(this._refreshContent(),this.skipBrowser||this.tree.refresh())})}}_sortData(e,t=!1){e=e??this._lastSortBy??"id",this.currentData=this.currentData.sort(((s,n)=>{var i=t?n[e].localeCompare(s[e]):s[e].localeCompare(n[e]);return 0==i&&(i=t?n.id.localeCompare(s.id):s.id.localeCompare(n.id)),i})),this._lastSortBy=e,this._refreshContent()}_enterFolder(e){if(this.prevData.push(this.currentData),this.currentData=e.children,this.contentPage=1,this._refreshContent(),this._updatePath(this.currentData),this.onevent){const t=new T(T.ENTER_FOLDER,e);this.onevent(t)}}_deleteItem(e){const t=this.currentData.indexOf(e);if(t<0)console.error("[AssetView Error] Cannot delete. Item not found.");else{if(this.currentData.splice(t,1),this._refreshContent(this.searchValue,this.filter),this.onevent){const t=new T(T.ASSET_DELETED,e);this.onevent(t)}this.tree.refresh(),this._processData(this.data)}}_cloneItem(t){const s=this.currentData.indexOf(t);if(s<0)return;delete t.domEl,delete t.folder;const n=e.deepCopy(t);if(this.currentData.splice(s,0,n),this._refreshContent(this.searchValue,this.filter),this.onevent){const e=new T(T.ASSET_CLONED,t);this.onevent(e)}this._processData(this.data)}}e.AssetView=S;export{b as ADD_CUSTOM_WIDGET,C as Area,S as AssetView,T as AssetViewEvent,k as Branch,e as LX,M as Menubar,w as Panel,_ as Sidebar,y as Widget};
|