Most of javascript code is copyrighted (c) 2022 by Dave Garwacke.
That part of code is possible to find in opensource internet and permission for only this part is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software.