├── assets
├── images
│ ├── favicon.ico
│ ├── icon-32.png
│ ├── icon-96.png
│ ├── icon-og.png
│ ├── icon-128.png
│ ├── icon-192.png
│ ├── icon-196.png
│ ├── icon-256.png
│ ├── icon-128x128.png
│ ├── icon-256x256.png
│ ├── icon-rounded.png
│ ├── icon-square.png
│ ├── screenshot-1.png
│ ├── screenshot-2.png
│ ├── banner-772x250.png
│ ├── illustration-1.png
│ ├── apple-touch-icon.png
│ ├── banner-1544x500.png
│ ├── illustration-els.png
│ ├── illustration-og.png
│ ├── distance-calculator.png
│ ├── distance-calculator-001.png
│ ├── lat-long.svg
│ ├── 2d.svg
│ └── 3d.svg
├── js
│ ├── lib
│ │ ├── chartjs
│ │ │ ├── helpers.js.map
│ │ │ ├── helpers.js
│ │ │ └── helpers.d.ts
│ │ ├── katex
│ │ │ ├── fonts
│ │ │ │ ├── KaTeX_Main-Bold.ttf
│ │ │ │ ├── KaTeX_AMS-Regular.ttf
│ │ │ │ ├── KaTeX_Main-Bold.woff
│ │ │ │ ├── KaTeX_Main-Bold.woff2
│ │ │ │ ├── KaTeX_Main-Italic.ttf
│ │ │ │ ├── KaTeX_Math-Italic.ttf
│ │ │ │ ├── KaTeX_AMS-Regular.woff
│ │ │ │ ├── KaTeX_AMS-Regular.woff2
│ │ │ │ ├── KaTeX_Fraktur-Bold.ttf
│ │ │ │ ├── KaTeX_Fraktur-Bold.woff
│ │ │ │ ├── KaTeX_Fraktur-Bold.woff2
│ │ │ │ ├── KaTeX_Main-Italic.woff
│ │ │ │ ├── KaTeX_Main-Italic.woff2
│ │ │ │ ├── KaTeX_Main-Regular.ttf
│ │ │ │ ├── KaTeX_Main-Regular.woff
│ │ │ │ ├── KaTeX_Main-Regular.woff2
│ │ │ │ ├── KaTeX_Math-Italic.woff
│ │ │ │ ├── KaTeX_Math-Italic.woff2
│ │ │ │ ├── KaTeX_SansSerif-Bold.ttf
│ │ │ │ ├── KaTeX_Script-Regular.ttf
│ │ │ │ ├── KaTeX_Size1-Regular.ttf
│ │ │ │ ├── KaTeX_Size1-Regular.woff
│ │ │ │ ├── KaTeX_Size2-Regular.ttf
│ │ │ │ ├── KaTeX_Size2-Regular.woff
│ │ │ │ ├── KaTeX_Size3-Regular.ttf
│ │ │ │ ├── KaTeX_Size3-Regular.woff
│ │ │ │ ├── KaTeX_Size4-Regular.ttf
│ │ │ │ ├── KaTeX_Size4-Regular.woff
│ │ │ │ ├── KaTeX_Caligraphic-Bold.ttf
│ │ │ │ ├── KaTeX_Fraktur-Regular.ttf
│ │ │ │ ├── KaTeX_Fraktur-Regular.woff
│ │ │ │ ├── KaTeX_Main-BoldItalic.ttf
│ │ │ │ ├── KaTeX_Main-BoldItalic.woff
│ │ │ │ ├── KaTeX_Math-BoldItalic.ttf
│ │ │ │ ├── KaTeX_Math-BoldItalic.woff
│ │ │ │ ├── KaTeX_SansSerif-Bold.woff
│ │ │ │ ├── KaTeX_SansSerif-Bold.woff2
│ │ │ │ ├── KaTeX_SansSerif-Italic.ttf
│ │ │ │ ├── KaTeX_Script-Regular.woff
│ │ │ │ ├── KaTeX_Script-Regular.woff2
│ │ │ │ ├── KaTeX_Size1-Regular.woff2
│ │ │ │ ├── KaTeX_Size2-Regular.woff2
│ │ │ │ ├── KaTeX_Size3-Regular.woff2
│ │ │ │ ├── KaTeX_Size4-Regular.woff2
│ │ │ │ ├── KaTeX_Caligraphic-Bold.woff
│ │ │ │ ├── KaTeX_Caligraphic-Bold.woff2
│ │ │ │ ├── KaTeX_Caligraphic-Regular.ttf
│ │ │ │ ├── KaTeX_Fraktur-Regular.woff2
│ │ │ │ ├── KaTeX_Main-BoldItalic.woff2
│ │ │ │ ├── KaTeX_Math-BoldItalic.woff2
│ │ │ │ ├── KaTeX_SansSerif-Italic.woff
│ │ │ │ ├── KaTeX_SansSerif-Italic.woff2
│ │ │ │ ├── KaTeX_SansSerif-Regular.ttf
│ │ │ │ ├── KaTeX_SansSerif-Regular.woff
│ │ │ │ ├── KaTeX_SansSerif-Regular.woff2
│ │ │ │ ├── KaTeX_Typewriter-Regular.ttf
│ │ │ │ ├── KaTeX_Typewriter-Regular.woff
│ │ │ │ ├── KaTeX_Caligraphic-Regular.woff
│ │ │ │ ├── KaTeX_Caligraphic-Regular.woff2
│ │ │ │ └── KaTeX_Typewriter-Regular.woff2
│ │ │ ├── auto-render.min.js
│ │ │ └── katex.min.css
│ │ └── lazysizes.min.js
│ ├── mask.js
│ ├── module.js
│ ├── dialog-table.js
│ ├── options.js
│ ├── themes.js
│ ├── fractions.js
│ ├── dropdown-icon.js
│ ├── datepicker.js
│ ├── calculator.js
│ ├── chart.js
│ ├── hourpicker.js
│ ├── timepicker.js
│ ├── app.js
│ └── functions.js
└── fonts
│ ├── inter-v12-latin-500.woff2
│ ├── inter-v12-latin-600.woff2
│ ├── inter-v12-latin-800.woff2
│ └── inter-v12-latin-regular.woff2
├── plugin.php
├── readme.md
├── ci_distance_calculator.php
├── readme.txt
└── index.html
/assets/images/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/images/favicon.ico
--------------------------------------------------------------------------------
/assets/images/icon-32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/images/icon-32.png
--------------------------------------------------------------------------------
/assets/images/icon-96.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/images/icon-96.png
--------------------------------------------------------------------------------
/assets/images/icon-og.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/images/icon-og.png
--------------------------------------------------------------------------------
/assets/images/icon-128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/images/icon-128.png
--------------------------------------------------------------------------------
/assets/images/icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/images/icon-192.png
--------------------------------------------------------------------------------
/assets/images/icon-196.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/images/icon-196.png
--------------------------------------------------------------------------------
/assets/images/icon-256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/images/icon-256.png
--------------------------------------------------------------------------------
/assets/images/icon-128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/images/icon-128x128.png
--------------------------------------------------------------------------------
/assets/images/icon-256x256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/images/icon-256x256.png
--------------------------------------------------------------------------------
/assets/images/icon-rounded.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/images/icon-rounded.png
--------------------------------------------------------------------------------
/assets/images/icon-square.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/images/icon-square.png
--------------------------------------------------------------------------------
/assets/images/screenshot-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/images/screenshot-1.png
--------------------------------------------------------------------------------
/assets/images/screenshot-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/images/screenshot-2.png
--------------------------------------------------------------------------------
/assets/js/lib/chartjs/helpers.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"helpers.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
--------------------------------------------------------------------------------
/assets/js/mask.js:
--------------------------------------------------------------------------------
1 | import '/assets/js/lib/input-mask.min.js'
2 |
3 | Inputmask().mask(document.querySelectorAll("[data-inputmask]"));
--------------------------------------------------------------------------------
/assets/images/banner-772x250.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/images/banner-772x250.png
--------------------------------------------------------------------------------
/assets/images/illustration-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/images/illustration-1.png
--------------------------------------------------------------------------------
/assets/images/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/images/apple-touch-icon.png
--------------------------------------------------------------------------------
/assets/images/banner-1544x500.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/images/banner-1544x500.png
--------------------------------------------------------------------------------
/assets/images/illustration-els.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/images/illustration-els.png
--------------------------------------------------------------------------------
/assets/images/illustration-og.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/images/illustration-og.png
--------------------------------------------------------------------------------
/assets/images/distance-calculator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/images/distance-calculator.png
--------------------------------------------------------------------------------
/assets/fonts/inter-v12-latin-500.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/fonts/inter-v12-latin-500.woff2
--------------------------------------------------------------------------------
/assets/fonts/inter-v12-latin-600.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/fonts/inter-v12-latin-600.woff2
--------------------------------------------------------------------------------
/assets/fonts/inter-v12-latin-800.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/fonts/inter-v12-latin-800.woff2
--------------------------------------------------------------------------------
/assets/fonts/inter-v12-latin-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/fonts/inter-v12-latin-regular.woff2
--------------------------------------------------------------------------------
/assets/images/distance-calculator-001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/images/distance-calculator-001.png
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Main-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Main-Bold.ttf
--------------------------------------------------------------------------------
/assets/js/module.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 |
3 | console.log("I'm module! (❁´◡`❁)")
4 |
5 | // or
6 | // export function module_function(msg) { return `msg: ${msg}` }
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_AMS-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_AMS-Regular.ttf
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Main-Bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Main-Bold.woff
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Main-Bold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Main-Bold.woff2
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Main-Italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Main-Italic.ttf
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Math-Italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Math-Italic.ttf
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_AMS-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_AMS-Regular.woff
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_AMS-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_AMS-Regular.woff2
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Fraktur-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Fraktur-Bold.ttf
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Fraktur-Bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Fraktur-Bold.woff
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Fraktur-Bold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Fraktur-Bold.woff2
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Main-Italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Main-Italic.woff
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Main-Italic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Main-Italic.woff2
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Main-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Main-Regular.ttf
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Main-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Main-Regular.woff
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Main-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Main-Regular.woff2
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Math-Italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Math-Italic.woff
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Math-Italic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Math-Italic.woff2
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_SansSerif-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_SansSerif-Bold.ttf
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Script-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Script-Regular.ttf
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Size1-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Size1-Regular.ttf
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Size1-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Size1-Regular.woff
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Size2-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Size2-Regular.ttf
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Size2-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Size2-Regular.woff
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Size3-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Size3-Regular.ttf
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Size3-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Size3-Regular.woff
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Size4-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Size4-Regular.ttf
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Size4-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Size4-Regular.woff
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Caligraphic-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Caligraphic-Bold.ttf
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Fraktur-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Fraktur-Regular.ttf
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Fraktur-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Fraktur-Regular.woff
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Main-BoldItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Main-BoldItalic.ttf
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Main-BoldItalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Main-BoldItalic.woff
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Math-BoldItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Math-BoldItalic.ttf
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Math-BoldItalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Math-BoldItalic.woff
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_SansSerif-Bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_SansSerif-Bold.woff
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_SansSerif-Bold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_SansSerif-Bold.woff2
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_SansSerif-Italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_SansSerif-Italic.ttf
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Script-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Script-Regular.woff
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Script-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Script-Regular.woff2
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Size1-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Size1-Regular.woff2
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Size2-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Size2-Regular.woff2
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Size3-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Size3-Regular.woff2
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Size4-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Size4-Regular.woff2
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Caligraphic-Bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Caligraphic-Bold.woff
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Caligraphic-Bold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Caligraphic-Bold.woff2
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Caligraphic-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Caligraphic-Regular.ttf
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Fraktur-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Fraktur-Regular.woff2
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Main-BoldItalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Main-BoldItalic.woff2
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Math-BoldItalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Math-BoldItalic.woff2
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_SansSerif-Italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_SansSerif-Italic.woff
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_SansSerif-Italic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_SansSerif-Italic.woff2
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_SansSerif-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_SansSerif-Regular.ttf
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_SansSerif-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_SansSerif-Regular.woff
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_SansSerif-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_SansSerif-Regular.woff2
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Typewriter-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Typewriter-Regular.ttf
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Typewriter-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Typewriter-Regular.woff
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Caligraphic-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Caligraphic-Regular.woff
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Caligraphic-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Caligraphic-Regular.woff2
--------------------------------------------------------------------------------
/assets/js/lib/katex/fonts/KaTeX_Typewriter-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pub-calculator-io/distance-calculator/HEAD/assets/js/lib/katex/fonts/KaTeX_Typewriter-Regular.woff2
--------------------------------------------------------------------------------
/assets/js/dialog-table.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 |
3 | $$('.result-table__dialog').forEach(element => {
4 | const ELEMENT_OPEN = element.querySelector('.result-table__open');
5 | ELEMENT_OPEN.addEventListener('click', () => {
6 | element.classList.toggle('result-table__dialog--active');
7 | })
8 | })
--------------------------------------------------------------------------------
/assets/js/options.js:
--------------------------------------------------------------------------------
1 | const OPTIONS = document.querySelectorAll('.calculator-content--options')
2 |
3 | OPTIONS.forEach(option => {
4 | const OPTION_HEAD = option.querySelector('.calculator-content-head')
5 |
6 | OPTION_HEAD.addEventListener('click', (event) => {
7 |
8 | if(!event.composedPath().includes($('.js-add-button'))) {
9 | option.classList.toggle('calculator-content--active')
10 | }
11 | })
12 | })
--------------------------------------------------------------------------------
/plugin.php:
--------------------------------------------------------------------------------
1 |
Distance Calculator
Hour
22 | 23 |:
25 |Minute
27 | 28 |Hour
22 | 23 |:
25 |Minute
27 | 28 |:
30 |Second
32 | 33 |(parentContext: P, context: T): P extends null ? T : P & T;
339 |
340 | /**
341 | * @alias Chart.helpers.math
342 | * @namespace
343 | */
344 | declare const PI: number;
345 | declare const TAU: number;
346 | declare const PITAU: number;
347 | declare const INFINITY: number;
348 | declare const RAD_PER_DEG: number;
349 | declare const HALF_PI: number;
350 | declare const QUARTER_PI: number;
351 | declare const TWO_THIRDS_PI: number;
352 | declare const log10: (x: number) => number;
353 | declare const sign: (x: number) => number;
354 | declare function almostEquals(x: number, y: number, epsilon: number): boolean;
355 | /**
356 | * Implementation of the nice number algorithm used in determining where axis labels will go
357 | */
358 | declare function niceNum(range: number): number;
359 | /**
360 | * Returns an array of factors sorted from 1 to sqrt(value)
361 | * @private
362 | */
363 | declare function _factorize(value: number): number[];
364 | declare function isNumber(n: unknown): n is number;
365 | declare function almostWhole(x: number, epsilon: number): boolean;
366 | /**
367 | * @private
368 | */
369 | declare function _setMinAndMaxByKey(array: Record There was an error with your calculation. Result d = 26.19637
Should be ${resultType}.`:'')
121 | + (args.length != 0 ? `
Args: ${args.join(', ')}.`:'')
122 | );
123 | }
124 | return result;
125 | };
126 |
127 | // allows to show accurate results with fixed precision/length (instead of using BigNumber)
128 | window.format = number => math.format(number,{precision:7})
129 |
130 | window.input = {
131 | box: $('#error-box'),
132 | list: $('#error-list'),
133 | value: null,
134 | elementId: null,
135 | shown: false,
136 | processed: false,
137 | silent: false,
138 | reset: function(){
139 | this.shown = false;
140 | this.box.classList.remove('calculator-result--error-active');
141 | $$('.input-field--error')?.forEach(el => el.classList.remove('input-field--error'))
142 | $$('.calculator-result:not(.calculator-result--error)').forEach(el => el.classList.remove('calculator-result--hidden'))
143 | },
144 | error: function (inputId, message = `Incorrect value for "${inputId}"`, last = false) {
145 | if(this.silent) return;
146 | if(this.processed) this.reset();
147 | if(!Array.isArray(inputId)) inputId = [inputId];
148 | for(const inputIdItem of inputId) _(inputIdItem).parentNode.classList.add('input-field--error');
149 | if(!this.shown){
150 | this.processed = false;
151 | this.shown = true;
152 | this.list.innerHTML = '';
153 | this.box.classList.add('calculator-result--error-active');
154 | $$('.calculator-result:not(.calculator-result--error)').forEach(el => el.classList.add('calculator-result--hidden'))
155 | }
156 | const element = document.createElement('p');
157 | element.classList.add('calculator-error__item');
158 | element.innerHTML = message;
159 | this.list.append(element);
160 | if(last) this.processed = true;
161 | },
162 | // sometimes it's complicated to check input values
163 | // so we're checking `calc` result for an erroneous result, show exception and return
164 | // e.g.: try{calc(...);}catch(e){input.exception(field{s},e);return;}
165 | exception(inputId, message){
166 | if(typeof message != 'string'){
167 | let error = '';
168 | if(message instanceof Error){
169 | error = message.toString();
170 | }
171 | // default message
172 | if(Array.isArray(inputId) && inputId.length == 0){
173 | message = `${error}`;
174 | } else {
175 | message = `Value${Array.isArray(inputId)?'s':` "${this.get(inputId).value}"`} of "${inputId}" ${Array.isArray(inputId)?'are':'is'} invalid.
${error}`;
176 | }
177 | }
178 | return this.error(inputId, message, true);
179 | },
180 | valid: function(){
181 | if(!this.shown || this.processed) this.reset();
182 | this.processed = true;
183 | this.silent = false;
184 | return !this.shown;
185 | },
186 | get: function(elementId){
187 | this.elementId = elementId;
188 | let element = _(elementId);
189 | this.silent = false;
190 | if(element == null){
191 | this.value = null;
192 | } else {
193 | this.value = element.value;
194 | for (; element && element !== document; element = element.parentNode ) {
195 | if(element.classList.contains('related-item-hidden')) this.silent = true;
196 | }
197 | }
198 | return this;
199 | },
200 | index: function(){
201 | this.value = _(this.elementId).selectedIndex;
202 | return this;
203 | },
204 | checked: function(elementId){
205 | this.value = _(this.elementId).checked;
206 | return this;
207 | },
208 | split: function(separator){
209 | this.value = this.value.split(separator);
210 | return this;
211 | },
212 | replace: function(pattern, replacement){
213 | this.value = this.value.replace(pattern, replacement);
214 | return this;
215 | },
216 | default: function(value){
217 | if(!this.value) this.value = value;
218 | return this;
219 | },
220 | optional: function(value){
221 | if(!this.value) this.silent = true;
222 | return this;
223 | },
224 | gt: function(compare = 0, errorText = `The ${this.elementId} must be greater than ${compare}.`){
225 | if (this.value instanceof Date) {
226 | compare = compare instanceof Date ? compare : new Date(_(compare).value);
227 | if (this.value.getTime() <= compare.getTime()) this.error(this.elementId, errorText);
228 | } else {
229 | compare = isNaN(compare) ? Number(_(compare).value) : compare;
230 | if(this.value === '' || isNaN(Number(this.value)))
231 | this.error(this.elementId, `The ${this.elementId} must be a number.`);
232 | else
233 | if (Number(this.value) <= compare) this.error(this.elementId, errorText);
234 | }
235 | return this;
236 | },
237 | gte: function(compare = 0, errorText = `The ${this.elementId} must be greater than or equal to ${compare}.`){
238 | if (this.value instanceof Date) {
239 | compare = compare instanceof Date ? compare : new Date(_(compare).value);
240 | if (this.value.getTime() < compare.getTime()) this.error(this.elementId, errorText);
241 | } else {
242 | compare = isNaN(compare) ? Number(_(compare).value) : compare;
243 | if(this.value === '' || isNaN(Number(this.value)))
244 | this.error(this.elementId, `The ${this.elementId} must be a number.`);
245 | else
246 | if (Number(this.value) < compare) this.error(this.elementId, errorText);
247 | }
248 | return this;
249 | },
250 | lt: function(compare = 0, errorText = `The ${this.elementId} must be less than ${compare}.`){
251 | if (this.value instanceof Date) {
252 | compare = compare instanceof Date ? compare : new Date(_(compare).value);
253 | if (this.value.getTime() >= compare.getTime()) this.error(this.elementId, errorText);
254 | } else {
255 | compare = isNaN(compare) ? Number(_(compare).value) : compare;
256 | if(this.value === '' || isNaN(Number(this.value)))
257 | this.error(this.elementId, `The ${this.elementId} must be a number.`);
258 | else
259 | if (Number(this.value) >= compare) this.error(this.elementId, errorText);
260 | }
261 | return this;
262 | },
263 | lte: function(compare = 0, errorText = `The ${this.elementId} must be less than or equal to ${compare}.`){
264 | if (this.value instanceof Date) {
265 | compare = compare instanceof Date ? compare : new Date(_(compare).value);
266 | if (this.value.getTime() > compare.getTime()) this.error(this.elementId, errorText);
267 | } else {
268 | compare = isNaN(compare) ? Number(_(compare).value) : compare;
269 | if(this.value === '' || isNaN(Number(this.value)))
270 | this.error(this.elementId, `The ${this.elementId} must be a number.`);
271 | else
272 | if (Number(this.value) > compare) this.error(this.elementId, errorText);
273 | }
274 | return this;
275 | },
276 | integer: function(errorText = `The ${this.elementId} must be integer number (-3, -2, -1, 0, 1, 2, 3, ...).`){
277 | if (!this.value.match(/^-?(0|[1-9]\d*)$/)) this.error(this.elementId, errorText);
278 | return this;
279 | },
280 | _naturalRegexp: /^([1-9]\d*)$/,
281 | natural: function(errorText = `The ${this.elementId} must be a natural number (1, 2, 3, ...).`){
282 | if (!this.value.match(this._naturalRegexp)) this.error(this.elementId, errorText);
283 | return this;
284 | },
285 | natural_numbers: function(errorText = `The ${this.elementId} must be a set of natural numbers (1, 2, 3, ...).`){
286 | this.split(/[ ,]+/);
287 | if (!this.value.every(value=>value.match(this._naturalRegexp))) this.error(this.elementId, errorText);
288 | return this;
289 | },
290 | _mixedRegexp: /^(0|-?[1-9]\d*|-?[1-9]\d*\/[1-9]\d*|-?[1-9]\d*\s[1-9]\d*\/[1-9]\d*)$/,
291 | mixed: function(errorText = `The ${this.elementId} must be an integer/fraction/mixed number (1, 2/3, 4 5/6, ...).`){
292 | if (!this.value.match(this._mixedRegexp)) this.error(this.elementId, errorText);
293 | return this;
294 | },
295 | mixed_numbers: function(errorText = `The ${this.elementId} must be a set of integer/fraction/mixed numbers (1, 2/3, 4 5/6, ...).`){
296 | this.split(/,\s*/);
297 | if (!this.value.every(value=>value.match(this._mixedRegexp))) this.error(this.elementId, errorText);
298 | return this;
299 | },
300 | number: function(errorText = `The "${this.elementId}" must be a number.`){
301 | if(this.value === '' || isNaN(Number(this.value))) this.error(this.elementId, errorText);
302 | return this;
303 | },
304 | probability: function(errorText = `The "${this.elementId}" must be a number between 0 and 1.`){
305 | if(this.value === '' || isNaN(Number(this.value)) || Number(this.value) < 0 || Number(this.value) > 1)
306 | this.error(this.elementId, errorText);
307 | return this;
308 | },
309 | percentage: function(errorText = `The "${this.elementId}" must be a number between 0 and 100.`){
310 | if(this.value === '' || isNaN(Number(this.value)) || Number(this.value) < 0 || Number(this.value) > 100)
311 | this.error(this.elementId, errorText);
312 | return this;
313 | },
314 | numbers: function(errorText = `The ${this.elementId} must be a set of numbers.`){
315 | if (this.value.filter(value => isNaN(Number(value))).length) this.error(this.elementId, errorText);
316 | return this;
317 | },
318 | whole: function(errorText = `The ${this.elementId} must be a whole number.`){
319 | if (!this.value.match(/^(0|[1-9]\d*)$/)) this.error(this.elementId, errorText);
320 | return this;
321 | },
322 | positive: function(errorText = `The ${this.elementId} must be greater than 0.`){
323 | this.gt(0, errorText);
324 | return this;
325 | },
326 | nonZero: function(errorText = `The ${this.elementId} must be non-zero.`){
327 | if(this.value === '' || isNaN(Number(this.value)))
328 | this.error(this.elementId, `The ${this.elementId} must be a number.`);
329 | else
330 | if(Number(this.value) == 0) this.error(this.elementId, errorText);
331 | return this;
332 | },
333 | nonNegative: function(errorText = `The ${this.elementId} must be greater than or equal to 0.`){
334 | this.gte(0, errorText);
335 | return this;
336 | },
337 | negative: function(errorText = `The ${this.elementId} must be less than 0.`){
338 | this.lt(0, errorText);
339 | return this;
340 | },
341 | scientific: function(errorText = `The ${this.elementId} must be in scientific notation.`){
342 | if (!this.value.match(/^(-|\+)?((0|[1-9]\d*)(\.\d*)?|(\.\d+))((e|\s?(\*|x)\s?10\^)(-|\+)?(0|[1-9]\d*))?$/i)) this.error(this.elementId, errorText);
343 | return this;
344 | },
345 | periodic: function(errorText = `The ${this.elementId} must be regular or periodic number.`){
346 | if (this.value === '' || isNaN(Number(this.value)) && !this.value.match(/\.\d*\(\d+\)$/)) this.error(this.elementId, errorText);
347 | return this;
348 | },
349 | time: function(format = 'hh:mm:ss', errorText = `The ${this.elementId} must be in format ${format}.`){
350 | let regex = new RegExp("^" + format.replace(/[\:\-\/\\]/g, '\\$&').replace(/h|m|s/g, '\\d') + "$");
351 | if (!this.value.match(regex) || isNaN(this.value = new Date(`1900-01-01 ${this.value}`))) this.error(this.elementId, errorText);
352 | return this;
353 | },
354 | date: function(format = 'yyyy-mm-dd', errorText = `The ${this.elementId} is required field.`){
355 | let regex = new RegExp("^" + format.replace(/[\:\-\/\\]/g, '\\$&').replace(/y|m|d|h|s/g, '\\d') + "$");
356 | if (!this.value.match(regex) || isNaN(this.value = new Date(this.value))) this.error(this.elementId, errorText);
357 | this.value = convertTZ(this.value, "UTC");
358 | return this;
359 | },
360 | bool: function(){
361 | return !!this.value;
362 | },
363 | val: function(){
364 | if(this.value === '' || this.value === null) return null;
365 | return Number(this.value);
366 | },
367 | vals: function(){
368 | return this.value.map(value => Number(value));
369 | },
370 | raw: function(){
371 | return this.value;
372 | },
373 | group(name,ids){
374 | const result = ids.split('|')
375 | .reduce((result,ids)=>{
376 | const obj = ids.split('.').every(id=>_(name+id.match(/^[_a-zA-Z]+/)[0]).value) ?
377 | ids.split('.').reduce((obj,id)=>{
378 | let type = 'number';
379 | let getter = 'val';
380 | switch((id.match(/[^_a-zA-Z]+$/)||[])[0]){
381 | case '+': type = 'positive'; break;
382 | case '!0': type = 'nonZero'; break;
383 | case '#': getter = 'raw'; break;
384 | default: /* custom modificator */; break;
385 | }
386 | id = id.match(/^[_a-zA-Z]+/)[0];
387 | return {...obj, ...{
388 | [id]: input.get(name+id)[type]()[getter]()
389 | }};
390 | }, {}) : null;
391 | if(!result && !obj) return null;
392 | return {...result,...obj};
393 | }, null);
394 | return result;
395 | },
396 | }
397 |
398 | window.sysnumconv = function(element){
399 | const id = element.dataset.target;
400 | const metric = _(id);
401 | const imperial = _(id + "_imperial");
402 | if(window.isMetricSystem()){
403 | let value = metric.value;
404 | imperial.value = eval(imperial.dataset.formula).toFixed(2);
405 | } else {
406 | let value = imperial.value;
407 | metric.value = eval(metric.dataset.formula).toFixed(2);
408 | }
409 | };
410 |
411 | window.updateHeight = function(element){
412 | var id = element.dataset.target;
413 | var cm = _(id);
414 | var feet = _(id + "_ft");
415 | var inches = _(id + "_in");
416 | if(window.isMetricSystem()){
417 | feet.value = Math.floor(cm.value * 0.393701 / 12);
418 | inches.value = (cm.value * 0.393701 % 12).toFixed(2);
419 | } else {
420 | cm.value = ((feet.value * 30.48) + (inches.value * 2.54)).toFixed(2);
421 | }
422 | };
423 |
424 | window.setDate = function (id, suffix) {
425 | var date = new Date();
426 | var date_m = _(id);
427 | var date_us = _(id + "_us");
428 | date.setDate(date.getDate() + suffix);
429 | date_us.value = ("0" + (date.getMonth() + 1)).slice(-2) + '/' + ("0" + date.getDate()).slice(-2) + '/' + date.getFullYear();
430 | date_m.value = date.getFullYear() + '-' + ("0" + (date.getMonth() + 1)).slice(-2) + '-' + ("0" + date.getDate()).slice(-2);
431 | }
432 |
433 | window.updateDate = function(element){
434 | var id = element.dataset.target;
435 | var date_m = _(id);
436 | var date_us = _(id + "_us");
437 | if(window.isMetricSystem()){
438 | let date = new Date(Date.parse(date_m.value));
439 | date_us.value = ("0" + (date.getMonth() + 1)).slice(-2) + '/' + ("0" + date.getDate()).slice(-2) + '/' + date.getFullYear();
440 | } else {
441 | let date = new Date(Date.parse(date_us.value));
442 | date_m.value = date.getFullYear() + '-' + ("0" + (date.getMonth() + 1)).slice(-2) + '-' + ("0" + date.getDate()).slice(-2);
443 | }
444 | };
445 |
446 | window.switchTab = function (event, index) {
447 | if(index !== undefined && index !== null) {
448 | if(event.target.classList.contains('tab-item')) {
449 | $$(`.${event.target.classList[0]}`).forEach((tab, i) => {
450 | if(index === i) {
451 | tab.classList.add('tab-item--active')
452 | } else {
453 | tab.classList.remove('tab-item--active')
454 | }
455 | })
456 | }
457 | }
458 | $$(`[data-tab]`).forEach(element => {
459 | if(element.dataset.tab == event.selectedIndex || element.dataset.tab == index) {
460 | element.classList.add('tab--active')
461 | } else {
462 | element.classList.remove('tab--active')
463 | }
464 | })
465 | }
466 |
467 | window.setMaxLength = function(element, maxLength) {
468 | if(getComputedStyle(element).getPropertyValue('--fontStep') !== '') {
469 | element.style = `--maxWidth: ${Number(getComputedStyle(element).getPropertyValue('--fontStep').replace(/px/gi, '')) * (element.value.length === 0 ? 1 : element.value.length > maxLength ? maxLength : element.value.length) }px`
470 | }
471 | if(element.value.length > maxLength) {
472 | element.value = element.value.substring(0, maxLength);
473 | }
474 | }
475 |
476 | window.relatedToggle = function(element, related, action) {
477 | if(action === "disabled") {
478 | if(element.target.checked) {
479 | $$(`.related-to-${related}`)?.forEach(el => el.classList.remove('disabled'))
480 | } else {
481 | $$(`.related-to-${related}`)?.forEach(el => el.classList.add('disabled'))
482 | }
483 | } else {
484 | if(element.target.checked) {
485 | $$(`.related-to-${related}-a`)?.forEach(el => el.classList.add('related-item-hidden'))
486 | $$(`.related-to-${related}-b`)?.forEach(el => el.classList.remove('related-item-hidden'))
487 | } else {
488 | $$(`.related-to-${related}-a`)?.forEach(el => el.classList.remove('related-item-hidden'))
489 | $$(`.related-to-${related}-b`)?.forEach(el => el.classList.add('related-item-hidden'))
490 | }
491 | }
492 | }
493 |
494 | window.roundTo = function (num, decimals = 5) {
495 | if (typeof num !== 'number' || !isFinite(num)) return num;
496 | if (num.toString().includes('e')) {
497 | const splitted = num.toString().split('e');
498 | return roundTo(+splitted[0], decimals) + `e${splitted[1]}`;
499 | };
500 | return +(Math.round(num + `e+${decimals}`) + `e-${decimals}`);
501 | }
502 |
503 | window.delay = ms => new Promise(resolve => setTimeout(resolve, ms));
504 | window.generateRandomDigit = () => Math.floor(Math.random() * 10);
505 | window.convertTZ = (date, tzString) => new Date((typeof date === "string" ? new Date(date) : date).toLocaleString("en-US", {timeZone: tzString}));
506 | window.animateElement = async (element, isText) => {
507 | const originalText = element.innerHTML;
508 | let digitIndices = [];
509 | let originalDigits = [];
510 |
511 | [...originalText].forEach((char, index) => {
512 | if (!isNaN(parseInt(char, 10)) && char !== ' ') {
513 | digitIndices.push(index);
514 | originalDigits.push(char);
515 | }
516 | });
517 |
518 | for (let i = 0; i < 10; i++) {
519 | let textArray = [...originalText];
520 | digitIndices.forEach(index => {
521 | textArray[index] = generateRandomDigit();
522 | });
523 | element.innerHTML = textArray.join('');
524 | await delay(30);
525 | }
526 |
527 | digitIndices.forEach((index, digitIndex) => {
528 | let textArray = [...originalText];
529 | textArray[index] = originalDigits[digitIndex];
530 | element.innerHTML = textArray.join('');
531 | });
532 | };
533 | window.animateElements = function(){
534 | $$('.animate').forEach(async (element) => animateElement(element));
535 | $$('.animate-text').forEach(async (element) => animateElement(element, true));
536 | }
537 | window.plural = function (number, versions, options = { showNumber: true, localize: true, locale: null }) {
538 | const words = {
539 | zero: "",
540 | one: "",
541 | two: "",
542 | few: "",
543 | many: "",
544 | other: ""
545 | };
546 | const parts = versions.split(':');
547 | if (parts.length === 1) {
548 | Object.keys(words).forEach(key => words[key] = versions);
549 | } else {
550 | let i = 0;
551 | for (let key in words) {
552 | words[key] = parts[i] || parts[0];
553 | i++;
554 | }
555 | }
556 | const rule = new Intl.PluralRules(options.locale ?? window.locale).select(Math.floor(number));
557 | return `${options.showNumber ? `${options.localize ? number.toLocaleString(options.locale ?? window.locale) : number} ` : ''}${words[rule]}`;
558 | };
559 |
560 | window.numberToWords = function(num) {
561 | if (num === 0) return 'zero';
562 | const belowTwenty = [
563 | '', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine',
564 | 'ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen',
565 | 'sixteen', 'seventeen', 'eighteen', 'nineteen'];
566 |
567 | const tens = ['', '', 'twenty', 'thirty', 'forty', 'fifty', 'sixty', 'seventy', 'eighty', 'ninety'];
568 |
569 | const hundreds = [
570 | '', 'one hundred', 'two hundred', 'three hundred', 'four hundred', 'five hundred',
571 | 'six hundred', 'seven hundred', 'eight hundred', 'nine hundred'];
572 |
573 | const integerScales = [
574 | 'thousands:thousand:thousands:thousands:thousands:thousands', 'millions:million:millions:millions:millions:millions', 'billions:billion:billions:billions:billions:billions', 'trillions:trillion:trillions:trillions:trillions:trillions', 'quadrillions:quadrillion:quadrillions:quadrillions:quadrillions:quadrillions',
575 | 'quintillions:quintillion:quintillions:quintillions:quintillions:quintillions', 'sextillions:sextillion:sextillions:sextillions:sextillions:sextillions', 'septillions:septillion:septillions:septillions:septillions:septillions', 'octillions:octillion:octillions:octillions:octillions:octillions', 'nonillions:nonillion:nonillions:nonillions:nonillions:nonillions',
576 | 'decillions:decillion:decillions:decillions:decillions:decillions', 'undecillions:undecillion:undecillions:undecillions:undecillions:undecillions', 'duodecillions:duodecillion:duodecillions:duodecillions:duodecillions:duodecillions', 'tredecillions:tredecillion:tredecillions:tredecillions:tredecillions:tredecillions', 'quattuordecillions:quattuordecillion:quattuordecillions:quattuordecillions:quattuordecillions:quattuordecillions',
577 | 'quindecillions:quindecillion:quindecillions:quindecillions:quindecillions:quindecillions', 'sexdecillions:sexdecillion:sexdecillions:sexdecillions:sexdecillions:sexdecillions', 'septendecillions:septendecillion:septendecillions:septendecillions:septendecillions:septendecillions', 'octodecillions:octodecillion:octodecillions:octodecillions:octodecillions:octodecillions',
578 | 'novemdecillions:novemdecillion:novemdecillions:novemdecillions:novemdecillions:novemdecillions', 'vigintillions:vigintillion:vigintillions:vigintillions:vigintillions:vigintillions'];
579 |
580 | const decimalScales = [
581 | 'tenths:tenth:tenths:tenths:tenths:tenths', 'hundredths:hundredth:hundredths:hundredths:hundredths:hundredths', 'thousandths:thousandth:thousandths:thousandths:thousandths:thousandths', 'ten-thousandths:ten-thousandth:ten-thousandths:ten-thousandths:ten-thousandths:ten-thousandths', 'hundred-thousandths:hundred-thousandth:hundred-thousandths:hundred-thousandths:hundred-thousandths:hundred-thousandths', 'millionths:millionth:millionths:millionths:millionths:millionths',
582 | 'ten-millionths:ten-millionth:ten-millionths:ten-millionths:ten-millionths:ten-millionths', 'hundred-millionths:hundred-millionth:hundred-millionths:hundred-millionths:hundred-millionths:hundred-millionths', 'billionths:billionth:billionths:billionths:billionths:billionths', 'ten-billionths:ten-billionth:ten-billionths:ten-billionths:ten-billionths:ten-billionths', 'hundred-billionths:hundred-billionth:hundred-billionths:hundred-billionths:hundred-billionths:hundred-billionths',
583 | 'trillionths:trillionth:trillionths:trillionths:trillionths:trillionths', 'ten-trillionths:ten-trillionth:ten-trillionths:ten-trillionths:ten-trillionths:ten-trillionths', 'hundred-trillionths:hundred-trillionth:hundred-trillionths:hundred-trillionths:hundred-trillionths:hundred-trillionths', 'quadrillionths:quadrillionth:quadrillionths:quadrillionths:quadrillionths:quadrillionths', 'ten-quadrillionths:ten-quadrillionth:ten-quadrillionths:ten-quadrillionths:ten-quadrillionths:ten-quadrillionths',
584 | 'hundred-quadrillionths:hundred-quadrillionth:hundred-quadrillionths:hundred-quadrillionths:hundred-quadrillionths:hundred-quadrillionths', 'quintillionths:quintillionth:quintillionths:quintillionths:quintillionths:quintillionths', 'ten-quintillionths:ten-quintillionth:ten-quintillionths:ten-quintillionths:ten-quintillionths:ten-quintillionths', 'hundred-quintillionths:hundred-quintillionth:hundred-quintillionths:hundred-quintillionths:hundred-quintillionths:hundred-quintillionths',
585 | 'sextillionths:sextillionth:sextillionths:sextillionths:sextillionths:sextillionths', 'septillionths:septillionth:septillionths:septillionths:septillionths:septillionths', 'octillionths:octillionth:octillionths:octillionths:octillionths:octillionths', 'nonillionths:nonillionth:nonillionths:nonillionths:nonillionths:nonillionths', 'decillionths:decillionth:decillionths:decillionths:decillionths:decillionths',
586 | 'undecillionths:undecillionth:undecillionths:undecillionths:undecillionths:undecillionths', 'duodecillionths:duodecillionth:duodecillionths:duodecillionths:duodecillionths:duodecillionths', 'tredecillionths:tredecillionth:tredecillionths:tredecillionths:tredecillionths:tredecillionths', 'quattuordecillionths:quattuordecillionth:quattuordecillionths:quattuordecillionths:quattuordecillionths:quattuordecillionths', 'quindecillionths:quindecillionth:quindecillionths:quindecillionths:quindecillionths:quindecillionths',
587 | 'sexdecillionths:sexdecillionth:sexdecillionths:sexdecillionths:sexdecillionths:sexdecillionths', 'septendecillionths:septendecillionth:septendecillionths:septendecillionths:septendecillionths:septendecillionths', 'octodecillionths:octodecillionth:octodecillionths:octodecillionths:octodecillionths:octodecillionths', 'novemdecillionths:novemdecillionth:novemdecillionths:novemdecillionths:novemdecillionths:novemdecillionths', 'vigintillionths:vigintillionth:vigintillionths:vigintillionths:vigintillionths:vigintillionths'];
588 |
589 | let chunks = [];
590 | let currentNum = BigInt(Math.floor(num));
591 |
592 | while (currentNum > 0n) {
593 | chunks.unshift(currentNum % 1000n);
594 | currentNum = currentNum / 1000n;
595 | }
596 |
597 | if (chunks.length === 0) chunks.push(0n); // Handle numbers less than 1
598 |
599 | let integerWords = chunks.map((chunk, index) => {
600 | chunk = Number(chunk);
601 | if (chunk === 0) return '';
602 | const hundred = Math.floor(chunk / 100);
603 | const tenUnit = chunk % 100;
604 | const ten = Math.floor(tenUnit / 10);
605 | const unit = tenUnit % 10;
606 |
607 | let chunkText = '';
608 |
609 | if (hundred > 0) chunkText += hundreds[hundred] + ' ';
610 | if (tenUnit >= 20) {
611 | chunkText += tens[ten] + ' ';
612 | if (unit > 0) chunkText += belowTwenty[unit];
613 | } else if (tenUnit > 0) {
614 | chunkText += belowTwenty[tenUnit];
615 | }
616 |
617 | if (chunk > 0 && index < chunks.length - 1) {
618 | let scale = integerScales[chunks.length - index - 2];
619 | return chunkText.trim() + ' ' + plural(chunk, scale, {showNumber: false});
620 | }
621 | return chunkText.trim();
622 | }).join(' ').trim();
623 |
624 | let decimalPart = (num - Math.floor(num)).toFixed(num.toString().split('.')?.[1]?.length).toString().slice(2);
625 | let decimalLength = decimalPart > 0 ? decimalPart.toString().replace('-', '').length : 0;
626 |
627 | return (integerWords.length > 0 ? integerWords : 'zero') + (decimalLength > 0 ? ' point ' + numberToWords(decimalPart) + ' ' + plural(decimalPart, decimalScales[decimalLength-1], {showNumber: false}) : '');
628 | }
629 |
630 | window.toSentenceCase = function(str){
631 | const firstLetter = str.substr(0, 1);
632 | return firstLetter.toUpperCase() + str.substr(1).toLowerCase();
633 | }
634 |
635 | window.toTitleCase = function(str) {
636 | return str.toLowerCase().split(' ').map(function(word) {
637 | return (word.charAt(0).toUpperCase() + word.slice(1));
638 | }).join(' ');
639 | }
640 |
641 | window.setCookie = function(key, value){
642 | const date = new Date();
643 | date.setTime(date.getTime() + (10 * 365 * 24 * 60 * 60 * 1000));
644 | document.cookie = `${key}=${value};expires=${date.toUTCString()};path=/`;
645 | }
646 |
647 | window.getCookie = function(key) {
648 | let nameEQ = key + "=";
649 | let ca = document.cookie.split(';');
650 | for (let i = 0; i < ca.length; i++) {
651 | let c = ca[i];
652 | while (c.charAt(0) === ' ') c = c.substring(1);
653 | if (c.indexOf(nameEQ) === 0) {
654 | return decodeURIComponent(c.substring(nameEQ.length, c.length));
655 | }
656 | }
657 | return null;
658 | }
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |