/**
*/
function clipboard(value) {
try {
navigator.clipboard.writeText(value);
} catch(ex) {
console.log("Clipboard failed: " + ex);
}
}
/**
*/
function isValid(value) {
return (typeof value !== "undefined" && value != null && value != "");
}
/**
*/
function nullCheck(value) {
return (isValid(value) ? value : "");
}
/**
*/
function codify(value) {
return value.toLowerCase().replace("'", "").replace(/[^a-z0-9]/g, " ").replace(/ +/g, "-").trim();
}
/**
*/
function simplify(value) {
return value.trim().toLowerCase().replace(/[^a-z0-9]/g, " ").replace(/ +/g, " ");
}
/**
*/
function focus(id) {
element(id).focus();
element(id).select();
}
/**
*/
function clone(object) {
return Object.assign({}, object);
}
/**
*/
function element(id) {
return getElement(id);
}
/**
*/
function getElement(id) {
var result = null;
var idType = Object.prototype.toString.call(id);
if( idType.toLowerCase().indexOf("string") > -1) {
result = document.getElementById(id);
} else {
result = id;
}
return result;
}
/**
*/
function hasClass(id, thisClass) {
var item = getElement(id);
if( item != null ) {
var regex = new RegExp("(^| )" + escapeRegExp(thisClass) + "( |$)", "g");
if( item.className.match(regex) != null ) return true;
}
return false;
}
/**
*/
function addClass(id, thisClass) {
var item = getElement(id);
if( item != null && !hasClass(id, thisClass)) {
item.className = (item.className + " " + thisClass).trim();
return 1;
}
return 0;
}
/**
*/
function removeClass(id, thisClass) {
var item = getElement(id);
if( item != null && hasClass(id, thisClass) ) {
var regex = new RegExp("(^| )" + escapeRegExp(thisClass) + "( |$)", "g");
item.className = item.className.replace(regex, " ").trim();
return 1;
}
return 0;
}
/**
*/
function toggleClass(id, thisClass) {
var item = getElement(id);
if( item != null ) {
if( hasClass(id, thisClass) ) {
removeClass(id, thisClass);
return 1;
} else {
addClass(id, thisClass);
return 1;
}
}
return 0;
}
/**
*/
function toggleClasses(id, class1, class2) {
var item = getElement(id);
if( item != null ) {
var regex1 = new RegExp("(^| )" + escapeRegExp(class1) + "( |$)", "g");
var regex2 = new RegExp("(^| )" + escapeRegExp(class2) + "( |$)", "g");
var has1 = item.className.match(regex1) != null;
var has2 = item.className.match(regex2) != null;
if( has1 && has2 ) {
removeClass(id, class2);
} else if( has1 ) {
removeClass(id, class1);
addClass(id, class2);
} else if( has2 ) {
removeClass(id, class2);
addClass(id, class1);
} else {
addClass(id, class1);
}
}
}
/**
*/
function isOnScreen(id) {
var bounds = getElement(id).getBoundingClientRect();
var viewHeight = Math.max(document.documentElement.clientHeight, window.innerHeight);
return !(bounds.bottom < 0 || bounds.top-viewHeight >= 0);
}
/**
*/
function isVisibleOnScreen(id) {
var item = getElement(id);
if( !isOnScreen(item) ) return false;
var itemRect = item.getBoundingClientRect();
var parent = item.parentNode;
do {
try {
prentRect = parent.getBoundingClientRect();
if( itemRect.bottom < prentRect.top || itemRect.top > prentRect.bottom ) return false;
} catch(err) {
// Ignore
}
parent = parent.parentNode;
if( parent == null ) return true;
} while ( true );
}
/**
*/
function scrollToElement(id) {
scrollToElement(id, "");
}
/**
*/
function scrollToElement(id, valign) {
var item = getElement(id);
if( item != null ) {
valign = nullCheck(valign).trim().toLowerCase();
if( valign === "top" || valign === "start" ) valign = "start";
else if( valign === "bottom" || valign === "end" ) valign = "end";
else valign = "center";
item.scrollIntoView({behavior:"smooth",block:valign,inline:"center"});
}
}
/**
*/
async function collapse(id) {
/*
// need to cater for instand resizing when invisible, ie setting transition durations to zero
addClass(id, 'collapsible-content');
var item = getElement(id);
if( !item.style.height && item.clientHeight > 0 ) {
item.style.height = item.clientHeight + 'px';
item.setAttribute('tempHeight', true);
}
if( hasClass(id, "collapsed-content") ) {
await sleep(0);
addClass(id, 'collapsing-content');
await sleep(150);
addClass(id, 'collapsed-content');
// removeClass(id, 'collapsing-content');
}
*/
addClass(id, "collapsed-content");
}
/**
*/
async function expand(id) {
/*
addClass(id, 'collapsible-content');
var item = getElement(id);
if( !item.style.height && item.clientHeight > 0 ) {
item.style.height = item.clientHeight + 'px';
item.setAttribute('tempHeight', true);
}
if( hasClass(id, "collapsed-content") ) {
// addClass(id, 'collapsing-content');
removeClass(id, 'collapsed-content');
removeClass(id, 'collapsing-content');
await sleep(150);
}
if( item.getAttribute('tempHeight') ) {
item.removeAttribute('tempHeight');
item.style.height = null;
}
*/
removeClass(id, "collapsed-content");
}
/**
*/
function toggleCollapsed(id) {
var item = getElement(id);
if( hasClass(id, "collapsed-content") ) {
expand(id);
} else {
collapse(id);
}
}
/**
*/
function toggleBooleanInput(id) {
var item = getElement(id);
var wasOn = ("true" === item.value);
if( wasOn ) {
item.value = "false";
removeClass(item.id + "-icon", "icon-ui-toggle-on");
addClass(item.id + "-icon", "icon-ui-toggle-off");
} else {
item.value = "true";
removeClass(item.id + "-icon", "icon-ui-toggle-off");
addClass(item.id + "-icon", "icon-ui-toggle-on");
}
if( typeof item.onchange === "function" ) item.onchange();
}
/**
*/
function escapeJsonString(value) {
return value.replace(/\\n/g, "\\n")
.replace(/\\'/g, "\\'")
.replace(/\\"/g, '\\"')
.replace(/\\&/g, "\\&")
.replace(/\\r/g, "\\r")
.replace(/\\t/g, "\\t")
.replace(/\\b/g, "\\b")
.replace(/\\f/g, "\\f");
}
/**
*/
function escapeRegExp(value) {
return value.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\$&');
}
/**
* Determine number from string
*/
function getNumber(value) {
result = 0;
if( typeof value === 'string' || value instanceof String ) value = value.replace(/[^\-0-9\.]/g, '');
if( value != null && value != '' && !isNaN(value) ) result = parseFloat(value)
return result;
}
/**
* Round to the closest whole number
*/
function roundNumber(value) {
return roundNumber(value, 0);
}
/**
* Round to the specified value to given number of decimal places
*/
function roundNumber(value, decimalPlaces) {
if( isNaN(value) ) value = getNumber(value);
if( isNaN(decimalPlaces) ) decimalPlaces = getNumber(decimalPlaces);
if( decimalPlaces < 0 ) decimalPlaces = 0;
var factor = Math.pow(10,decimalPlaces);
result = Math.round(value*factor)/factor;
return result;
}
/**
* Returns value as a string rounded to specified number of decimal places
*/
function setDecimalPlaces(value, decimalPlaces) {
if( isNaN(decimalPlaces) ) decimalPlaces = getNumber(decimalPlaces);
result = "" + roundNumber(value, decimalPlaces);
var decimalIndex = result.indexOf(".");
if( decimalPlaces > 0 ) {
if( decimalIndex == -1 ) {
result += ".";
decimalIndex = result.indexOf(".");
}
while( (result.length-decimalIndex-1) < decimalPlaces ) {
result += "0";
decimalIndex = result.indexOf(".");
}
}
return result;
}
/**
* Generate a repeatable psuedo random number
*/
var pseudoRandomSeed = new Date().getTime();
function setPseudoRandomSeed(value) { pseudoRandomSeed = getNumber(value); }
function nextPseudoRandomDigit() { return Math.floor(nextPseudoRandom()*10); }
function nextPseudoRandom() {
var result = Math.sin(pseudoRandomSeed++)*10000;
return result - Math.floor(result);
}
/**
* Toggle the visibility of an element
*/
function toggleVisibility(elementId) {
var thisElement = element(elementId);
setVisibility(elementId, (thisElement.style.display == 'none' ? true : false) )
}
/**
* Set the visibility of an element
*/
function setVisibility(elementId, isVisible) {
var thisElement = element(elementId);
thisElement.style.display = (isVisible ? '' : 'none');
}
/**
* Set the visibility of all matching elements
*/
function setVisibilityForAll(elementIdRegex, isVisible) {
var theseElements = document.getElementsByTagName('*');
for( var i=0; i < theseElements.length; i++ ) {
if( theseElements[i].id.match(elementIdRegex) ) setVisibility(theseElements[i].id, isVisible);
}
}
/**
*
*/
function eyedropper(elementId) {
if( !window.EyeDropper ) {
console.log("Eyedropper not supported");
} else {
var eyeDropper = new EyeDropper();
eyeDropper.open().then((pickedColor) => {
var result = pickedColor.sRGBHex.toLowerCase();
if( "clipboard" === elementId ) {
clipboard(result);
} else {
var thisElement = element(elementId);
if( thisElement != null ) {
thisElement.value = result;
try {
thisElement.onchange();
} catch(ex) {
// Ignore
}
} else {
showModalContent("
");
}
}
}).catch((ex) => {
console.log("Error: " + ex);
});
}
}
/**
* Try to determine if a hex color has a corresponding named color
*/
function getHexColor(rgbaColor) {
var regex = /[\d\\.]+/g ;
var values = [...rgbaColor.matchAll(regex)];
var colorChannelR = (values.length > 0 ? ("0" + parseInt(values[0][0]).toString(16)).slice(-2) : "00");
var colorChannelG = (values.length > 1 ? ("0" + parseInt(values[1][0]).toString(16)).slice(-2) : "00");
var colorChannelB = (values.length > 2 ? ("0" + parseInt(values[2][0]).toString(16)).slice(-2) : "00");
var colorChannelA = (values.length > 3 ? ("0" + parseInt(Math.round(parseFloat(values[3][0]) * 255)).toString(16)).slice(-2) : "");
return "#" + colorChannelR + colorChannelG + colorChannelB + colorChannelA;
}
/**
* Try to determine if a hex color has a corresponding named color
*/
function getColorName(hexColor) {
if( isValid(hexColor) ) {;
switch( hexColor) {
case "#f3b6b6": return "light-light-red"; break;
case "#ffdbb6": return "light-light-orange"; break;
case "#ffedb6": return "light-light-yellow"; break;
case "#dbe7bc": return "light-light-lime"; break;
case "#c2dbc2": return "light-light-green"; break;
case "#bce1d5": return "light-light-aqua"; break;
case "#b6e7e7": return "light-light-cyan"; break;
case "#b6dbe7": return "light-light-azure"; break;
case "#b6cfe7": return "light-light-blue"; break;
case "#c2c2e7": return "light-light-indigo"; break;
case "#cfb6e7": return "light-light-purple"; break;
case "#e7b6db": return "light-light-fuchsia"; break;
case "#e87575": return "light-red"; break;
case "#ffba75": return "light-orange"; break;
case "#ffdd75": return "light-yellow"; break;
case "#bad180": return "light-lime"; break;
case "#8cba8c": return "light-green"; break;
case "#80c6af": return "light-aqua"; break;
case "#75d1d1": return "light-cyan"; break;
case "#75bad1": return "light-azure"; break;
case "#75a3d1": return "light-blue"; break;
case "#8c8cd1": return "light-indigo"; break;
case "#a375d1": return "light-purple"; break;
case "#d175ba": return "light-fuchsia"; break;
case "#dd3333": return "red"; break;
case "#ff9933": return "orange"; break;
case "#ffcc33": return "yellow"; break;
case "#99bb44": return "lime"; break;
case "#559955": return "green"; break;
case "#44aa88": return "aqua"; break;
case "#33bbbb": return "cyan"; break;
case "#3399bb": return "azure"; break;
case "#3377bb": return "blue"; break;
case "#5555bb": return "indigo"; break;
case "#7733bb": return "purple"; break;
case "#bb3399": return "fuchsia"; break;
case "#8d2020": return "dark-red"; break;
case "#a36120": return "dark-orange"; break;
case "#a38220": return "dark-yellow"; break;
case "#61772b": return "dark-lime"; break;
case "#366136": return "dark-green"; break;
case "#2b6c57": return "dark-aqua"; break;
case "#207777": return "dark-cyan"; break;
case "#206177": return "dark-azure"; break;
case "#204c77": return "dark-blue"; break;
case "#363677": return "dark-indigo"; break;
case "#4c2077": return "dark-purple"; break;
case "#772061": return "dark-fuchsia"; break;
case "#461010": return "dark-dark-red"; break;
case "#513010": return "dark-dark-orange"; break;
case "#514110": return "dark-dark-yellow"; break;
case "#303b15": return "dark-dark-lime"; break;
case "#1b301b": return "dark-dark-green"; break;
case "#15362b": return "dark-dark-aqua"; break;
case "#103b3b": return "dark-dark-cyan"; break;
case "#10303b": return "dark-dark-azure"; break;
case "#10263b": return "dark-dark-blue"; break;
case "#1b1b3b": return "dark-dark-indigo"; break;
case "#26103b": return "dark-dark-purple"; break;
case "#3b1030": return "dark-dark-fuchsia"; break;
case "#ffdba4": return "light-light-brand"; break;
case "#ffba52": return "light-brand"; break;
case "#ff9900": return "brand"; break;
case "#a36100": return "dark-brand"; break;
case "#513000": return "dark-dark-brand"; break;
case "#ffffff": return "white"; break;
case "#e5e5e5": return "light-light-gray"; break;
case "#cccccc": return "light-gray"; break;
case "#999999": return "gray"; break;
case "#444444": return "dark-gray"; break;
case "#222222": return "dark-dark-gray"; break;
case "#000000": return "black"; break;
case "#ff6600": return "accent"; break;
case "#f54834": return "pc-0"; break;
case "#f96438": return "pc-10"; break;
case "#fe823d": return "pc-20"; break;
case "#ff9f44": return "pc-30"; break;
case "#ffb14a": return "pc-40"; break;
case "#ffc450": return "pc-50"; break;
case "#efcc48": return "pc-60"; break;
case "#ddd04a": return "pc-70"; break;
case "#c2d548": return "pc-80"; break;
case "#add647": return "pc-90"; break;
case "#91d944": return "pc-100"; break;
}
}
return null;
}
/**
* Determine the brightness of a color, and return the contrasting text color
*/
function getTextColor(hexColor) {
if( isValid(hexColor) ) {
var parsedColor = hexColor.toLowerCase().replaceAll(/[^0-9a-f]/g, '');
var parsedLength = parsedColor.length;
// Convert to #RRGGBB if #RGB or #RGBA
if( parsedLength == 3 || parsedLength == 4 ) {
parsedColor = parsedColor.substring(0,1) + parsedColor.substring(0,1) + parsedColor.substring(1,2) + parsedColor.substring(1,2) + parsedColor.substring(2,3) + parsedColor.substring(2,3);
}
// Trim to 6 chars, eg #RRGGBBAA
parsedColor = parsedColor.substring(0,6);
// Average value
var combinedValue = (parseInt(parsedColor.substring(0,2), 16) + parseInt(parsedColor.substring(2,4), 16) + parseInt(parsedColor.substring(4,6), 16))/3;
if( combinedValue < parseInt("99", 16) ) return "#e5e5e5";
}
return "#444444";
}
/**
* Checks if this is a single click, will only return true once every 500 millis
* or more. A purpose for this function is to make sure that html forms are
* only called once within the time period which can be done by by placing
* onSubmit="return isSingleClick()" in the form tag.
*/
var hasBeenCalled = false;
function isSingleClick() {
if( hasBeenCalled ) return false;
hasBeenCalled = true;
setTimeout("hasBeenCalled = false;", 500);
return true;
}
/**
* Checks if the showExitAlert flag has been set, and shows a warning to the
* user if so in order to advise them theat they may have unsaved work on the
* page. This will provide the option for remaining onthe page.
*/
var showExitAlert = false;
window.onbeforeunload = confirmExit;
function confirmExit() {
if( showExitAlert ) return "You may have unsaved activity on this page.";
}
/**
* Get Window Width
*/
function getWindowWidth() {
return window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth || 0;
}
/**
* Get Window Height
*/
function getWindowHeight() {
return window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight || 0;
}
/**
* Get Document Width
*/
function getDocumentWidth() {
var bd = document.body;
var ht = document.documentElement;
return Math.max(
bd.scrollWidth,
bd.offsetWidth,
ht.clientWidth,
ht.scrollWidth,
ht.offsetWidth
);
}
/**
* Get Document Height
*/
function getDocumentHeight() {
var bd = document.body;
var ht = document.documentElement;
return Math.max(
bd.scrollHeight,
bd.offsetHeight,
ht.clientHeight,
ht.scrollHeight,
ht.offsetHeight
);
}
/**
* Get viewport X offset
*/
function getViewportXOffset(){
if( typeof window.pageXOffset != 'undefined' ) {
return window.pageXOffset;
} else {
return (document.documentElement.clientWidth ? document.documentElement.scrollLeft : document.body.scrollLeft);
}
}
/**
* Get viewport Y offset
*/
function getViewportYOffset() {
if( typeof window.pageYOffset != 'undefined' ) {
return window.pageYOffset;
} else {
return (document.documentElement.clientHeight ? document.documentElement.scrollTop : document.body.scrollTop);
}
}
/**
* Send http GET request
*/
function sendHttpGetRequest(url) {
var thisXMLHttpRequest = getXmlHttpObject();
if( thisXMLHttpRequest != null ) {
thisXMLHttpRequest.open("GET", url, true);
thisXMLHttpRequest.send();
}
}
/**
* Send http POST request
*/
function sendHttpPostRequest(url, postData) {
var thisXMLHttpRequest = getXmlHttpObject();
if( thisXMLHttpRequest != null ) {
thisXMLHttpRequest.open("POST", url, true);
thisXMLHttpRequest.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
thisXMLHttpRequest.send(postData);
}
}
/**
* Retrieve http GET request
*/
async function retrieveHttpGetRequest(url) {
let response = await fetch(url);
let data = await response.text();
return data;
}
/**
* Get xml http object
*/
function getXmlHttpObject(handler) {
var thisXMLHttpRequest = null;
if( window.XMLHttpRequest ) thisXMLHttpRequest = new XMLHttpRequest();
else if( window.ActiveXObject ) thisXMLHttpRequest = new ActiveXObject("Microsoft.XMLHTTP");
return thisXMLHttpRequest;
}
/**
* Get url parameter value
*/
function getRequestParameter(parameter) {
parameter = parameter.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
var regexS = "[\\?&]" + parameter + "=([^]*)";
var regex = new RegExp(regexS);
var results = regex.exec(window.location.search);
if( results == null ) {
return null;
} else {
return decodeURIComponent(results[1].replace(/\+/g, " "));
}
}
/**
* Decode common html entities
*/
function htmlEncode(value) {
return ('' + value).replace(//g, '>').replace(/"/g, '"');
}
/**
* Make a field enabled, ensure it has no onclick function then focus it
*/
function enableField(id) {
var item = getElement(id);
if( item.readOnly ) {
item.onclick = null;
item.readOnly = false;
item.focus();
item.select();
return true;
} else {
return false;
}
}
/**
* Sleep for given milliseconds, use with await sleep(millis) inside an async function
*/
function sleep(millis) {
return new Promise(resolve => setTimeout(resolve, millis));
}
/**
* Wait for given milliseconds, processor intensive...
*/
function wait(millis) {
var inDate = new Date();
var then = inDate.getTime();
var now = inDate.getTime();
do {
var outDate = new Date();
var now = outDate.getTime();
} while( now < (then+millis) );
return;
}
/**
*
*/
function now() {
return new Date().getTime();
}
/**
*
*/
var clickStatedAt = -1;
function startClick() {
clickStartedAt = now();
}
/**
*
*/
function isLongClick() {
return clickStartedAt > 0 && (now() - clickStartedAt) > 500;
}
/* SORTABLE TABLES */
var sortableTables = new Array();
var sortableMonths = new Array("jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec");
/**
*/
function sortableInit() {
if( !document.getElementsByTagName ) return;
sortableCheckTables = document.getElementsByTagName("table");
for( var i=0; i < sortableCheckTables.length; i++ ) {
if( sortableCheckTables[i].className.indexOf("sortable") != -1 ) sortablePrepareTable(sortableCheckTables[i]);
}
}
/**
*/
function sortablePrepareTable(sortableTable) {
if( sortableTable == null || sortableTable.id == null || sortableTable.id == "" ) {
console.log("Sortable tables require 'id' attribute to be set");
return;
}
if( sortableTable.rows == null || sortableTable.rows.length < 1 ) return;
if( sortableTable.rows[0].cells == null || sortableTable.rows[0].cells.length < 1 ) return;
sortableTables[sortableTables.length] = new Array();
sortableTables[sortableTables.length-1][0] = sortableTable.id;
sortableTables[sortableTables.length-1][1] = new Array();
sortableTables[sortableTables.length-1][2] = -1; // Last sort column
// Check for default sort
var sortBy = sortableTextValue(getRequestParameter("sortBy"));
var sortByReverse = false;
if( sortBy.indexOf("-") == 0 ) {
sortByReverse = true;
sortBy = sortBy.substring(1);
}
var sortByIndex = null;
// Assume first row is header, modify with options
for( var i=0; i < sortableTable.rows[0].cells.length; i++ ) {
if( sortBy != null && sortBy != "" && sortBy == sortableCellValue(sortableTable.rows[0].cells[i]) ) sortByIndex = i;
sortableTable.rows[0].cells[i].innerHTML = "" + sortableTable.rows[0].cells[i].innerHTML + "";
}
// Iterate and record parsed cell values in an array
for( var i=1; i < sortableTable.rows.length; i++ ) {
sortableTables[sortableTables.length-1][1][i-1] = new Array();
var sortableTableRow = document.createElement('tr');
sortableTableRow.className = sortableTable.rows[i].className;
for( var j=0; j < sortableTable.rows[i].cells.length; j++ ) {
sortableTables[sortableTables.length-1][1][i-1][j] = sortableCellValue(sortableTable.rows[i].cells[j]);
var sortableTableRowCell = sortableTableRow.insertCell(-1);
sortableTableRowCell.innerHTML = sortableTable.rows[i].cells[j].innerHTML;
}
// Store the whole row
sortableTables[sortableTables.length-1][1][i-1][sortableTable.rows[i].cells.length] = sortableTableRow;
}
// Check for a default sort
if( sortByIndex == null && sortableTable.className.indexOf("sortOnLoad") != -1 ) sortByIndex = 0;
if( sortByIndex != null ) sortableAction(sortableTable.id, sortByIndex, sortByReverse);
}
/**
*/
function sortableCellValue(sortableCell) {
// Determine sortable value
var sortableValue = sortableCell.innerHTML.toLowerCase().replace(/^\s+/g, '').replace(/\s+$/g, '').replace(/<[^>]*>/g, '').replace(/\s+/g, ' ');
return sortableTextValue(sortableValue);
}
/**
*/
function sortableTextValue(sortableValue) {
if( sortableValue == null ) return "";
// Check for date formats and convert to chronological number
// Standard dates will match before imperial dates
if( sortableValue.match(/^([0123]\d)[\-\/]([01]?\d)[\-\/](\d\d\d\d)$/) ) {
// dd-mm-yyyy
sortableValue = "date-" + sortableConvertMonths(sortableValue).replace(/([0123]\d)[\-\/]([01]?\d)[\-\/](\d\d\d\d)/, "$3/$2/$1");
} else if( sortableValue.match(/^([01]?\d)[\-\/]([0123]+\d)[\-\/](\d\d\d\d)$/) ) {
// mm-dd-yyyy
sortableValue = "date-" + sortableConvertMonths(sortableValue).replace(/([01]?\d)[\-\/]([0123]+\d)[\-\/](\d\d\d\d)/, "$3/$1/$2");
} else if( sortableValue.match(/^([0123]\d)[\-\/]([a-z][a-z][a-z]+)[\-\/](\d\d\d\d)$/) ) {
// dd-MMM-yyyy
sortableValue = "date-" + sortableConvertMonths(sortableValue.replace(/([0123]?\d)[\-\/]([a-z][a-z][a-z]+)[\-\/](\d\d\d\d)/, "$3/$2/$1"));
} else if( sortableValue.match(/^([a-z][a-z][a-z]+)[\-\/]([0123]?\d)[\-\/](\d\d\d\d)$/) ) {
// MMM-dd-yyyy
sortableValue = "date-" + sortableConvertMonths(sortableValue.replace(/([a-z][a-z][a-z]+)[\-\/]([0123]?\d)[\-\/](\d\d\d\d)/, "$3/$1/$2"));
}
// return result
return sortableValue;
}
/**
*/
function sortableAction(sortableTableId, sortableTableColumn, sortableTableColumnReverse) {
for( var i=0; i < sortableTables.length; i++ ) {
if( sortableTables[i][0] = sortableTableId ) {
// Create sortable array with the relevant column and cells
var sortableResults = new Array();
for( var j=0; j < sortableTables[i][1].length; j++ ) {
sortableResults[sortableResults.length] = new Array(sortableTables[i][1][j][sortableTableColumn], sortableTables[i][1][j][sortableTables[i][1][j].length-1]);
}
if( sortableTables[i][2] == sortableTableColumn || sortableTableColumnReverse) {
sortableResults.sort(sortableReverseComparison);
sortableTables[i][2] = -1;
} else {
sortableResults.sort(sortableComparison);
sortableTables[i][2] = sortableTableColumn;
}
// Replace old data
var sortableTable = element(sortableTableId);
if( sortableResults.length == sortableTable.rows.length-1 ) {
for( var k=0; k < sortableResults.length; k++ ) {
for( var l=0; l < sortableTable.rows[k+1].cells.length; l++ ) {
sortableTable.rows[k+1].cells[l].innerHTML = sortableResults[k][1].cells[l].innerHTML;
}
sortableTable.rows[k+1].className = sortableResults[k][1].className;
}
}
}
}
}
/**
*/
function sortableComparison(sortableRow1, sortableRow2) {
var sortableValue1 = sortableRow1[0];
var sortableValue2 = sortableRow2[0];
if( !isNaN(sortableValue1) && !isNaN(sortableValue2) ) {
// Number comparison
return getNumber(sortableValue1)-getNumber(sortableValue2);
} else if( sortableValue1 == sortableValue2 ) {
return 0;
} else {
return (sortableValue1 < sortableValue2 ? -1 : 1);
}
return 0;
}
/**
*/
function sortableReverseComparison(sortableRow1, sortableRow2) {
return sortableComparison(sortableRow1, sortableRow2)*-1;
}
/**
*/
function sortableConvertMonths(sortableValue) {
var sortableYear = getNumber(sortableValue.replace(/(.+)\/(.+)\/(.+)/, "$1"));
var sortableMonth = getNumber(sortableValue.replace(/(.+)\/(.+)\/(.+)/, "$2"));
var sortableDay = getNumber(sortableValue.replace(/(.+)\/(.+)\/(.+)/, "$3"));
if( sortableMonth < 1 ) {
var sortableMonthName = sortableValue.replace(/(.+)\/(.+)\/(.+)/, "$2");
for( var i=0; i < sortableMonths.length; i++ ) {
if( sortableMonthName.indexOf(sortableMonths[i]) != -1 ) {
sortableMonth = i+1;
break;
}
}
}
return "" + (sortableYear < 10 ? "0" : "") + sortableYear + (sortableMonth < 10 ? "0" : "") + sortableMonth + (sortableDay < 10 ? "0" : "") + sortableDay;
}
sortableInit();
/* MENUS */
// Global variables
var menuType;
var menuValue;
var menuWidth = 0;
var menuHeight = 0;
var menuTransparent = false;
/**
*/
function showMenuContent(content, menuDisplayWidth, menuDisplayHeight, menuDisplayTransparent) {
menuType = "content";
menuValue = content;
menuWidth = menuDisplayWidth;
menuHeight = menuDisplayHeight;
menuTransparent = menuDisplayTransparent;
menuShow();
}
/* Core */
/**
*/
function menuShow() {
var menuElement = element("menuElement");
if( menuElement != null ) menuHide();
if( menuType != null ) menuRedraw();
}
/**
*/
function menuRedraw() {
menuHide();
menuDisplay("");
// Add menu background
menuBackground = document.createElement('div');
menuBackground.setAttribute("id", "menuBackground");
menuBackground.style.position = "absolute";
menuBackground.style.top = (mouseCoords.y-44) + "px";
menuBackground.style.left = (mouseCoords.x-32) + "px";
menuBackground.style.zIndex = "1001";
menuBackground.className = "inner-double-buffered container";
menuBackground.style.overflow = "auto";
document.body.appendChild(menuBackground);
// Add menu content
menuElement = document.createElement('div');
menuElement.setAttribute("id", "menuElement");
menuElement.className = (menuTransparent ? "container" : "inner-meni-buffered soft-elevated light-navigation flush-left module");
if( menuWidth != null ) {
if( menuWidth < 1 ) ; // Ignore
else if( getNumber(menuWidth) > 0 ) menuElement.style.width = menuWidth + "px";
else if( menuWidth.match(/^[0-9\.]+%$/) ) menuElement.style.width = menuWidth;
else menuElement.className += " " + menuWidth;
}
if( menuHeight != null ) {
if( menuHeight < 1 ) ; // Ignore
else if( getNumber(menuHeight) > 0 ) menuElement.style.height = menuHeight + "px";
else if( menuHeight.match(/^[0-9\.]+%$/) ) menuElement.style.height = menuHeight;
else menuElement.className += " " + menuHeight;
}
menuElement.style.overflow = "auto";
// Set content
menuElement.innerHTML = (menuType == "url" ? "" : menuValue);
menuBackground.appendChild(menuElement);
menuBackground.addEventListener('mouseleave', (event) => { setTimeout(menuHide, 100); });
menuBackground.addEventListener('click', (event) => { setTimeout(menuHide, 100); });
// External content
if( menuType === "url" && menuValue != null ) {
menuDisplay("loading...
");
try {
xmlHttp = getXmlHttpObject();
if( xmlHttp != null ) {
xmlHttp.onreadystatechange = menuReceive;
xmlHttp.open("GET", menuValue, true);
xmlHttp.send();
}
} catch(ex) {
menuDisplay("" + ex.description + "
");
}
}
// Fit on page
var overhangX = menuBackground.getBoundingClientRect().right - getNumber(document.documentElement.clientWidth);
var overhangY = menuBackground.getBoundingClientRect().bottom - getNumber(document.documentElement.clientHeight);
if( overhangX > 0 ) {
var newX = getNumber(menuBackground.style.left) - overhangX;
if( newX < -40 + window.scrollX ) newX = -40 + window.scrollX; // Cater for invisible border
menuBackground.style.left = newX + "px";
}
if( overhangY > 0 ) {
var newY = getNumber(menuBackground.style.top) - overhangY;
if( newY < -40 + window.scrollY ) newY = -40 + window.scrollY; // Cater for invisible border
menuBackground.style.top = newY + "px";
}
}
/**
*/
function menuReceive() {
if( xmlHttp.readyState == 4 || xmlHttp.readyState == "complete" ) {
try {
menuDisplay(xmlHttp.responseText);
} catch(ex) {
menuDisplay("" + ex.description + "
");
}
}
}
/**
*/
function menuDisplay(value) {
let menuDynamicContainer = element('menuDynamicContainer')
if( menuDynamicContainer ) menuDynamicContainer.innerHTML = value;
}
/**
*/
function menuHide() {
var menuElement = element("menuElement");
if( menuElement != null ) menuElement.parentNode.removeChild(menuElement);
var menuBackground = element("menuBackground");
if( menuBackground != null ) menuBackground.parentNode.removeChild(menuBackground);
}
/* MODALS */
// Global variables
var modalType;
var modalValue;
var modalTargetField;
var modalTargetDisplayField;
var modalWidth = 0;
var modalHeight = 0;
var modalTransparent = false;
// Initiator variables
var modalDate;
var modalOrigDate;
var modalWeekDays = new Array("S", "M", "T", "W", "T", "F", "S");
var modalMonths = new Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");
/**
*/
function tooltip(content) {
showModalContent('' + content.replace('<', '<').replace('>', '>') + '
', 0, 0);
}
/**
*/
function showModalColor(modalField) {
modalType = "color";
modalTargetField = getElement(modalField);
modalWidth = 0;
modalHeight = 0;
modalTransparent = false;
modalShow();
}
/**
*/
function showModalIcon(modalField) {
modalType = "icon";
modalTargetField = getElement(modalField);
modalWidth = 0;
modalHeight = 0;
modalTransparent = false;
modalShow();
}
/**
*/
function showModalAccount(modalField, modalDisplayField) {
modalType = "account";
modalTargetField = getElement(modalField);
modalTargetDisplayField = modalDisplayField;
modalWidth = 0;
modalHeight = 0;
modalTransparent = false;
modalShow();
}
/**
*/
function showModalDay(modalField) {
modalType = "day";
modalTargetField = getElement(modalField);
modalWidth = 0;
modalHeight = 0;
modalTransparent = false;
modalShow();
}
/**
*/
function showModalMonth(modalField) {
modalType = "month";
modalTargetField = getElement(modalField);
modalWidth = 0;
modalHeight = 0;
modalTransparent = false;
modalShow();
}
/**
*/
function showModalYear(modalField) {
modalType = "year";
modalTargetField = getElement(modalField);
modalWidth = 0;
modalHeight = 0;
modalTransparent = false;
modalShow();
}
/**
*/
async function showModalSpinner(delayMillis) {
delayMillis = getNumber(delayMillis);
if( delayMillis > 0 ) await sleep(delayMillis);
showModalContent('', -1, -1, true);
}
/**
*
function showModalSpinner(delayMillis) {
setTimeout(showModalSpinner, delayMillis);
}
/**
*/
function showModalUrl(url, modalDisplayWidth, modalDisplayHeight, modalDisplayTransparent) {
modalType = "url";
modalValue = url;
modalWidth = modalDisplayWidth;
modalHeight = modalDisplayHeight;
modalTransparent = modalDisplayTransparent;
modalShow();
}
/**
*/
function showModalContent(content, modalDisplayWidth, modalDisplayHeight, modalDisplayTransparent) {
modalType = "content";
modalValue = content;
modalWidth = modalDisplayWidth;
modalHeight = modalDisplayHeight;
modalTransparent = modalDisplayTransparent;
modalShow();
}
/* Core */
/**
*/
function modalShow() {
var modalElement = element("modalElement");
if( modalElement != null ) modalHide();
if( modalType != null ) {
if( modalTargetField != null ) {
if( "day" == modalType || "month" == modalType || "year" == modalType ) {
// Pre population
modalDate = null;
// Do we have an old value
var modalDateArray = modalTargetField.value.split(/\//);
if( modalDateArray.length == 1 ) modalDateArray.unshift("Jan");
if( modalDateArray.length == 2 ) modalDateArray.unshift("01");
if( modalDateArray.length == 3 ) modalDate = new Date(Date.parse(modalDateArray[1] + " " + modalDateArray[0] + ", " + modalDateArray[2]));
}
if( modalDate == null || isNaN(modalDate.getTime()) ) modalDate = new Date();
modalOrigDate = new Date(modalDate.getTime());
modalDate.setDate(1);
}
modalRedraw();
}
}
/**
*/
function modalRedraw() {
modalHide();
modalDisplay("");
var includeSearchText = false;
// Add backgroud
modalBackground = document.createElement('div');
modalBackground.setAttribute("id", "modalBackground");
modalBackground.style.position = "fixed";
modalBackground.style.top = "0";
modalBackground.style.left = "0";
modalBackground.style.width = "100%";
modalBackground.style.height = "100%";
modalBackground.style.overflow = "hidden";
modalBackground.style.color = "#e5e5e5";
modalBackground.style.backgroundColor = "#333333dd";
modalBackground.style.zIndex = "1001";
modalBackground.innerHTML = "" + (!modalTransparent ? "
" : "") + "
";
document.body.appendChild(modalBackground);
// Add modal content
modalElement = document.createElement('div');
modalElement.setAttribute("id", "modalElement");
modalElement.className = "position-center " + (modalTransparent ? "container" : "vertical-quadruple-buffered soft-double-elevated module" + (getNumber(modalWidth) < 0 ? " bounds" : ""));
if( modalWidth != null ) {
if( modalWidth < 1 ) ;//Ignore
else if( getNumber(modalWidth) > 0 ) modalElement.style.width = modalWidth + "px";
else if( modalWidth.match(/^[0-9\.]+%$/) ) modalElement.style.width = modalWidth;
else modalElement.className += " " + modalWidth;
}
if( modalHeight != null ) {
if( modalHeight < 1 ) ;//Ignore
else if( getNumber(modalHeight) > 0 ) modalElement.style.height = modalHeight + "px";
else if( modalHeight.match(/^[0-9\.]+%$/) ) modalElement.style.height = modalHeight;
else modalElement.className += " " + modalHeight;
}
modalElement.style.overflow = "auto";
// Set content
if( modalType == "color" ) {
modalValue = "";
modalValue += "
white
";
modalValue += "
" + ("#f3b6b6".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#ffdbb6".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#ffedb6".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#dbe7bc".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#c2dbc2".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#bce1d5".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#b6e7e7".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#b6dbe7".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#b6cfe7".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#c2c2e7".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#cfb6e7".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#e7b6db".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
";
modalValue += "
" + ("#e87575".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#ffba75".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#ffdd75".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#bad180".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#8cba8c".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#80c6af".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#75d1d1".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#75bad1".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#75a3d1".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#8c8cd1".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#a375d1".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#d175ba".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
";
modalValue += "
" + ("#dd3333".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#ff9933".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#ffcc33".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#99bb44".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#559955".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#44aa88".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#33bbbb".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#3399bb".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#3377bb".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#5555bb".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#7733bb".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#bb3399".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
";
modalValue += "
" + ("#8d2020".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#a36120".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#a38220".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#61772b".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#366136".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#2b6c57".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#207777".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#206177".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#204c77".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#363677".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#4c2077".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#772061".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
";
modalValue += "
" + ("#461010".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#513010".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#514110".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#303b15".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#1b301b".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#15362b".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#103b3b".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#10303b".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#10263b".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#1b1b3b".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#26103b".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#3b1030".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
";
modalValue += "
black
";
modalValue += "
brand
";
modalValue += "
accent
";
modalValue += "
" + ("#ffdba4".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#ffba52".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#ff9900".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#a36100".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#513000".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#ffffff".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#e5e5e5".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#cccccc".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#999999".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#444444".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#222222".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#000000".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
";
modalValue += "
" + ("#ff6600".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#f54834".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#f96438".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#fe823d".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#ff9f44".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#ffb14a".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#ffc450".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#efcc48".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#ddd04a".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#c2d548".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#add647".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
" + ("#91d944".toLowerCase() === modalTargetField.value.toLowerCase() ? "" : "") + "
";
modalValue += "
";
modalValue += "
";
modalValue += "
";
includeSearchText = false;
} else if( modalType == "icon" ) {
modalValue = "";
modalValue += "
";
modalValue += "
ai
";
modalValue += "
alert
";
modalValue += "
apps
";
modalValue += "
array
";
modalValue += "
arrow-contract
";
modalValue += "
arrow-down
";
modalValue += "
arrow-down-down
";
modalValue += "
arrow-down-left
";
modalValue += "
arrow-down-right
";
modalValue += "
arrow-down-up
";
modalValue += "
arrow-expand
";
modalValue += "
arrow-inside
";
modalValue += "
arrow-left
";
modalValue += "
arrow-left-left
";
modalValue += "
arrow-left-right
";
modalValue += "
arrow-outside
";
modalValue += "
arrow-redo
";
modalValue += "
arrow-right
";
modalValue += "
arrow-right-left
";
modalValue += "
arrow-right-right
";
modalValue += "
arrow-undo
";
modalValue += "
arrow-up
";
modalValue += "
arrow-up-down
";
modalValue += "
arrow-up-left
";
modalValue += "
arrow-up-right
";
modalValue += "
arrow-up-up
";
modalValue += "
artifacts
";
modalValue += "
asterisk
";
modalValue += "
axis-2d
";
modalValue += "
axis-3d
";
modalValue += "
axolotl
";
modalValue += "
axolotl-head
";
modalValue += "
backspace
";
modalValue += "
bandaid
";
modalValue += "
bank
";
modalValue += "
banned
";
modalValue += "
bar
";
modalValue += "
barcode
";
modalValue += "
battery-0
";
modalValue += "
battery-100
";
modalValue += "
battery-25
";
modalValue += "
battery-50
";
modalValue += "
battery-75
";
modalValue += "
beaker
";
modalValue += "
beaker-full
";
modalValue += "
bell
";
modalValue += "
bell-ringing
";
modalValue += "
bill
";
modalValue += "
bin
";
modalValue += "
bin-full
";
modalValue += "
black-hole
";
modalValue += "
blank
";
modalValue += "
blocked
";
modalValue += "
bone
";
modalValue += "
book
";
modalValue += "
book-open
";
modalValue += "
bookmark
";
modalValue += "
books
";
modalValue += "
box
";
modalValue += "
box-open
";
modalValue += "
briefcase
";
modalValue += "
bug
";
modalValue += "
building
";
modalValue += "
buildings
";
modalValue += "
bullet
";
modalValue += "
calendar
";
modalValue += "
camera
";
modalValue += "
candle
";
modalValue += "
car
";
modalValue += "
cash-card
";
modalValue += "
cat
";
modalValue += "
caution
";
modalValue += "
checklist
";
modalValue += "
chevron-contract
";
modalValue += "
chevron-down
";
modalValue += "
chevron-down-down
";
modalValue += "
chevron-down-left
";
modalValue += "
chevron-down-right
";
modalValue += "
chevron-down-up
";
modalValue += "
chevron-expand
";
modalValue += "
chevron-inside
";
modalValue += "
chevron-left
";
modalValue += "
chevron-left-left
";
modalValue += "
chevron-left-right
";
modalValue += "
chevron-outside
";
modalValue += "
chevron-right
";
modalValue += "
chevron-right-left
";
modalValue += "
chevron-right-right
";
modalValue += "
chevron-top-left
";
modalValue += "
chevron-top-right
";
modalValue += "
chevron-up
";
modalValue += "
chevron-up-down
";
modalValue += "
chevron-up-up
";
modalValue += "
clapper-board
";
modalValue += "
clipboard
";
modalValue += "
clock
";
modalValue += "
cloud
";
modalValue += "
code
";
modalValue += "
cog
";
modalValue += "
cog-30
";
modalValue += "
cogs
";
modalValue += "
command-line
";
modalValue += "
computer
";
modalValue += "
console
";
modalValue += "
control-panel
";
modalValue += "
controller
";
modalValue += "
credit-card
";
modalValue += "
cresent-moon
";
modalValue += "
crop
";
modalValue += "
cross
";
modalValue += "
crown
";
modalValue += "
cube
";
modalValue += "
cube-2x2
";
modalValue += "
cube-3x3
";
modalValue += "
cutlery
";
modalValue += "
cutlery-fork
";
modalValue += "
cutlery-knife
";
modalValue += "
cutlery-spoon
";
modalValue += "
cyclic
";
modalValue += "
dashboard
";
modalValue += "
database
";
modalValue += "
delete
";
modalValue += "
desk
";
modalValue += "
desk-bell
";
modalValue += "
desk-bell-ringing
";
modalValue += "
dice-1
";
modalValue += "
dice-2
";
modalValue += "
dice-3
";
modalValue += "
dice-4
";
modalValue += "
dice-5
";
modalValue += "
dice-6
";
modalValue += "
dinner-plate
";
modalValue += "
dinner-plate-cutlery
";
modalValue += "
disk
";
modalValue += "
divider
";
modalValue += "
document
";
modalValue += "
dog
";
modalValue += "
door-in
";
modalValue += "
door-out
";
modalValue += "
dot
";
modalValue += "
download
";
modalValue += "
dress
";
modalValue += "
droplet
";
modalValue += "
duplicate
";
modalValue += "
earth
";
modalValue += "
edit
";
modalValue += "
ellipsis
";
modalValue += "
email
";
modalValue += "
email-group
";
modalValue += "
emoticon-angry
";
modalValue += "
emoticon-blink
";
modalValue += "
emoticon-curious
";
modalValue += "
emoticon-happy
";
modalValue += "
emoticon-joy
";
modalValue += "
emoticon-laughing
";
modalValue += "
emoticon-meh
";
modalValue += "
emoticon-pokerface
";
modalValue += "
emoticon-quizzical
";
modalValue += "
emoticon-sad
";
modalValue += "
emoticon-shocked
";
modalValue += "
emoticon-wink
";
modalValue += "
error
";
modalValue += "
exit
";
modalValue += "
eye
";
modalValue += "
eyedropper
";
modalValue += "
fence
";
modalValue += "
fence-gate
";
modalValue += "
file
";
modalValue += "
file-compressed
";
modalValue += "
filter
";
modalValue += "
fire
";
modalValue += "
fish
";
modalValue += "
fitness
";
modalValue += "
flag
";
modalValue += "
flag-au
";
modalValue += "
flag-ca
";
modalValue += "
flag-eu
";
modalValue += "
flag-jp
";
modalValue += "
flag-nz
";
modalValue += "
flag-uk
";
modalValue += "
flag-us
";
modalValue += "
flag-us-ca
";
modalValue += "
flowchart
";
modalValue += "
folder
";
modalValue += "
folders
";
modalValue += "
food-burger
";
modalValue += "
food-hotdog
";
modalValue += "
formula-car
";
modalValue += "
gate
";
modalValue += "
gender-female
";
modalValue += "
gender-male
";
modalValue += "
genders
";
modalValue += "
ghost
";
modalValue += "
glasses
";
modalValue += "
globe
";
modalValue += "
graph-area
";
modalValue += "
graph-bar
";
modalValue += "
graph-donut
";
modalValue += "
graph-line
";
modalValue += "
graph-pie
";
modalValue += "
guage
";
modalValue += "
hammer
";
modalValue += "
hand-l-0000-0
";
modalValue += "
hand-l-0000-1
";
modalValue += "
hand-l-0001-0
";
modalValue += "
hand-l-0001-1
";
modalValue += "
hand-l-0010-0
";
modalValue += "
hand-l-0010-1
";
modalValue += "
hand-l-0011-0
";
modalValue += "
hand-l-0011-1
";
modalValue += "
hand-l-0100-0
";
modalValue += "
hand-l-0100-1
";
modalValue += "
hand-l-0101-0
";
modalValue += "
hand-l-0101-1
";
modalValue += "
hand-l-0110-0
";
modalValue += "
hand-l-0110-1
";
modalValue += "
hand-l-0111-0
";
modalValue += "
hand-l-0111-1
";
modalValue += "
hand-l-1-1-1-1-1
";
modalValue += "
hand-l-1-1-1-11
";
modalValue += "
hand-l-1-1-11-1
";
modalValue += "
hand-l-1-1-111
";
modalValue += "
hand-l-1-11-1-1
";
modalValue += "
hand-l-1-11-11
";
modalValue += "
hand-l-1-111-1
";
modalValue += "
hand-l-1-1111
";
modalValue += "
hand-l-1000-0
";
modalValue += "
hand-l-1000-1
";
modalValue += "
hand-l-1001-0
";
modalValue += "
hand-l-1001-1
";
modalValue += "
hand-l-1010-0
";
modalValue += "
hand-l-1010-1
";
modalValue += "
hand-l-1011-0
";
modalValue += "
hand-l-1011-1
";
modalValue += "
hand-l-11-1-1-1
";
modalValue += "
hand-l-11-1-11
";
modalValue += "
hand-l-11-11-1
";
modalValue += "
hand-l-11-111
";
modalValue += "
hand-l-1100-0
";
modalValue += "
hand-l-1100-1
";
modalValue += "
hand-l-1101-0
";
modalValue += "
hand-l-1101-1
";
modalValue += "
hand-l-111-1-1
";
modalValue += "
hand-l-111-11
";
modalValue += "
hand-l-1110-0
";
modalValue += "
hand-l-1110-1
";
modalValue += "
hand-l-1111-0
";
modalValue += "
hand-l-1111-1
";
modalValue += "
hand-l-11111
";
modalValue += "
hand-r-0-0000
";
modalValue += "
hand-r-0-0001
";
modalValue += "
hand-r-0-0010
";
modalValue += "
hand-r-0-0011
";
modalValue += "
hand-r-0-0100
";
modalValue += "
hand-r-0-0101
";
modalValue += "
hand-r-0-0110
";
modalValue += "
hand-r-0-0111
";
modalValue += "
hand-r-0-1000
";
modalValue += "
hand-r-0-1001
";
modalValue += "
hand-r-0-1010
";
modalValue += "
hand-r-0-1011
";
modalValue += "
hand-r-0-1100
";
modalValue += "
hand-r-0-1101
";
modalValue += "
hand-r-0-1110
";
modalValue += "
hand-r-0-1111
";
modalValue += "
hand-r-1-0000
";
modalValue += "
hand-r-1-0001
";
modalValue += "
hand-r-1-0010
";
modalValue += "
hand-r-1-0011
";
modalValue += "
hand-r-1-0100
";
modalValue += "
hand-r-1-0101
";
modalValue += "
hand-r-1-0110
";
modalValue += "
hand-r-1-0111
";
modalValue += "
hand-r-1-1-1-1-1
";
modalValue += "
hand-r-1-1-1-11
";
modalValue += "
hand-r-1-1-11-1
";
modalValue += "
hand-r-1-1-111
";
modalValue += "
hand-r-1-1000
";
modalValue += "
hand-r-1-1001
";
modalValue += "
hand-r-1-1010
";
modalValue += "
hand-r-1-1011
";
modalValue += "
hand-r-1-11-1-1
";
modalValue += "
hand-r-1-11-11
";
modalValue += "
hand-r-1-1100
";
modalValue += "
hand-r-1-1101
";
modalValue += "
hand-r-1-111-1
";
modalValue += "
hand-r-1-1110
";
modalValue += "
hand-r-1-1111
";
modalValue += "
hand-r-11-1-1-1
";
modalValue += "
hand-r-11-1-11
";
modalValue += "
hand-r-11-11-1
";
modalValue += "
hand-r-11-111
";
modalValue += "
hand-r-111-1-1
";
modalValue += "
hand-r-111-11
";
modalValue += "
hand-r-1111-1
";
modalValue += "
hand-r-11111
";
modalValue += "
handbag
";
modalValue += "
handle
";
modalValue += "
hash
";
modalValue += "
headphones
";
modalValue += "
heart
";
modalValue += "
heart-beat
";
modalValue += "
help
";
modalValue += "
hierarchy-1
";
modalValue += "
hierarchy-1-1
";
modalValue += "
hierarchy-1-2
";
modalValue += "
hierarchy-1-3
";
modalValue += "
hierarchy-2
";
modalValue += "
hierarchy-2-1
";
modalValue += "
hierarchy-2-2
";
modalValue += "
hierarchy-2-3
";
modalValue += "
hierarchy-3
";
modalValue += "
hierarchy-3-1
";
modalValue += "
hierarchy-3-2
";
modalValue += "
hierarchy-3-3
";
modalValue += "
hierarchy-4
";
modalValue += "
hierarchy-4-1
";
modalValue += "
hierarchy-4-2
";
modalValue += "
hierarchy-contracted
";
modalValue += "
hierarchy-expanded
";
modalValue += "
hierarchy-first-item
";
modalValue += "
hierarchy-first-item-contracted
";
modalValue += "
hierarchy-first-item-expanded
";
modalValue += "
hierarchy-last-item
";
modalValue += "
hierarchy-last-item-contracted
";
modalValue += "
hierarchy-last-item-expanded
";
modalValue += "
hierarchy-middle-item
";
modalValue += "
hierarchy-middle-item-contracted
";
modalValue += "
hierarchy-middle-item-expanded
";
modalValue += "
hierarchy-middle-no-item
";
modalValue += "
hierarchy-only-item
";
modalValue += "
hierarchy-only-item-contracted
";
modalValue += "
hierarchy-only-item-expanded
";
modalValue += "
hierarchy-orphan
";
modalValue += "
hiking
";
modalValue += "
history
";
modalValue += "
home
";
modalValue += "
house
";
modalValue += "
iceberg
";
modalValue += "
id
";
modalValue += "
infinity
";
modalValue += "
info
";
modalValue += "
integration
";
modalValue += "
jolly-roger
";
modalValue += "
kangaroo
";
modalValue += "
kangaroo-leaping
";
modalValue += "
key
";
modalValue += "
keyboard
";
modalValue += "
keyboard-tkl
";
modalValue += "
lemniscate
";
modalValue += "
library
";
modalValue += "
light-bulb
";
modalValue += "
light-bulb-on
";
modalValue += "
lightning
";
modalValue += "
limit
";
modalValue += "
link
";
modalValue += "
link-out
";
modalValue += "
lips
";
modalValue += "
list
";
modalValue += "
lock
";
modalValue += "
luggage
";
modalValue += "
magnet
";
modalValue += "
magnet-on
";
modalValue += "
magnifying-glass
";
modalValue += "
magnifying-glass-minus
";
modalValue += "
magnifying-glass-plus
";
modalValue += "
mail
";
modalValue += "
mall
";
modalValue += "
man
";
modalValue += "
map
";
modalValue += "
map-pin
";
modalValue += "
masquerade
";
modalValue += "
maximize
";
modalValue += "
media-eject
";
modalValue += "
media-end
";
modalValue += "
media-fastforward
";
modalValue += "
media-pause
";
modalValue += "
media-play
";
modalValue += "
media-record
";
modalValue += "
media-reverse
";
modalValue += "
media-rewind
";
modalValue += "
media-skip-backward
";
modalValue += "
media-skip-forward
";
modalValue += "
media-start
";
modalValue += "
media-stop
";
modalValue += "
meerkat
";
modalValue += "
menu
";
modalValue += "
minimize
";
modalValue += "
minus
";
modalValue += "
misc
";
modalValue += "
missing
";
modalValue += "
mobius
";
modalValue += "
money
";
modalValue += "
money-clip
";
modalValue += "
money-coin
";
modalValue += "
money-coins
";
modalValue += "
money-note
";
modalValue += "
money-notes
";
modalValue += "
monitor
";
modalValue += "
moon
";
modalValue += "
more
";
modalValue += "
mouse
";
modalValue += "
mushroom-cloud
";
modalValue += "
music-note
";
modalValue += "
music-notes
";
modalValue += "
network
";
modalValue += "
note
";
modalValue += "
object
";
modalValue += "
okta-0
";
modalValue += "
okta-1
";
modalValue += "
okta-2
";
modalValue += "
okta-3
";
modalValue += "
okta-4
";
modalValue += "
okta-5
";
modalValue += "
okta-6
";
modalValue += "
okta-7
";
modalValue += "
okta-8
";
modalValue += "
palette
";
modalValue += "
paperclip
";
modalValue += "
paperclip-tilted
";
modalValue += "
payment-contactless
";
modalValue += "
payment-smart-terminal
";
modalValue += "
payment-terminal
";
modalValue += "
pen
";
modalValue += "
pencil
";
modalValue += "
people
";
modalValue += "
people-chat
";
modalValue += "
people-chat-active
";
modalValue += "
people-chevron-left
";
modalValue += "
people-chevron-left-right
";
modalValue += "
people-chevron-right
";
modalValue += "
people-chevron-right-left
";
modalValue += "
people-dots
";
modalValue += "
people-heart
";
modalValue += "
peoples
";
modalValue += "
percent-0
";
modalValue += "
percent-05
";
modalValue += "
percent-10
";
modalValue += "
percent-100
";
modalValue += "
percent-15
";
modalValue += "
percent-20
";
modalValue += "
percent-25
";
modalValue += "
percent-30
";
modalValue += "
percent-35
";
modalValue += "
percent-40
";
modalValue += "
percent-45
";
modalValue += "
percent-50
";
modalValue += "
percent-55
";
modalValue += "
percent-60
";
modalValue += "
percent-65
";
modalValue += "
percent-70
";
modalValue += "
percent-75
";
modalValue += "
percent-80
";
modalValue += "
percent-85
";
modalValue += "
percent-90
";
modalValue += "
percent-95
";
modalValue += "
person
";
modalValue += "
person-chat
";
modalValue += "
person-chat-active
";
modalValue += "
phone
";
modalValue += "
phone-handle
";
modalValue += "
picture
";
modalValue += "
pilot
";
modalValue += "
pipe
";
modalValue += "
pirate-skull
";
modalValue += "
plane
";
modalValue += "
plane-landing
";
modalValue += "
plane-taking-off
";
modalValue += "
planet
";
modalValue += "
playing-card
";
modalValue += "
playing-card-01
";
modalValue += "
playing-card-01-club
";
modalValue += "
playing-card-01-diamond
";
modalValue += "
playing-card-01-heart
";
modalValue += "
playing-card-01-spade
";
modalValue += "
playing-card-02
";
modalValue += "
playing-card-02-club
";
modalValue += "
playing-card-02-diamond
";
modalValue += "
playing-card-02-heart
";
modalValue += "
playing-card-02-spade
";
modalValue += "
playing-card-03
";
modalValue += "
playing-card-03-club
";
modalValue += "
playing-card-03-diamond
";
modalValue += "
playing-card-03-heart
";
modalValue += "
playing-card-03-spade
";
modalValue += "
playing-card-04
";
modalValue += "
playing-card-04-club
";
modalValue += "
playing-card-04-diamond
";
modalValue += "
playing-card-04-heart
";
modalValue += "
playing-card-04-spade
";
modalValue += "
playing-card-05
";
modalValue += "
playing-card-05-club
";
modalValue += "
playing-card-05-diamond
";
modalValue += "
playing-card-05-heart
";
modalValue += "
playing-card-05-spade
";
modalValue += "
playing-card-06
";
modalValue += "
playing-card-06-club
";
modalValue += "
playing-card-06-diamond
";
modalValue += "
playing-card-06-heart
";
modalValue += "
playing-card-06-spade
";
modalValue += "
playing-card-07
";
modalValue += "
playing-card-07-club
";
modalValue += "
playing-card-07-diamond
";
modalValue += "
playing-card-07-heart
";
modalValue += "
playing-card-07-spade
";
modalValue += "
playing-card-08
";
modalValue += "
playing-card-08-club
";
modalValue += "
playing-card-08-diamond
";
modalValue += "
playing-card-08-heart
";
modalValue += "
playing-card-08-spade
";
modalValue += "
playing-card-09
";
modalValue += "
playing-card-09-club
";
modalValue += "
playing-card-09-diamond
";
modalValue += "
playing-card-09-heart
";
modalValue += "
playing-card-09-spade
";
modalValue += "
playing-card-10
";
modalValue += "
playing-card-10-club
";
modalValue += "
playing-card-10-diamond
";
modalValue += "
playing-card-10-heart
";
modalValue += "
playing-card-10-spade
";
modalValue += "
playing-card-11
";
modalValue += "
playing-card-11-club
";
modalValue += "
playing-card-11-diamond
";
modalValue += "
playing-card-11-heart
";
modalValue += "
playing-card-11-spade
";
modalValue += "
playing-card-12
";
modalValue += "
playing-card-12-club
";
modalValue += "
playing-card-12-diamond
";
modalValue += "
playing-card-12-heart
";
modalValue += "
playing-card-12-spade
";
modalValue += "
playing-card-a
";
modalValue += "
playing-card-a-club
";
modalValue += "
playing-card-a-diamond
";
modalValue += "
playing-card-a-heart
";
modalValue += "
playing-card-a-spade
";
modalValue += "
playing-card-b
";
modalValue += "
playing-card-c
";
modalValue += "
playing-card-d
";
modalValue += "
playing-card-e
";
modalValue += "
playing-card-expanded
";
modalValue += "
playing-card-f
";
modalValue += "
playing-card-g
";
modalValue += "
playing-card-h
";
modalValue += "
playing-card-i
";
modalValue += "
playing-card-j
";
modalValue += "
playing-card-j-club
";
modalValue += "
playing-card-j-diamond
";
modalValue += "
playing-card-j-heart
";
modalValue += "
playing-card-j-spade
";
modalValue += "
playing-card-joker
";
modalValue += "
playing-card-k
";
modalValue += "
playing-card-k-club
";
modalValue += "
playing-card-k-diamond
";
modalValue += "
playing-card-k-heart
";
modalValue += "
playing-card-k-spade
";
modalValue += "
playing-card-l
";
modalValue += "
playing-card-m
";
modalValue += "
playing-card-n
";
modalValue += "
playing-card-o
";
modalValue += "
playing-card-p
";
modalValue += "
playing-card-q
";
modalValue += "
playing-card-q-club
";
modalValue += "
playing-card-q-diamond
";
modalValue += "
playing-card-q-heart
";
modalValue += "
playing-card-q-spade
";
modalValue += "
playing-card-question
";
modalValue += "
playing-card-r
";
modalValue += "
playing-card-reverse
";
modalValue += "
playing-card-s
";
modalValue += "
playing-card-skip
";
modalValue += "
playing-card-stroke
";
modalValue += "
playing-card-suit-club
";
modalValue += "
playing-card-suit-diamond
";
modalValue += "
playing-card-suit-heart
";
modalValue += "
playing-card-suit-spade
";
modalValue += "
playing-card-t
";
modalValue += "
playing-card-u
";
modalValue += "
playing-card-v
";
modalValue += "
playing-card-w
";
modalValue += "
playing-card-wild
";
modalValue += "
playing-card-x
";
modalValue += "
playing-card-y
";
modalValue += "
playing-card-z
";
modalValue += "
plus
";
modalValue += "
plus-minus
";
modalValue += "
point
";
modalValue += "
pointer
";
modalValue += "
pointer-3d
";
modalValue += "
power
";
modalValue += "
presentation
";
modalValue += "
price-tag
";
modalValue += "
product
";
modalValue += "
professional
";
modalValue += "
professionals
";
modalValue += "
project
";
modalValue += "
propeller-2
";
modalValue += "
propeller-3
";
modalValue += "
propeller-4
";
modalValue += "
propeller-5
";
modalValue += "
propeller-6
";
modalValue += "
puzzle
";
modalValue += "
puzzle-tilted
";
modalValue += "
qrcode
";
modalValue += "
queue
";
modalValue += "
radar
";
modalValue += "
radioactive
";
modalValue += "
rain
";
modalValue += "
receipt
";
modalValue += "
recycle
";
modalValue += "
recycle-bin
";
modalValue += "
recycle-bin-full
";
modalValue += "
refresh
";
modalValue += "
register
";
modalValue += "
reload
";
modalValue += "
report
";
modalValue += "
return
";
modalValue += "
ring
";
modalValue += "
rocket
";
modalValue += "
rocket-launch
";
modalValue += "
routing
";
modalValue += "
ruler
";
modalValue += "
ruler-tilted
";
modalValue += "
sale-tag
";
modalValue += "
scissors
";
modalValue += "
search
";
modalValue += "
select
";
modalValue += "
separator
";
modalValue += "
server
";
modalValue += "
servers
";
modalValue += "
settings
";
modalValue += "
shape-circle
";
modalValue += "
shape-circle-outline
";
modalValue += "
shape-circle-outline-thick
";
modalValue += "
shape-circle-outline-thin
";
modalValue += "
shape-cube
";
modalValue += "
shape-cubes
";
modalValue += "
shape-heptagon
";
modalValue += "
shape-heptagon-outline
";
modalValue += "
shape-heptagon-outline-thick
";
modalValue += "
shape-heptagon-outline-thin
";
modalValue += "
shape-hexagon
";
modalValue += "
shape-hexagon-outline
";
modalValue += "
shape-hexagon-outline-thick
";
modalValue += "
shape-hexagon-outline-thin
";
modalValue += "
shape-octagon
";
modalValue += "
shape-octagon-outline
";
modalValue += "
shape-octagon-outline-thick
";
modalValue += "
shape-octagon-outline-thin
";
modalValue += "
shape-pentagon
";
modalValue += "
shape-pentagon-outline
";
modalValue += "
shape-pentagon-outline-thick
";
modalValue += "
shape-pentagon-outline-thin
";
modalValue += "
shape-square
";
modalValue += "
shape-square-outline
";
modalValue += "
shape-square-outline-thick
";
modalValue += "
shape-square-outline-thin
";
modalValue += "
shape-triangle
";
modalValue += "
shape-triangle-outline
";
modalValue += "
shape-triangle-outline-thick
";
modalValue += "
shape-triangle-outline-thin
";
modalValue += "
share
";
modalValue += "
shield
";
modalValue += "
shirt
";
modalValue += "
shoe
";
modalValue += "
shopping-cart
";
modalValue += "
shuffle
";
modalValue += "
signature
";
modalValue += "
signpost
";
modalValue += "
skull
";
modalValue += "
smart-phone
";
modalValue += "
smart-tablet
";
modalValue += "
sneaker
";
modalValue += "
snow
";
modalValue += "
sold-sign
";
modalValue += "
spacer
";
modalValue += "
spanner
";
modalValue += "
speaker
";
modalValue += "
speaker-100
";
modalValue += "
speaker-25
";
modalValue += "
speaker-50
";
modalValue += "
speaker-75
";
modalValue += "
speaker-minus
";
modalValue += "
speaker-mute
";
modalValue += "
speaker-plus
";
modalValue += "
spectacles
";
modalValue += "
speech-bubble
";
modalValue += "
speech-bubble-active
";
modalValue += "
speech-bubble-chat
";
modalValue += "
speech-bubble-chat-active
";
modalValue += "
speed
";
modalValue += "
spinner
";
modalValue += "
spiral-galaxy
";
modalValue += "
spreadsheet
";
modalValue += "
star
";
modalValue += "
star-empty
";
modalValue += "
star-half
";
modalValue += "
star-tri
";
modalValue += "
star-tri-30
";
modalValue += "
star-tri-60
";
modalValue += "
star-tri-90
";
modalValue += "
statusboard
";
modalValue += "
stencil
";
modalValue += "
stopwatch
";
modalValue += "
store
";
modalValue += "
submarine
";
modalValue += "
submarine-underwater
";
modalValue += "
sudoku
";
modalValue += "
suitcase
";
modalValue += "
sun
";
modalValue += "
support
";
modalValue += "
swimlanes
";
modalValue += "
syringe
";
modalValue += "
tag
";
modalValue += "
tag-down
";
modalValue += "
tag-left
";
modalValue += "
tag-right
";
modalValue += "
tag-up
";
modalValue += "
target
";
modalValue += "
team
";
modalValue += "
telescope
";
modalValue += "
template
";
modalValue += "
test-tube
";
modalValue += "
test-tube-full
";
modalValue += "
testing
";
modalValue += "
text-cursor
";
modalValue += "
tic-tac-toe
";
modalValue += "
tick
";
modalValue += "
tick-cross
";
modalValue += "
tick-double
";
modalValue += "
ticket
";
modalValue += "
ticket-admission
";
modalValue += "
token
";
modalValue += "
tombstone
";
modalValue += "
tools
";
modalValue += "
tounge
";
modalValue += "
toy-car
";
modalValue += "
traffic-cone
";
modalValue += "
traffic-light
";
modalValue += "
truck
";
modalValue += "
truck-cabin
";
modalValue += "
truck-semi
";
modalValue += "
tv
";
modalValue += "
ui-banner
";
modalValue += "
ui-button-round
";
modalValue += "
ui-button-square
";
modalValue += "
ui-button-tall
";
modalValue += "
ui-button-wide
";
modalValue += "
ui-checkbox-off
";
modalValue += "
ui-checkbox-on
";
modalValue += "
ui-container-1x1
";
modalValue += "
ui-container-1x2
";
modalValue += "
ui-container-2x1
";
modalValue += "
ui-container-2x2
";
modalValue += "
ui-container-3x1
";
modalValue += "
ui-container-3x2
";
modalValue += "
ui-container-widget
";
modalValue += "
ui-element-1x1
";
modalValue += "
ui-element-1x2
";
modalValue += "
ui-element-2x1
";
modalValue += "
ui-element-2x2
";
modalValue += "
ui-element-3x1
";
modalValue += "
ui-element-3x2
";
modalValue += "
ui-element-widget
";
modalValue += "
ui-footer
";
modalValue += "
ui-form
";
modalValue += "
ui-header
";
modalValue += "
ui-modal
";
modalValue += "
ui-popup
";
modalValue += "
ui-radio-off
";
modalValue += "
ui-radio-on
";
modalValue += "
ui-toggle-off
";
modalValue += "
ui-toggle-on
";
modalValue += "
ui-window
";
modalValue += "
umbrella
";
modalValue += "
under-construction
";
modalValue += "
unlink
";
modalValue += "
unlock
";
modalValue += "
upload
";
modalValue += "
vault
";
modalValue += "
video
";
modalValue += "
virus
";
modalValue += "
wait
";
modalValue += "
wallet
";
modalValue += "
wand
";
modalValue += "
warning
";
modalValue += "
water
";
modalValue += "
webhook
";
modalValue += "
webpage
";
modalValue += "
website
";
modalValue += "
whiteboard
";
modalValue += "
wifi
";
modalValue += "
wind
";
modalValue += "
woman
";
modalValue += "
workstation
";
modalValue += "
xml
";
modalValue += "
symbol-alpha
";
modalValue += "
symbol-at
";
modalValue += "
symbol-brace-left
";
modalValue += "
symbol-brace-right
";
modalValue += "
symbol-bracket-left
";
modalValue += "
symbol-bracket-right
";
modalValue += "
symbol-cent
";
modalValue += "
symbol-delta
";
modalValue += "
symbol-dollar
";
modalValue += "
symbol-exclamation-mark
";
modalValue += "
symbol-lambda
";
modalValue += "
symbol-omega
";
modalValue += "
symbol-phi
";
modalValue += "
symbol-question-mark
";
modalValue += "
symbol-sigma
";
modalValue += "
symbol-theta
";
modalValue += "
logo-adyen
";
modalValue += "
logo-adyen-a
";
modalValue += "
logo-amiga
";
modalValue += "
logo-amiga-ball
";
modalValue += "
logo-amiga-tick
";
modalValue += "
logo-atlassian-confluence
";
modalValue += "
logo-atlassian-jira
";
modalValue += "
logo-commodore
";
modalValue += "
logo-commodore-c
";
modalValue += "
logo-git
";
modalValue += "
logo-google-calendar
";
modalValue += "
logo-google-drive
";
modalValue += "
logo-google-g
";
modalValue += "
logo-google-mail
";
modalValue += "
logo-graphql
";
modalValue += "
logo-klarna
";
modalValue += "
logo-klarna-k
";
modalValue += "
logo-linkedin
";
modalValue += "
logo-linkedin-in
";
modalValue += "
logo-microsoft-bing
";
modalValue += "
logo-microsoft-excel
";
modalValue += "
logo-microsoft-office
";
modalValue += "
logo-microsoft-powerpoint
";
modalValue += "
logo-microsoft-sharepoint
";
modalValue += "
logo-microsoft-teams
";
modalValue += "
logo-microsoft-word
";
modalValue += "
logo-paypal
";
modalValue += "
logo-paypal-pp
";
modalValue += "
logo-plex
";
modalValue += "
logo-plex-x
";
modalValue += "
logo-salesforce
";
modalValue += "
logo-slack
";
modalValue += "
logo-smartsheet
";
modalValue += "
logo-square
";
modalValue += "
logo-square-square
";
modalValue += "
logo-stripe
";
modalValue += "
logo-stripe-s
";
modalValue += "
logo-stripe-stripe
";
modalValue += "
logo-westfield
";
modalValue += "
custom-amiga-1200
";
modalValue += "
custom-amiga-500
";
modalValue += "
custom-amiga-600
";
modalValue += "
custom-axolotl-dude
";
modalValue += "
custom-axolotl_dude
";
modalValue += "
custom-chickeeducks
";
modalValue += "
custom-datastore
";
modalValue += "
custom-datastore-app
";
modalValue += "
custom-datastore-cog
";
modalValue += "
custom-datastore-console
";
modalValue += "
custom-exe
";
modalValue += "
custom-exe-cat
";
modalValue += "
custom-exe-pointer
";
modalValue += "
custom-exe-sharp
";
modalValue += "
custom-f1-nar
";
modalValue += "
custom-f1nar
";
modalValue += "
custom-glitch
";
modalValue += "
custom-klarna-konsole
";
modalValue += "
custom-mallinall
";
modalValue += "
custom-mallinall-mia
";
modalValue += "
custom-mallinall-mia-combined
";
modalValue += "
custom-mallinall-mia-outline
";
modalValue += "
custom-mallinall-mia-region
";
modalValue += "
custom-mallinall-mia-squiggle
";
modalValue += "
custom-nate-stitching
";
modalValue += "
custom-scratchpad
";
modalValue += "
custom-stripe-app
";
modalValue += "
custom-stripe-app-a
";
modalValue += "
custom-stripe-proto
";
modalValue += "
custom-stripe-proto-p
";
modalValue += "
custom-teotwin
";
modalValue += "
custom-the-axolotl-dude
";
modalValue += "
custom-the-axolotl_dude
";
modalValue += "
";
includeSearchText = false;
} else if( modalType == "account" ) {
modalValue = "";
modalValue += "
";
includeSearchText = true;
} else if( modalType == 'year' ) {
modalValue = "";
} else if( modalType == 'month' ) {
modalValue = "";
} else if( modalType == "day" ) {
modalValue = "";
modalValue += "";
modalValue += "";
modalValue += "";
modalValue += "";
modalValue += "";
modalValue += "
";
// Headings
for( var i=0 ; i < modalWeekDays.length; i++ ) modalValue += " 0 && i < 6 ? "half-wide" : "one-quarter-wide transparent-content") + "\">" + modalWeekDays[i] + "
";
modalValue += "
";
// Month start
var modalDisplayDate = new Date(modalDate.getTime());
modalDisplayDate.setDate(1);
for( var w=0; w < 6; w++ ) {
for( var d=0; d < 7; d++ ) {
if( modalDisplayDate.getMonth() != modalDate.getMonth() || (w == 0 && d < modalDisplayDate.getDay() ) ) {
modalValue += " 0 && d < 6 ? "half" : "one-quarter") + "-wide transparent-content click-container\">•
";
} else {
var modalHighlightDate = (modalOrigDate.getDate() == modalDisplayDate.getDate() && modalOrigDate.getMonth() == modalDisplayDate.getMonth() && modalOrigDate.getYear() == modalDisplayDate.getYear());
modalValue += " 0 && d < 6 ? "half-wide" : "one-quarter-wide transparent-content") + " click-button" + (modalHighlightDate ? " warning" : "") + "\">" + modalDisplayDate.getDate() + "";
modalDisplayDate.setDate(modalDisplayDate.getDate()+1);
}
}
modalValue += "
";
}
}
modalElement.innerHTML = (modalType != 'url' ? modalValue : "") + "" + (includeSearchText ? "Search " + modalType + "..." : "") + "
";
element('modalContainer').appendChild(modalElement);
// External content
if( modalType === "url" && modalValue != null ) {
modalDisplay("loading...
");
try {
xmlHttp = getXmlHttpObject();
if( xmlHttp != null ) {
xmlHttp.onreadystatechange = modalReceive;
xmlHttp.open("GET", modalValue, true);
xmlHttp.send();
}
} catch(ex) {
modalDisplay("" + ex.description + "
");
}
}
// If there is a modal search field, select it
var modalSearchValueField = element('modalSearchValue');
if( modalSearchValueField != null ) {
try {
modalSearchValueField.focus();
} catch(ex) {
// Ignore
}
}
}
/**
*/
function modalReceive() {
if( xmlHttp.readyState == 4 || xmlHttp.readyState == "complete" ) {
try {
modalDisplay(xmlHttp.responseText);
} catch(ex) {
modalDisplay("" + ex.description + "
");
}
}
}
/**
*/
function modalDisplay(value) {
let modalDynamicContainer = element('modalDynamicContainer')
if( modalDynamicContainer ) modalDynamicContainer.innerHTML = value;
}
/**
*/
function modalHide() {
var modalElement = element("modalElement");
if( modalElement != null ) modalElement.parentNode.removeChild(modalElement);
var modalBackground = element("modalBackground");
if( modalBackground != null ) modalBackground.parentNode.removeChild(modalBackground);
}
/**
*/
function modalHandleClick() {
if( 'modalContainer' === event.target.id ) modalHide();
}
/* Set field value */
/**
*/
function modalSet(modalSetValue) {
modalSet(modalSetValue, null);
}
/**
*/
function modalSet(modalSetValue, modalSetTitle) {
if( modalSetTitle == null || modalSetTitle == '' ) modalSetTitle = modalSetValue;
modalSetField(modalSetValue);
modalSetDisplayField(modalSetTitle);
modalHide();
}
/**
*/
function modalSetField(value) {
if( modalTargetField != null ) {
modalTargetField.value = value;
try {
modalTargetField.onchange();
} catch(ex) {
// Ignore
}
}
}
/**
*/
function modalSetDisplayField(value) {
if( modalTargetDisplayField != null ) {
modalTargetDisplayField.value = value;
try {
modalTargetDisplayField.onchange();
} catch(ex) {
// Ignore
}
}
}
/* Account */
/**
*/
function modalSearchAccount(value) {
try {
xmlHttp = getXmlHttpObject();
if( xmlHttp != null ) {
xmlHttp.onreadystatechange = modalSearchAccountReceive;
xmlHttp.open("GET", "/api/account/?search=" + encodeURIComponent(value), true)
xmlHttp.send()
}
} catch(ex) {
modalDisplay("" + ex.description + "
");
}
}
/**
*/
function modalSearchAccountReceive() {
if( xmlHttp.readyState == 4 || xmlHttp.readyState == "complete" ) {
try {
var modalSearchResults = null;
var modalSearchMessages = null;
var json = eval("(" + xmlHttp.responseText + ")");
if( json != null ) {
if( json.results != null ) modalSearchResults = json.results;
if( json.messages != null ) modalSearchMessages = json.messages;
}
// Show results
var modalDisplayContent = "";
if( modalSearchMessages != null && modalSearchMessages.length > 0 ) {
modalDisplayContent += "
";
for( var i=0; i < modalSearchMessages.length; i++ ) modalDisplayContent += "
" + htmlEncode(modalSearchMessages[i].message) + "
";
modalDisplayContent += "
";
}
if( modalSearchResults != null && modalSearchResults.length > 0 ) {
for( var i=0; i < modalSearchResults.length; i++ ) modalDisplayContent += "" + htmlEncode(modalSearchResults[i].first_name) + " " + htmlEncode(modalSearchResults[i].last_name) + "
";
}
modalDisplayContent += "";
modalDisplay(modalDisplayContent);
} catch(ex) {
modalDisplay("" + ex.description + "
");
}
}
}
/* Calendar */
/**
*/
function modalRollMonth(increment) {
if( modalDate == null ) return;
modalDate.setMonth(modalDate.getMonth() + increment);
modalRedraw();
}
/**
*/
function modalRollYear(increment) {
if( modalDate == null ) return;
modalDate.setYear(modalDate.getFullYear() + increment);
modalRedraw();
}
/**
*/
function modalSetDay(modalSetDayOfMonth) {
modalSetField(modalSetDayOfMonth + "/" + modalMonths[modalDate.getMonth()] + "/" + modalDate.getFullYear());
modalHide();
}
/**
*/
function modalSetMonth() {
modalSetField(modalMonths[modalDate.getMonth()] + "/" + modalDate.getFullYear());
modalHide();
}
/**
*/
function modalSetYear() {
modalSetField(modalDate.getFullYear());
modalHide();
}
/**
*/
function filterModalIcons(event) {
var modalSearchValue = element("modalSearchValue").value;
if( modalSearchValue != null ) {
var allModalIcons = document.getElementsByClassName("modalGlyph");
if( allModalIcons != null && allModalIcons.length > 0 ) {
let selectIcon = event && event.key && event.key === 'Enter';
for( var i=0; i < allModalIcons.length; i++ ) {
if( allModalIcons[i].childNodes[2].innerHTML.toLowerCase().indexOf(modalSearchValue.toLowerCase()) != -1 ) {
// Select?
if( selectIcon ) {
modalSet(allModalIcons[i].childNodes[2].innerHTML.toLowerCase());
break;
}
// Show
allModalIcons[i].style.display="";
} else {
// Hide
allModalIcons[i].style.display="none";
}
}
}
}
}
/* Commodity */
/**
*/
window.onresize = function() {
var modalElement = element("modalElement");
if( modalElement != null ) modalRedraw();
}
//
var mouseCoords = { x: undefined, y: undefined };
/**
*/
window.addEventListener('mousemove', (event) => {
mouseCoords = { x: event.clientX + window.scrollX, y: event.clientY + window.scrollY };
});