mirror of
https://github.com/lissy93/networking-toolbox.git
synced 2026-11-26 23:50:17 +03:00
Implemented ASN & geographic lookups
This commit is contained in:
1 parent
525294a48e
commit
bd07910d21
8 files changed
+1240
-17
No files matched your search
@@ -258,26 +258,28 @@ export const iconMap: Record<string, string> = {
|
||||
building: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M112.5 128C112.5 119.2 119.7 112 128.5 112L384.5 112C393.3 112 400.5 119.2 400.5 128L400.5 257.7C321.7 269 260.5 335 256.7 416L240.5 416C222.8 416 208.5 430.3 208.5 448L208.5 528L128.5 528C119.7 528 112.5 520.8 112.5 512L112.5 128zM160.5 176L160.5 208C160.5 216.8 167.7 224 176.5 224L208.5 224C217.3 224 224.5 216.8 224.5 208L224.5 176C224.5 167.2 217.3 160 208.5 160L176.5 160C167.7 160 160.5 167.2 160.5 176zM160.5 304L160.5 336C160.5 344.8 167.7 352 176.5 352L208.5 352C217.3 352 224.5 344.8 224.5 336L224.5 304C224.5 295.2 217.3 288 208.5 288L176.5 288C167.7 288 160.5 295.2 160.5 304zM288.5 176L288.5 208C288.5 216.8 295.7 224 304.5 224L336.5 224C345.3 224 352.5 216.8 352.5 208L352.5 176C352.5 167.2 345.3 160 336.5 160L304.5 160C295.7 160 288.5 167.2 288.5 176z"/><path d="M384.5 112L128.5 112C119.7 112 112.5 119.2 112.5 128L112.5 512C112.5 520.8 119.7 528 128.5 528L208.5 528L208.5 448C208.5 430.3 222.8 416 240.5 416L256.7 416C256.6 418.6 256.5 421.3 256.5 424C256.5 491.2 295.9 549.1 352.9 576L128.5 576C93.2 576 64.5 547.3 64.5 512L64.5 128C64.5 92.7 93.2 64 128.5 64L384.5 64C419.8 64 448.5 92.7 448.5 128L448.5 257.7C440.7 256.6 432.6 256 424.5 256C416.4 256 408.3 256.6 400.5 257.7L400.5 128C400.5 119.2 393.3 112 384.5 112zM176.5 160L208.5 160C217.3 160 224.5 167.2 224.5 176L224.5 208C224.5 216.8 217.3 224 208.5 224L176.5 224C167.7 224 160.5 216.8 160.5 208L160.5 176C160.5 167.2 167.7 160 176.5 160zM288.5 176C288.5 167.2 295.7 160 304.5 160L336.5 160C345.3 160 352.5 167.2 352.5 176L352.5 208C352.5 216.8 345.3 224 336.5 224L304.5 224C295.7 224 288.5 216.8 288.5 208L288.5 176zM176.5 288L208.5 288C217.3 288 224.5 295.2 224.5 304L224.5 336C224.5 344.8 217.3 352 208.5 352L176.5 352C167.7 352 160.5 344.8 160.5 336L160.5 304C160.5 295.2 167.7 288 176.5 288zM424.5 496C464.3 496 496.5 463.8 496.5 424C496.5 384.2 464.3 352 424.5 352C384.7 352 352.5 384.2 352.5 424C352.5 463.8 384.7 496 424.5 496zM424.5 544C358.2 544 304.5 490.3 304.5 424C304.5 357.7 358.2 304 424.5 304C490.8 304 544.5 357.7 544.5 424C544.5 448.5 537.2 471.3 524.6 490.3L585.5 551.2C594.9 560.6 594.9 575.8 585.5 585.1C576.1 594.4 560.9 594.5 551.6 585.1L490.7 524.2C471.7 536.7 449 544 424.6 544z"/></svg>`,
|
||||
map: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M112 191.2L112 490.2L208 445L208 146L112 191.2zM234.6 91.1C237.8 91.6 240.9 92.4 244 93.4L416.5 152.1L418.1 151.3L240 92C238.2 91.4 236.4 91.1 234.6 91.2zM256 148.2L256 449.3L384 492L384 191.7L256 148.2zM432 198L432 494L528 448.8L528 150.6L432 198z"/><path d="M576 112C576 103.7 571.7 96 564.7 91.6C557.7 87.2 548.8 86.8 541.4 90.5L416.5 152.1L244 93.4C230.3 88.7 215.3 89.6 202.1 95.7L77.8 154.3C69.4 158.2 64 166.7 64 176L64 528C64 536.2 68.2 543.9 75.1 548.3C82 552.7 90.7 553.2 98.2 549.7L225.5 489.8L396.2 546.7C409.9 551.3 424.7 550.4 437.8 544.2L562.2 485.7C570.6 481.7 576 473.3 576 464L576 112zM208 146.1L208 445.1L112 490.3L112 191.3L208 146.1zM256 449.4L256 148.3L384 191.8L384 492.1L256 449.4zM432 198L528 150.6L528 448.8L432 494L432 198z"/></svg>`,
|
||||
signpost: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M144.4 192L144.4 288C144.4 296.8 151.6 304 160.4 304L458.3 304L513.2 240L458.3 176L160.4 176C151.6 176 144.4 183.2 144.4 192z"/><path d="M296.4 88C296.4 74.7 307.1 64 320.4 64C333.7 64 344.4 74.7 344.4 88L344.4 128L465.7 128C475 128 483.9 132.1 490 139.2L567.5 229.6C572.6 235.6 572.6 244.4 567.5 250.4L490 340.8C483.9 347.9 475 352 465.7 352L344.4 352L344.4 552C344.4 565.3 333.7 576 320.4 576C307.1 576 296.4 565.3 296.4 552L296.4 352L160.4 352C125.1 352 96.4 323.3 96.4 288L96.4 192C96.4 156.7 125.1 128 160.4 128L296.4 128L296.4 88zM296.4 304L458.3 304L513.2 240L458.3 176L160.4 176C151.6 176 144.4 183.2 144.4 192L144.4 288C144.4 296.8 151.6 304 160.4 304L296.4 304z"/></svg>`,
|
||||
wifi: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d=""/><path d="M72.9 245.4C136.4 182.7 223.7 144 320.1 144C416.5 144 503.7 182.7 567.3 245.4C576.7 254.7 591.9 254.6 601.2 245.2C610.5 235.8 610.4 220.6 601 211.3C528.8 140 429.5 96 320.1 96C210.7 96 111.3 140 39.1 211.3C29.7 220.6 29.6 235.8 38.9 245.2C48.2 254.6 63.4 254.7 72.8 245.4zM320.1 320C373.7 320 421.7 343.9 454 381.7C462.6 391.8 477.8 393 487.8 384.4C497.8 375.8 499.1 360.6 490.5 350.6C449.5 302.6 388.3 272 320.1 272C251.9 272 190.8 302.5 149.7 350.6C141.1 360.7 142.3 375.8 152.4 384.4C162.5 393 177.6 391.8 186.2 381.7C218.5 343.9 266.5 320 320.1 320zM368.1 496C368.1 469.5 346.6 448 320.1 448C293.6 448 272.1 469.5 272.1 496C272.1 522.5 293.6 544 320.1 544C346.6 544 368.1 522.5 368.1 496z"/></svg>`,
|
||||
// '': ``,
|
||||
circle: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M112 320C112 434.9 205.1 528 320 528C434.9 528 528 434.9 528 320C528 205.1 434.9 112 320 112C205.1 112 112 205.1 112 320z"/><path d="M528 320C528 205.1 434.9 112 320 112C205.1 112 112 205.1 112 320C112 434.9 205.1 528 320 528C434.9 528 528 434.9 528 320zM64 320C64 178.6 178.6 64 320 64C461.4 64 576 178.6 576 320C576 461.4 461.4 576 320 576C178.6 576 64 461.4 64 320z"/></svg>`,
|
||||
|
||||
// 'pie-chart': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M112.4 336C112.4 442 198.4 528 304.4 528C329 528 352.4 523.4 373.9 515.1L257 373.9C246.3 361 240.4 344.7 240.4 328L240.4 154.9C165.8 181.3 112.4 252.4 112.4 336z"/><path d="M384.4 118L384.4 256L522.4 256C505 188.6 451.9 135.4 384.4 118zM240.4 328L240.4 154.9C165.8 181.3 112.4 252.4 112.4 336C112.4 442 198.4 528 304.4 528C329 528 352.4 523.4 373.9 515.1L257 373.9C246.3 361 240.4 344.7 240.4 328zM574.3 272.1C576.6 289.6 562.1 304 544.4 304L368.4 304C350.7 304 336.4 289.7 336.4 272L336.4 96C336.4 78.3 350.8 63.8 368.3 66.1C475.3 80.3 560.1 165.1 574.3 272.1zM288.4 130.7L288.4 328C288.4 333.6 290.4 339 293.9 343.3L426 502.7C437.7 516.8 435.2 538.1 419.1 546.8C385 565.4 345.9 576 304.4 576C171.9 576 64.4 468.5 64.4 336C64.4 220.5 145.9 124.1 254.6 101.2C272.7 97.4 288.4 112.2 288.4 130.7zM573.7 352C592.2 352 607 367.7 603.2 385.8C593 434.2 568.2 477.2 533.6 510C521.3 521.7 502 519.2 491.2 506.1L406.9 404.4C389.6 383.5 404.5 352 431.5 352L573.7 352z"/></svg>`,
|
||||
// 'help-circle': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M112 320C112 434.9 205.1 528 320 528C434.9 528 528 434.9 528 320C528 205.1 434.9 112 320 112C205.1 112 112 205.1 112 320zM240 272C240 227.8 275.8 192 320 192C364.2 192 400 227.8 400 272C400 319.2 364 339.2 344 346.5L344 350.3C344 363.6 333.3 374.3 320 374.3C306.7 374.3 296 363.6 296 350.3L296 342.2C296 321.7 310.8 307 326.1 302C332.5 299.9 339.3 296.5 344.3 291.7C348.6 287.5 352 281.7 352 272.1C352 254.4 337.7 240.1 320 240.1C302.3 240.1 288 254.4 288 272.1C288 285.4 277.3 296.1 264 296.1C250.7 296.1 240 285.4 240 272.1zM352 432C352 449.7 337.7 464 320 464C302.3 464 288 449.7 288 432C288 414.3 302.3 400 320 400C337.7 400 352 414.3 352 432z"/><path d="M528 320C528 205.1 434.9 112 320 112C205.1 112 112 205.1 112 320C112 434.9 205.1 528 320 528C434.9 528 528 434.9 528 320zM64 320C64 178.6 178.6 64 320 64C461.4 64 576 178.6 576 320C576 461.4 461.4 576 320 576C178.6 576 64 461.4 64 320zM320 240C302.3 240 288 254.3 288 272C288 285.3 277.3 296 264 296C250.7 296 240 285.3 240 272C240 227.8 275.8 192 320 192C364.2 192 400 227.8 400 272C400 319.2 364 339.2 344 346.5L344 350.3C344 363.6 333.3 374.3 320 374.3C306.7 374.3 296 363.6 296 350.3L296 342.2C296 321.7 310.8 307 326.1 302C332.5 299.9 339.3 296.5 344.3 291.7C348.6 287.5 352 281.7 352 272.1C352 254.4 337.7 240.1 320 240.1zM288 432C288 414.3 302.3 400 320 400C337.7 400 352 414.3 352 432C352 449.7 337.7 464 320 464C302.3 464 288 449.7 288 432z"/></svg>`,
|
||||
// 'balance-scale': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d=""/><path d="M520 112L393.3 112C381 83.7 352.8 64 320 64C287.2 64 259 83.7 246.7 112L120 112C106.7 112 96 122.7 96 136C96 149.3 106.7 160 120 160L241.6 160C247.4 188.6 268.5 211.7 296 220.3L296 528L120 528C106.7 528 96 538.7 96 552C96 565.3 106.7 576 120 576L520 576C533.3 576 544 565.3 544 552C544 538.7 533.3 528 520 528L344 528L344 220.3C371.5 211.7 392.6 188.6 398.4 160L520 160C533.3 160 544 149.3 544 136C544 122.7 533.3 112 520 112zM512 259.8L584.4 384L439.6 384L512 259.8zM386 401.1C396.8 446 449.1 480 512 480C574.9 480 627.2 446 638 401.1C640.6 390.1 637 378.8 631.3 369L536.1 205.8C531.1 197.2 521.9 192 512 192C502.1 192 492.9 197.3 487.9 205.8L392.7 369.1C387 378.9 383.4 390.2 386 401.2zM54.4 384L126.8 259.8L199.2 384L54.3 384zM126.8 480C189.7 480 242 446 252.8 401.1C255.4 390.1 251.8 378.8 246.1 369L150.9 205.8C145.9 197.2 136.7 192 126.8 192C116.9 192 107.7 197.3 102.7 205.8L7.6 369.1C1.9 378.8-1.8 390.1 .9 401.1C11.7 446 64 480 126.8 480zM320 112C337.7 112 352 126.3 352 144C352 161.7 337.7 176 320 176C302.3 176 288 161.7 288 144C288 126.3 302.3 112 320 112z"/></svg>`,
|
||||
// 'code': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d=""/><path d="M369.1 80.9C373 68.2 386.5 61.2 399.1 65.1C411.7 69 418.8 82.5 414.9 95.1L270.9 559.1C267 571.8 253.5 578.8 240.9 574.9C228.3 571 221.2 557.5 225.1 544.9L369.1 80.9zM177 199C186.4 208.4 186.4 223.6 177 232.9L90 319.9L177 406.9C186.4 416.3 186.4 431.5 177 440.8C167.6 450.1 152.4 450.2 143.1 440.8L39 337C29.6 327.6 29.6 312.4 39 303.1L143 199C152.4 189.6 167.6 189.6 176.9 199zM463 199C472.4 189.6 487.6 189.6 496.9 199L601 303C610.4 312.4 610.4 327.6 601 336.9L497 441C487.6 450.4 472.4 450.4 463.1 441C453.8 431.6 453.7 416.4 463.1 407.1L550.1 320.1L463.1 233.1C453.7 223.7 453.7 208.5 463.1 199.2z"/></svg>`,
|
||||
// 'test': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M112 472.8C112 503.3 136.7 528 167.2 528C181.8 528 195.9 522.2 206.2 511.8L350 368L193.9 368L128.1 433.8C117.8 444.1 112 458.2 112 472.8z"/><path d="M393 71C383.6 61.6 368.4 61.6 359.1 71C349.8 80.4 349.7 95.6 359.1 104.9L374.1 119.9L94.3 399.7C74.9 419.1 64.1 445.3 64.1 472.7C64.1 529.7 110.3 575.9 167.3 575.9C194.7 575.9 220.9 565 240.3 545.7L520 265.9L535 281C544.4 290.4 559.6 290.4 568.9 281C578.2 271.6 578.3 256.4 568.9 247.1L425 103L393 71zM242 320L408.1 153.9L486.2 232L398.2 320L242.1 320zM194 368L350.1 368L206.3 511.8C195.9 522.2 181.9 528 167.3 528C136.8 528 112.1 503.3 112.1 472.8C112.1 458.2 117.9 444.1 128.3 433.8L193.9 368z"/></svg>`,
|
||||
// 'performance': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M171.5 250.1L449.4 410.6C454.3 413.4 459.8 414.9 465.4 414.9L584.8 414.9C572.1 387.2 544.3 368 512 368L440 368C426.7 368 416 357.3 416 344C416 330.7 426.7 320 440 320L460 320L446.7 288L408 288C394.7 288 384 277.3 384 264C384 250.7 394.7 240 408 240L426.7 240L401.1 178.7L367.2 212.7C351.9 228 331.8 237.5 310.5 239.6L301.3 240C261.3 240 227.2 214.7 214 179.3L171.5 250.1z"/><path d="M216 496C229.3 496 240 506.7 240 520C240 533.3 229.3 544 216 544L56 544C42.7 544 32 533.3 32 520C32 506.7 42.7 496 56 496L216 496zM226.9 96C243 96 256 109 256 125.1L256 146.8C256 170.2 273.8 189.5 296.6 191.8L301.2 192C311.7 192 321.8 188.3 329.9 181.8L333.2 178.8L370.9 141.1C379.2 132.8 390.5 128.1 402.3 128.1C420.2 128.1 436.4 138.9 443.3 155.4L512 320C582.7 320 640 377.3 640 448L640 485.8C640 517.9 613.9 544 581.8 544L451 544L442.4 543.7C422.5 542.4 403.1 536.4 385.8 526.2L114.4 365.8C88.3 350.4 78.7 317.9 91.3 291.1L94.1 285.8L199.5 110.1C204.8 101.3 214.2 96 224.4 96L226.8 96zM135.3 310.5C132.4 315.3 134 321.6 138.9 324.5L410.3 484.9C422.6 492.2 436.7 496 451 496L581.8 496L583.9 495.8C587.9 495 591 491.8 591.8 487.9L592 485.8L592 462.9L465.3 462.9C451.3 462.9 437.5 459.2 425.3 452.2L146.7 291.4L135.2 310.6zM104 416C117.3 416 128 426.7 128 440C128 453.3 117.3 464 104 464L56 464C42.7 464 32 453.3 32 440C32 426.7 42.7 416 56 416L104 416zM367.2 212.7C351.9 228 331.8 237.5 310.5 239.6L301.3 240C261.3 240 227.2 214.7 214 179.3L171.5 250.1L449.4 410.5C454.3 413.3 459.8 414.8 465.4 414.8L584.8 414.8C572.1 387.2 544.3 368 512 368L440 368C426.7 368 416 357.3 416 344C416 330.7 426.7 320 440 320L460 320L446.7 288L408 288C394.7 288 384 277.3 384 264C384 250.7 394.7 240 408 240L426.7 240L401.1 178.7L367.2 212.7z"/></svg>`,
|
||||
// 'security': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M143.8 312L296.1 312L296.1 514.3C209.6 465.7 164.7 385.9 143.8 312zM344 123.6L503 191C508.9 193.5 512.1 198.8 512 203.8C511.9 221.7 510.4 242.2 506.9 264.1L344 264L344 123.6z"/><path d="M137.1 191C131.2 193.5 128 198.8 128.1 203.8C128.2 221.7 129.7 242.2 133.2 264.1L296.1 264.1L296.1 123.7L137.1 191.1zM143.8 312C164.7 385.9 209.7 465.7 296.1 514.3L296.1 312L143.8 312zM344 312L344 514.4C430.5 465.8 475.4 386 496.3 312L344 312zM506.9 264C510.4 242.1 511.9 221.7 512 203.7C512 198.7 508.9 193.5 503 190.9L344 123.5L344 263.9L506.9 263.9zM333.4 66.9L521.8 146.8C543.8 156.1 560.2 177.8 560.1 204C559.6 303.2 518.8 484.7 346.5 567.2C329.8 575.2 310.4 575.2 293.7 567.2C121.3 484.7 80.5 303.2 80.1 204C80 177.8 96.4 156.1 118.4 146.8L306.7 66.9C310.9 65 315.4 64 320 64C324.6 64 329.2 65 333.4 66.9z"/></svg>`,
|
||||
// 'users': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M168 544C181.3 544 192 533.3 192 520L192 504C192 446.6 238.6 400 296 400L344 400C401.4 400 448 446.6 448 504L448 520C448 533.3 458.7 544 472 544L168 544zM384 192C384 227.3 355.3 256 320 256C284.7 256 256 227.3 256 192C256 156.7 284.7 128 320 128C355.3 128 384 156.7 384 192z"/><path d="M320 256C355.3 256 384 227.3 384 192C384 156.7 355.3 128 320 128C284.7 128 256 156.7 256 192C256 227.3 284.7 256 320 256zM320 80C381.9 80 432 130.1 432 192C432 253.9 381.9 304 320 304C258.1 304 208 253.9 208 192C208 130.1 258.1 80 320 80zM296 400C238.6 400 192 446.6 192 504L192 520C192 533.3 181.3 544 168 544C154.7 544 144 533.3 144 520L144 504C144 420.1 212.1 352 296 352L344 352C427.9 352 496 420.1 496 504L496 520C496 533.3 485.3 544 472 544C458.7 544 448 533.3 448 520L448 504C448 446.6 401.4 400 344 400L296 400zM431.4 306.8C443.1 295.5 453 282.4 460.8 268C466.7 270.6 473.2 272 480 272C506.5 272 528 250.5 528 224C528 197.5 506.5 176 480 176L479.2 176C477.6 159.4 473.4 143.6 467.1 128.9C471.3 128.3 475.7 128 480 128C533 128 576 171 576 224C576 277 533 320 480 320C462.3 320 445.7 315.2 431.4 306.8zM160 128C164.4 128 168.7 128.3 172.9 128.9C166.6 143.6 162.4 159.5 160.8 176L160 176C133.5 176 112 197.5 112 224C112 250.5 133.5 272 160 272C166.8 272 173.3 270.6 179.2 268C187 282.4 196.9 295.5 208.6 306.8C194.4 315.2 177.8 320 160 320C107 320 64 277 64 224C64 171 107 128 160 128zM149.3 368C134.2 384.3 121.8 403 112.8 423.6C74.8 439.1 48 476.4 48 520C48 533.3 37.3 544 24 544C10.7 544 0 533.3 0 520C0 436.9 66.6 369.4 149.3 368zM527.2 423.6C518.2 403 505.7 384.2 490.7 368C573.4 369.4 640 436.9 640 520C640 533.3 629.3 544 616 544C602.7 544 592 533.3 592 520C592 476.4 565.2 439.1 527.2 423.6z"/></svg>`,
|
||||
// 'list-ordered': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d=""/><path d="M64 136C64 149.3 74.7 160 88 160L112 160L112 240L88 240C74.7 240 64 250.7 64 264C64 277.3 74.7 288 88 288L184 288C197.3 288 208 277.3 208 264C208 250.7 197.3 240 184 240L160 240L160 136C160 122.7 149.3 112 136 112L88 112C74.7 112 64 122.8 64 136zM256 160C256 173.3 266.7 184 280 184L552 184C565.3 184 576 173.3 576 160C576 146.7 565.3 136 552 136L280 136C266.7 136 256 146.7 256 160zM256 320C256 333.3 266.7 344 280 344L552 344C565.3 344 576 333.3 576 320C576 306.7 565.3 296 552 296L280 296C266.7 296 256 306.7 256 320zM256 480C256 493.3 266.7 504 280 504L552 504C565.3 504 576 493.3 576 480C576 466.7 565.3 456 552 456L280 456C266.7 456 256 466.7 256 480zM134 352C119.7 352 105.8 356.6 94.4 365.2L73.6 380.8C63 388.8 60.8 403.8 68.8 414.4C76.8 425 91.8 427.2 102.4 419.2L123.2 403.6C126.3 401.3 130.1 400 134 400L138.9 400C146.1 400 152 405.9 152 413.1C152 417.3 150 421.2 146.6 423.7L76.1 475C68.5 480.5 64 489.3 64 498.7C64 514.9 77.1 528 93.3 528L184 528C197.3 528 208 517.3 208 504C208 490.7 197.3 480 184 480L150.8 480L174.8 462.5C190.6 451 200 432.6 200 413.1C200 379.4 172.6 352 138.9 352L134 352z"/></svg>`,
|
||||
// 'tunnel': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M88 576C101.3 576 112 565.3 112 552L112 320C112 205.1 205.1 112 320 112C434.9 112 528 205.1 528 320L528 552C528 565.3 538.7 576 552 576L88 576zM175 535C165.6 544.4 165.6 559.6 175 568.9C184.4 578.2 199.6 578.3 208.9 568.9L265.9 511.9L374 511.9L431 568.9C440.4 578.3 455.6 578.3 464.9 568.9C474.2 559.5 474.3 544.3 464.9 535L428.4 498.5C449.9 484.2 464 459.7 464 432L464 272C464 227.8 428.2 192 384 192L256 192C211.8 192 176 227.8 176 272L176 432C176 459.7 190.1 484.2 211.5 498.5L175 535z"/><path d="M112 320C112 205.1 205.1 112 320 112C434.9 112 528 205.1 528 320L528 552C528 565.3 538.7 576 552 576C565.3 576 576 565.3 576 552L576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320L64 552C64 565.3 74.7 576 88 576C101.3 576 112 565.3 112 552L112 320zM416 272L416 320L224 320L224 272C224 254.3 238.3 240 256 240L384 240C401.7 240 416 254.3 416 272zM224 432L224 368L416 368L416 432C416 449.7 401.7 464 384 464L256 464C238.3 464 224 449.7 224 432zM256 192C211.8 192 176 227.8 176 272L176 432C176 459.7 190.1 484.2 211.5 498.5L175 535C165.6 544.4 165.6 559.6 175 568.9C184.4 578.2 199.6 578.3 208.9 568.9L265.9 511.9L374 511.9L431 568.9C440.4 578.3 455.6 578.3 464.9 568.9C474.2 559.5 474.3 544.3 464.9 535L428.4 498.5C449.9 484.2 464 459.7 464 432L464 272C464 227.8 428.2 192 384 192L256 192zM352 416C352 398.3 337.7 384 320 384C302.3 384 288 398.3 288 416C288 433.7 302.3 448 320 448C337.7 448 352 433.7 352 416z"/></svg>`,
|
||||
// 'user': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M88 576C101.3 576 112 565.3 112 552L112 320C112 205.1 205.1 112 320 112C434.9 112 528 205.1 528 320L528 552C528 565.3 538.7 576 552 576L88 576zM175 535C165.6 544.4 165.6 559.6 175 568.9C184.4 578.2 199.6 578.3 208.9 568.9L265.9 511.9L374 511.9L431 568.9C440.4 578.3 455.6 578.3 464.9 568.9C474.2 559.5 474.3 544.3 464.9 535L428.4 498.5C449.9 484.2 464 459.7 464 432L464 272C464 227.8 428.2 192 384 192L256 192C211.8 192 176 227.8 176 272L176 432C176 459.7 190.1 484.2 211.5 498.5L175 535z"/><path d="M112 320C112 205.1 205.1 112 320 112C434.9 112 528 205.1 528 320L528 552C528 565.3 538.7 576 552 576C565.3 576 576 565.3 576 552L576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320L64 552C64 565.3 74.7 576 88 576C101.3 576 112 565.3 112 552L112 320zM416 272L416 320L224 320L224 272C224 254.3 238.3 240 256 240L384 240C401.7 240 416 254.3 416 272zM224 432L224 368L416 368L416 432C416 449.7 401.7 464 384 464L256 464C238.3 464 224 449.7 224 432zM256 192C211.8 192 176 227.8 176 272L176 432C176 459.7 190.1 484.2 211.5 498.5L175 535C165.6 544.4 165.6 559.6 175 568.9C184.4 578.2 199.6 578.3 208.9 568.9L265.9 511.9L374 511.9L431 568.9C440.4 578.3 455.6 578.3 464.9 568.9C474.2 559.5 474.3 544.3 464.9 535L428.4 498.5C449.9 484.2 464 459.7 464 432L464 272C464 227.8 428.2 192 384 192L256 192zM352 416C352 398.3 337.7 384 320 384C302.3 384 288 398.3 288 416C288 433.7 302.3 448 320 448C337.7 448 352 433.7 352 416z"/></svg>`,
|
||||
// 'flag': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M144 165.5L240.6 141.3C267.6 134.6 296.1 137.7 321 150.1C375.9 177.5 439.7 179.8 496 156.9L496 398.7L471.6 407.8C437.9 420.4 400.4 418.5 368.2 402.4C320 378.3 264.9 372.3 212.6 385.3L144 402.5L144 165.5z"/><path d="M144 88C144 74.7 133.3 64 120 64C106.7 64 96 74.7 96 88L96 552C96 565.3 106.7 576 120 576C133.3 576 144 565.3 144 552L144 452L224.3 431.9C265.4 421.6 308.9 426.4 346.8 445.3C391 467.4 442.3 470.1 488.5 452.7L523.2 439.7C535.7 435 544 423.1 544 409.7L544 130C544 107 519.8 92 499.2 102.3L489.6 107.1C443.3 130.3 388.8 130.3 342.5 107.1C307.4 89.5 267.1 85.1 229 94.6L144 116L144 88zM144 165.5L240.6 141.3C267.6 134.6 296.1 137.7 321 150.1C375.9 177.5 439.7 179.8 496 156.9L496 398.7L471.6 407.8C437.9 420.4 400.4 418.5 368.2 402.4C320 378.3 264.9 372.3 212.6 385.3L144 402.5L144 165.5z"/></svg>`,
|
||||
// 'book-open': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M112 144L112 496L147.2 496C198 496 248.4 505 296 522.4L296 178L276.4 169.8C235.5 152.8 191.6 144 147.2 144L112 144zM144 216C144 202.7 154.7 192 168 192L172.2 192C199.5 192 226.3 198.3 250.7 210.5C262.6 216.4 267.4 230.8 261.4 242.7C255.4 254.6 241.1 259.4 229.2 253.4C211.5 244.5 192 239.9 172.2 239.9L168 239.9C154.7 239.9 144 229.2 144 215.9zM144 312C144 298.7 154.7 288 168 288L172.2 288C199.5 288 226.3 294.3 250.7 306.5C262.6 312.4 267.4 326.8 261.4 338.7C255.4 350.6 241.1 355.4 229.2 349.4C211.5 340.5 192 335.9 172.2 335.9L168 335.9C154.7 335.9 144 325.2 144 311.9zM144 408C144 394.7 154.7 384 168 384L172.2 384C199.5 384 226.3 390.3 250.7 402.5C262.6 408.4 267.4 422.8 261.4 434.7C255.4 446.6 241.1 451.4 229.2 445.4C211.5 436.5 192 431.9 172.2 431.9L168 431.9C154.7 431.9 144 421.2 144 407.9zM344 178L344 522.4C391.6 505 442 496 492.8 496L528 496L528 144L492.8 144C448.4 144 404.5 152.8 363.6 169.8L344 178zM378.5 242.7C372.6 230.8 377.4 216.4 389.2 210.5C413.6 198.3 440.5 192 467.7 192L471.9 192C485.2 192 495.9 202.7 495.9 216C495.9 229.3 485.2 240 471.9 240L467.7 240C447.9 240 428.4 244.6 410.7 253.5C398.8 259.4 384.4 254.6 378.5 242.8zM378.5 338.7C372.6 326.8 377.4 312.4 389.2 306.5C413.6 294.3 440.5 288 467.7 288L471.9 288C485.2 288 495.9 298.7 495.9 312C495.9 325.3 485.2 336 471.9 336L467.7 336C447.9 336 428.4 340.6 410.7 349.5C398.8 355.4 384.4 350.6 378.5 338.8zM378.5 434.7C372.6 422.8 377.4 408.4 389.2 402.5C413.6 390.3 440.5 384 467.7 384L471.9 384C485.2 384 495.9 394.7 495.9 408C495.9 421.3 485.2 432 471.9 432L467.7 432C447.9 432 428.4 436.6 410.7 445.5C398.8 451.4 384.4 446.6 378.5 434.8z"/><path d="M276.4 169.8L296 178L296 522.4C248.4 505 198 496 147.2 496L112 496L112 144L147.2 144C191.6 144 235.5 152.8 276.4 169.8zM492.8 496C442 496 391.6 505 344 522.4L344 178L363.6 169.8C404.5 152.8 448.4 144 492.8 144L528 144L528 496L492.8 496zM320 136L294.9 125.5C248.1 106 197.9 96 147.2 96L112 96C85.5 96 64 117.5 64 144L64 496C64 522.5 85.5 544 112 544L147.2 544C197.9 544 248.1 554 294.9 573.5L307.7 578.8C315.6 582.1 324.4 582.1 332.3 578.8L345.1 573.5C391.9 554 442.1 544 492.8 544L528 544C554.5 544 576 522.5 576 496L576 144C576 117.5 554.5 96 528 96L492.8 96C442.1 96 391.9 106 345.1 125.5L320 136zM168 192C154.7 192 144 202.7 144 216C144 229.3 154.7 240 168 240L172.2 240C192 240 211.5 244.6 229.2 253.5C241.1 259.4 255.5 254.6 261.4 242.8C267.3 231 262.5 216.5 250.7 210.6C226.3 198.4 199.4 192.1 172.2 192.1L168 192.1zM467.8 192C440.5 192 413.7 198.3 389.3 210.5C377.4 216.4 372.6 230.8 378.6 242.7C384.6 254.6 398.9 259.4 410.8 253.4C428.5 244.5 448 239.9 467.8 239.9L472 239.9C485.3 239.9 496 229.2 496 215.9C496 202.6 485.3 191.9 472 191.9L467.8 191.9zM168 288C154.7 288 144 298.7 144 312C144 325.3 154.7 336 168 336L172.2 336C192 336 211.5 340.6 229.2 349.5C241.1 355.4 255.5 350.6 261.4 338.8C267.3 327 262.5 312.5 250.7 306.6C226.3 294.4 199.4 288.1 172.2 288.1L168 288.1zM467.8 288C440.5 288 413.7 294.3 389.3 306.5C377.4 312.4 372.6 326.8 378.6 338.7C384.6 350.6 398.9 355.4 410.8 349.4C428.5 340.5 448 335.9 467.8 335.9L472 335.9C485.3 335.9 496 325.2 496 311.9C496 298.6 485.3 287.9 472 287.9L467.8 287.9zM168 384C154.7 384 144 394.7 144 408C144 421.3 154.7 432 168 432L172.2 432C192 432 211.5 436.6 229.2 445.5C241.1 451.4 255.5 446.6 261.4 434.8C267.3 423 262.5 408.5 250.7 402.6C226.3 390.4 199.4 384.1 172.2 384.1L168 384.1zM467.8 384C440.5 384 413.7 390.3 389.3 402.5C377.4 408.4 372.6 422.8 378.6 434.7C384.6 446.6 398.9 451.4 410.8 445.4C428.5 436.5 448 431.9 467.8 431.9L472 431.9C485.3 431.9 496 421.2 496 407.9C496 394.6 485.3 383.9 472 383.9L467.8 383.9z"/></svg>`,
|
||||
// 'shuffle': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d=""/><path d="M489 95L569 175C578.4 184.4 578.4 199.6 569 208.9L489 288.9C479.6 298.3 464.4 298.3 455.1 288.9C445.8 279.5 445.7 264.3 455.1 255L494.1 216L420 216C404.9 216 390.7 223.1 381.6 235.2L348 280L318 240L343.2 206.4C361.3 182.2 389.8 168 420 168L494.1 168L455.1 129C445.7 119.6 445.7 104.4 455.1 95.1C464.5 85.8 479.7 85.7 489 95.1zM258 400L232.8 433.6C214.7 457.8 186.2 472 156 472L88 472C74.7 472 64 461.3 64 448C64 434.7 74.7 424 88 424L156 424C171.1 424 185.3 416.9 194.4 404.8L228 360L258 400zM455 351C464.4 341.6 479.6 341.6 488.9 351L568.9 431C578.3 440.4 578.3 455.6 568.9 464.9L488.9 544.9C479.5 554.3 464.3 554.3 455 544.9C445.7 535.5 445.6 520.3 455 511L494 472L419.9 472C389.7 472 361.2 457.8 343.1 433.6L194.4 235.2C185.3 223.1 171.1 216 156 216L88 216C74.7 216 64 205.3 64 192C64 178.7 74.7 168 88 168L156 168C186.2 168 214.7 182.2 232.8 206.4L381.6 404.8C390.7 416.9 404.9 424 420 424L494.1 424L455.1 385C445.7 375.6 445.7 360.4 455.1 351.1z"/></svg>`,
|
||||
'pie-chart': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M112.4 336C112.4 442 198.4 528 304.4 528C329 528 352.4 523.4 373.9 515.1L257 373.9C246.3 361 240.4 344.7 240.4 328L240.4 154.9C165.8 181.3 112.4 252.4 112.4 336z"/><path d="M384.4 118L384.4 256L522.4 256C505 188.6 451.9 135.4 384.4 118zM240.4 328L240.4 154.9C165.8 181.3 112.4 252.4 112.4 336C112.4 442 198.4 528 304.4 528C329 528 352.4 523.4 373.9 515.1L257 373.9C246.3 361 240.4 344.7 240.4 328zM574.3 272.1C576.6 289.6 562.1 304 544.4 304L368.4 304C350.7 304 336.4 289.7 336.4 272L336.4 96C336.4 78.3 350.8 63.8 368.3 66.1C475.3 80.3 560.1 165.1 574.3 272.1zM288.4 130.7L288.4 328C288.4 333.6 290.4 339 293.9 343.3L426 502.7C437.7 516.8 435.2 538.1 419.1 546.8C385 565.4 345.9 576 304.4 576C171.9 576 64.4 468.5 64.4 336C64.4 220.5 145.9 124.1 254.6 101.2C272.7 97.4 288.4 112.2 288.4 130.7zM573.7 352C592.2 352 607 367.7 603.2 385.8C593 434.2 568.2 477.2 533.6 510C521.3 521.7 502 519.2 491.2 506.1L406.9 404.4C389.6 383.5 404.5 352 431.5 352L573.7 352z"/></svg>`,
|
||||
'help-circle': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M112 320C112 434.9 205.1 528 320 528C434.9 528 528 434.9 528 320C528 205.1 434.9 112 320 112C205.1 112 112 205.1 112 320zM240 272C240 227.8 275.8 192 320 192C364.2 192 400 227.8 400 272C400 319.2 364 339.2 344 346.5L344 350.3C344 363.6 333.3 374.3 320 374.3C306.7 374.3 296 363.6 296 350.3L296 342.2C296 321.7 310.8 307 326.1 302C332.5 299.9 339.3 296.5 344.3 291.7C348.6 287.5 352 281.7 352 272.1C352 254.4 337.7 240.1 320 240.1C302.3 240.1 288 254.4 288 272.1C288 285.4 277.3 296.1 264 296.1C250.7 296.1 240 285.4 240 272.1zM352 432C352 449.7 337.7 464 320 464C302.3 464 288 449.7 288 432C288 414.3 302.3 400 320 400C337.7 400 352 414.3 352 432z"/><path d="M528 320C528 205.1 434.9 112 320 112C205.1 112 112 205.1 112 320C112 434.9 205.1 528 320 528C434.9 528 528 434.9 528 320zM64 320C64 178.6 178.6 64 320 64C461.4 64 576 178.6 576 320C576 461.4 461.4 576 320 576C178.6 576 64 461.4 64 320zM320 240C302.3 240 288 254.3 288 272C288 285.3 277.3 296 264 296C250.7 296 240 285.3 240 272C240 227.8 275.8 192 320 192C364.2 192 400 227.8 400 272C400 319.2 364 339.2 344 346.5L344 350.3C344 363.6 333.3 374.3 320 374.3C306.7 374.3 296 363.6 296 350.3L296 342.2C296 321.7 310.8 307 326.1 302C332.5 299.9 339.3 296.5 344.3 291.7C348.6 287.5 352 281.7 352 272.1C352 254.4 337.7 240.1 320 240.1zM288 432C288 414.3 302.3 400 320 400C337.7 400 352 414.3 352 432C352 449.7 337.7 464 320 464C302.3 464 288 449.7 288 432z"/></svg>`,
|
||||
'balance-scale': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d=""/><path d="M520 112L393.3 112C381 83.7 352.8 64 320 64C287.2 64 259 83.7 246.7 112L120 112C106.7 112 96 122.7 96 136C96 149.3 106.7 160 120 160L241.6 160C247.4 188.6 268.5 211.7 296 220.3L296 528L120 528C106.7 528 96 538.7 96 552C96 565.3 106.7 576 120 576L520 576C533.3 576 544 565.3 544 552C544 538.7 533.3 528 520 528L344 528L344 220.3C371.5 211.7 392.6 188.6 398.4 160L520 160C533.3 160 544 149.3 544 136C544 122.7 533.3 112 520 112zM512 259.8L584.4 384L439.6 384L512 259.8zM386 401.1C396.8 446 449.1 480 512 480C574.9 480 627.2 446 638 401.1C640.6 390.1 637 378.8 631.3 369L536.1 205.8C531.1 197.2 521.9 192 512 192C502.1 192 492.9 197.3 487.9 205.8L392.7 369.1C387 378.9 383.4 390.2 386 401.2zM54.4 384L126.8 259.8L199.2 384L54.3 384zM126.8 480C189.7 480 242 446 252.8 401.1C255.4 390.1 251.8 378.8 246.1 369L150.9 205.8C145.9 197.2 136.7 192 126.8 192C116.9 192 107.7 197.3 102.7 205.8L7.6 369.1C1.9 378.8-1.8 390.1 .9 401.1C11.7 446 64 480 126.8 480zM320 112C337.7 112 352 126.3 352 144C352 161.7 337.7 176 320 176C302.3 176 288 161.7 288 144C288 126.3 302.3 112 320 112z"/></svg>`,
|
||||
code: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d=""/><path d="M369.1 80.9C373 68.2 386.5 61.2 399.1 65.1C411.7 69 418.8 82.5 414.9 95.1L270.9 559.1C267 571.8 253.5 578.8 240.9 574.9C228.3 571 221.2 557.5 225.1 544.9L369.1 80.9zM177 199C186.4 208.4 186.4 223.6 177 232.9L90 319.9L177 406.9C186.4 416.3 186.4 431.5 177 440.8C167.6 450.1 152.4 450.2 143.1 440.8L39 337C29.6 327.6 29.6 312.4 39 303.1L143 199C152.4 189.6 167.6 189.6 176.9 199zM463 199C472.4 189.6 487.6 189.6 496.9 199L601 303C610.4 312.4 610.4 327.6 601 336.9L497 441C487.6 450.4 472.4 450.4 463.1 441C453.8 431.6 453.7 416.4 463.1 407.1L550.1 320.1L463.1 233.1C453.7 223.7 453.7 208.5 463.1 199.2z"/></svg>`,
|
||||
test: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M112 472.8C112 503.3 136.7 528 167.2 528C181.8 528 195.9 522.2 206.2 511.8L350 368L193.9 368L128.1 433.8C117.8 444.1 112 458.2 112 472.8z"/><path d="M393 71C383.6 61.6 368.4 61.6 359.1 71C349.8 80.4 349.7 95.6 359.1 104.9L374.1 119.9L94.3 399.7C74.9 419.1 64.1 445.3 64.1 472.7C64.1 529.7 110.3 575.9 167.3 575.9C194.7 575.9 220.9 565 240.3 545.7L520 265.9L535 281C544.4 290.4 559.6 290.4 568.9 281C578.2 271.6 578.3 256.4 568.9 247.1L425 103L393 71zM242 320L408.1 153.9L486.2 232L398.2 320L242.1 320zM194 368L350.1 368L206.3 511.8C195.9 522.2 181.9 528 167.3 528C136.8 528 112.1 503.3 112.1 472.8C112.1 458.2 117.9 444.1 128.3 433.8L193.9 368z"/></svg>`,
|
||||
performance: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M171.5 250.1L449.4 410.6C454.3 413.4 459.8 414.9 465.4 414.9L584.8 414.9C572.1 387.2 544.3 368 512 368L440 368C426.7 368 416 357.3 416 344C416 330.7 426.7 320 440 320L460 320L446.7 288L408 288C394.7 288 384 277.3 384 264C384 250.7 394.7 240 408 240L426.7 240L401.1 178.7L367.2 212.7C351.9 228 331.8 237.5 310.5 239.6L301.3 240C261.3 240 227.2 214.7 214 179.3L171.5 250.1z"/><path d="M216 496C229.3 496 240 506.7 240 520C240 533.3 229.3 544 216 544L56 544C42.7 544 32 533.3 32 520C32 506.7 42.7 496 56 496L216 496zM226.9 96C243 96 256 109 256 125.1L256 146.8C256 170.2 273.8 189.5 296.6 191.8L301.2 192C311.7 192 321.8 188.3 329.9 181.8L333.2 178.8L370.9 141.1C379.2 132.8 390.5 128.1 402.3 128.1C420.2 128.1 436.4 138.9 443.3 155.4L512 320C582.7 320 640 377.3 640 448L640 485.8C640 517.9 613.9 544 581.8 544L451 544L442.4 543.7C422.5 542.4 403.1 536.4 385.8 526.2L114.4 365.8C88.3 350.4 78.7 317.9 91.3 291.1L94.1 285.8L199.5 110.1C204.8 101.3 214.2 96 224.4 96L226.8 96zM135.3 310.5C132.4 315.3 134 321.6 138.9 324.5L410.3 484.9C422.6 492.2 436.7 496 451 496L581.8 496L583.9 495.8C587.9 495 591 491.8 591.8 487.9L592 485.8L592 462.9L465.3 462.9C451.3 462.9 437.5 459.2 425.3 452.2L146.7 291.4L135.2 310.6zM104 416C117.3 416 128 426.7 128 440C128 453.3 117.3 464 104 464L56 464C42.7 464 32 453.3 32 440C32 426.7 42.7 416 56 416L104 416zM367.2 212.7C351.9 228 331.8 237.5 310.5 239.6L301.3 240C261.3 240 227.2 214.7 214 179.3L171.5 250.1L449.4 410.5C454.3 413.3 459.8 414.8 465.4 414.8L584.8 414.8C572.1 387.2 544.3 368 512 368L440 368C426.7 368 416 357.3 416 344C416 330.7 426.7 320 440 320L460 320L446.7 288L408 288C394.7 288 384 277.3 384 264C384 250.7 394.7 240 408 240L426.7 240L401.1 178.7L367.2 212.7z"/></svg>`,
|
||||
security: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M143.8 312L296.1 312L296.1 514.3C209.6 465.7 164.7 385.9 143.8 312zM344 123.6L503 191C508.9 193.5 512.1 198.8 512 203.8C511.9 221.7 510.4 242.2 506.9 264.1L344 264L344 123.6z"/><path d="M137.1 191C131.2 193.5 128 198.8 128.1 203.8C128.2 221.7 129.7 242.2 133.2 264.1L296.1 264.1L296.1 123.7L137.1 191.1zM143.8 312C164.7 385.9 209.7 465.7 296.1 514.3L296.1 312L143.8 312zM344 312L344 514.4C430.5 465.8 475.4 386 496.3 312L344 312zM506.9 264C510.4 242.1 511.9 221.7 512 203.7C512 198.7 508.9 193.5 503 190.9L344 123.5L344 263.9L506.9 263.9zM333.4 66.9L521.8 146.8C543.8 156.1 560.2 177.8 560.1 204C559.6 303.2 518.8 484.7 346.5 567.2C329.8 575.2 310.4 575.2 293.7 567.2C121.3 484.7 80.5 303.2 80.1 204C80 177.8 96.4 156.1 118.4 146.8L306.7 66.9C310.9 65 315.4 64 320 64C324.6 64 329.2 65 333.4 66.9z"/></svg>`,
|
||||
users: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M168 544C181.3 544 192 533.3 192 520L192 504C192 446.6 238.6 400 296 400L344 400C401.4 400 448 446.6 448 504L448 520C448 533.3 458.7 544 472 544L168 544zM384 192C384 227.3 355.3 256 320 256C284.7 256 256 227.3 256 192C256 156.7 284.7 128 320 128C355.3 128 384 156.7 384 192z"/><path d="M320 256C355.3 256 384 227.3 384 192C384 156.7 355.3 128 320 128C284.7 128 256 156.7 256 192C256 227.3 284.7 256 320 256zM320 80C381.9 80 432 130.1 432 192C432 253.9 381.9 304 320 304C258.1 304 208 253.9 208 192C208 130.1 258.1 80 320 80zM296 400C238.6 400 192 446.6 192 504L192 520C192 533.3 181.3 544 168 544C154.7 544 144 533.3 144 520L144 504C144 420.1 212.1 352 296 352L344 352C427.9 352 496 420.1 496 504L496 520C496 533.3 485.3 544 472 544C458.7 544 448 533.3 448 520L448 504C448 446.6 401.4 400 344 400L296 400zM431.4 306.8C443.1 295.5 453 282.4 460.8 268C466.7 270.6 473.2 272 480 272C506.5 272 528 250.5 528 224C528 197.5 506.5 176 480 176L479.2 176C477.6 159.4 473.4 143.6 467.1 128.9C471.3 128.3 475.7 128 480 128C533 128 576 171 576 224C576 277 533 320 480 320C462.3 320 445.7 315.2 431.4 306.8zM160 128C164.4 128 168.7 128.3 172.9 128.9C166.6 143.6 162.4 159.5 160.8 176L160 176C133.5 176 112 197.5 112 224C112 250.5 133.5 272 160 272C166.8 272 173.3 270.6 179.2 268C187 282.4 196.9 295.5 208.6 306.8C194.4 315.2 177.8 320 160 320C107 320 64 277 64 224C64 171 107 128 160 128zM149.3 368C134.2 384.3 121.8 403 112.8 423.6C74.8 439.1 48 476.4 48 520C48 533.3 37.3 544 24 544C10.7 544 0 533.3 0 520C0 436.9 66.6 369.4 149.3 368zM527.2 423.6C518.2 403 505.7 384.2 490.7 368C573.4 369.4 640 436.9 640 520C640 533.3 629.3 544 616 544C602.7 544 592 533.3 592 520C592 476.4 565.2 439.1 527.2 423.6z"/></svg>`,
|
||||
'list-ordered': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d=""/><path d="M64 136C64 149.3 74.7 160 88 160L112 160L112 240L88 240C74.7 240 64 250.7 64 264C64 277.3 74.7 288 88 288L184 288C197.3 288 208 277.3 208 264C208 250.7 197.3 240 184 240L160 240L160 136C160 122.7 149.3 112 136 112L88 112C74.7 112 64 122.8 64 136zM256 160C256 173.3 266.7 184 280 184L552 184C565.3 184 576 173.3 576 160C576 146.7 565.3 136 552 136L280 136C266.7 136 256 146.7 256 160zM256 320C256 333.3 266.7 344 280 344L552 344C565.3 344 576 333.3 576 320C576 306.7 565.3 296 552 296L280 296C266.7 296 256 306.7 256 320zM256 480C256 493.3 266.7 504 280 504L552 504C565.3 504 576 493.3 576 480C576 466.7 565.3 456 552 456L280 456C266.7 456 256 466.7 256 480zM134 352C119.7 352 105.8 356.6 94.4 365.2L73.6 380.8C63 388.8 60.8 403.8 68.8 414.4C76.8 425 91.8 427.2 102.4 419.2L123.2 403.6C126.3 401.3 130.1 400 134 400L138.9 400C146.1 400 152 405.9 152 413.1C152 417.3 150 421.2 146.6 423.7L76.1 475C68.5 480.5 64 489.3 64 498.7C64 514.9 77.1 528 93.3 528L184 528C197.3 528 208 517.3 208 504C208 490.7 197.3 480 184 480L150.8 480L174.8 462.5C190.6 451 200 432.6 200 413.1C200 379.4 172.6 352 138.9 352L134 352z"/></svg>`,
|
||||
tunnel: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M88 576C101.3 576 112 565.3 112 552L112 320C112 205.1 205.1 112 320 112C434.9 112 528 205.1 528 320L528 552C528 565.3 538.7 576 552 576L88 576zM175 535C165.6 544.4 165.6 559.6 175 568.9C184.4 578.2 199.6 578.3 208.9 568.9L265.9 511.9L374 511.9L431 568.9C440.4 578.3 455.6 578.3 464.9 568.9C474.2 559.5 474.3 544.3 464.9 535L428.4 498.5C449.9 484.2 464 459.7 464 432L464 272C464 227.8 428.2 192 384 192L256 192C211.8 192 176 227.8 176 272L176 432C176 459.7 190.1 484.2 211.5 498.5L175 535z"/><path d="M112 320C112 205.1 205.1 112 320 112C434.9 112 528 205.1 528 320L528 552C528 565.3 538.7 576 552 576C565.3 576 576 565.3 576 552L576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320L64 552C64 565.3 74.7 576 88 576C101.3 576 112 565.3 112 552L112 320zM416 272L416 320L224 320L224 272C224 254.3 238.3 240 256 240L384 240C401.7 240 416 254.3 416 272zM224 432L224 368L416 368L416 432C416 449.7 401.7 464 384 464L256 464C238.3 464 224 449.7 224 432zM256 192C211.8 192 176 227.8 176 272L176 432C176 459.7 190.1 484.2 211.5 498.5L175 535C165.6 544.4 165.6 559.6 175 568.9C184.4 578.2 199.6 578.3 208.9 568.9L265.9 511.9L374 511.9L431 568.9C440.4 578.3 455.6 578.3 464.9 568.9C474.2 559.5 474.3 544.3 464.9 535L428.4 498.5C449.9 484.2 464 459.7 464 432L464 272C464 227.8 428.2 192 384 192L256 192zM352 416C352 398.3 337.7 384 320 384C302.3 384 288 398.3 288 416C288 433.7 302.3 448 320 448C337.7 448 352 433.7 352 416z"/></svg>`,
|
||||
user: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M88 576C101.3 576 112 565.3 112 552L112 320C112 205.1 205.1 112 320 112C434.9 112 528 205.1 528 320L528 552C528 565.3 538.7 576 552 576L88 576zM175 535C165.6 544.4 165.6 559.6 175 568.9C184.4 578.2 199.6 578.3 208.9 568.9L265.9 511.9L374 511.9L431 568.9C440.4 578.3 455.6 578.3 464.9 568.9C474.2 559.5 474.3 544.3 464.9 535L428.4 498.5C449.9 484.2 464 459.7 464 432L464 272C464 227.8 428.2 192 384 192L256 192C211.8 192 176 227.8 176 272L176 432C176 459.7 190.1 484.2 211.5 498.5L175 535z"/><path d="M112 320C112 205.1 205.1 112 320 112C434.9 112 528 205.1 528 320L528 552C528 565.3 538.7 576 552 576C565.3 576 576 565.3 576 552L576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320L64 552C64 565.3 74.7 576 88 576C101.3 576 112 565.3 112 552L112 320zM416 272L416 320L224 320L224 272C224 254.3 238.3 240 256 240L384 240C401.7 240 416 254.3 416 272zM224 432L224 368L416 368L416 432C416 449.7 401.7 464 384 464L256 464C238.3 464 224 449.7 224 432zM256 192C211.8 192 176 227.8 176 272L176 432C176 459.7 190.1 484.2 211.5 498.5L175 535C165.6 544.4 165.6 559.6 175 568.9C184.4 578.2 199.6 578.3 208.9 568.9L265.9 511.9L374 511.9L431 568.9C440.4 578.3 455.6 578.3 464.9 568.9C474.2 559.5 474.3 544.3 464.9 535L428.4 498.5C449.9 484.2 464 459.7 464 432L464 272C464 227.8 428.2 192 384 192L256 192zM352 416C352 398.3 337.7 384 320 384C302.3 384 288 398.3 288 416C288 433.7 302.3 448 320 448C337.7 448 352 433.7 352 416z"/></svg>`,
|
||||
flag: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M144 165.5L240.6 141.3C267.6 134.6 296.1 137.7 321 150.1C375.9 177.5 439.7 179.8 496 156.9L496 398.7L471.6 407.8C437.9 420.4 400.4 418.5 368.2 402.4C320 378.3 264.9 372.3 212.6 385.3L144 402.5L144 165.5z"/><path d="M144 88C144 74.7 133.3 64 120 64C106.7 64 96 74.7 96 88L96 552C96 565.3 106.7 576 120 576C133.3 576 144 565.3 144 552L144 452L224.3 431.9C265.4 421.6 308.9 426.4 346.8 445.3C391 467.4 442.3 470.1 488.5 452.7L523.2 439.7C535.7 435 544 423.1 544 409.7L544 130C544 107 519.8 92 499.2 102.3L489.6 107.1C443.3 130.3 388.8 130.3 342.5 107.1C307.4 89.5 267.1 85.1 229 94.6L144 116L144 88zM144 165.5L240.6 141.3C267.6 134.6 296.1 137.7 321 150.1C375.9 177.5 439.7 179.8 496 156.9L496 398.7L471.6 407.8C437.9 420.4 400.4 418.5 368.2 402.4C320 378.3 264.9 372.3 212.6 385.3L144 402.5L144 165.5z"/></svg>`,
|
||||
'book-open': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M112 144L112 496L147.2 496C198 496 248.4 505 296 522.4L296 178L276.4 169.8C235.5 152.8 191.6 144 147.2 144L112 144zM144 216C144 202.7 154.7 192 168 192L172.2 192C199.5 192 226.3 198.3 250.7 210.5C262.6 216.4 267.4 230.8 261.4 242.7C255.4 254.6 241.1 259.4 229.2 253.4C211.5 244.5 192 239.9 172.2 239.9L168 239.9C154.7 239.9 144 229.2 144 215.9zM144 312C144 298.7 154.7 288 168 288L172.2 288C199.5 288 226.3 294.3 250.7 306.5C262.6 312.4 267.4 326.8 261.4 338.7C255.4 350.6 241.1 355.4 229.2 349.4C211.5 340.5 192 335.9 172.2 335.9L168 335.9C154.7 335.9 144 325.2 144 311.9zM144 408C144 394.7 154.7 384 168 384L172.2 384C199.5 384 226.3 390.3 250.7 402.5C262.6 408.4 267.4 422.8 261.4 434.7C255.4 446.6 241.1 451.4 229.2 445.4C211.5 436.5 192 431.9 172.2 431.9L168 431.9C154.7 431.9 144 421.2 144 407.9zM344 178L344 522.4C391.6 505 442 496 492.8 496L528 496L528 144L492.8 144C448.4 144 404.5 152.8 363.6 169.8L344 178zM378.5 242.7C372.6 230.8 377.4 216.4 389.2 210.5C413.6 198.3 440.5 192 467.7 192L471.9 192C485.2 192 495.9 202.7 495.9 216C495.9 229.3 485.2 240 471.9 240L467.7 240C447.9 240 428.4 244.6 410.7 253.5C398.8 259.4 384.4 254.6 378.5 242.8zM378.5 338.7C372.6 326.8 377.4 312.4 389.2 306.5C413.6 294.3 440.5 288 467.7 288L471.9 288C485.2 288 495.9 298.7 495.9 312C495.9 325.3 485.2 336 471.9 336L467.7 336C447.9 336 428.4 340.6 410.7 349.5C398.8 355.4 384.4 350.6 378.5 338.8zM378.5 434.7C372.6 422.8 377.4 408.4 389.2 402.5C413.6 390.3 440.5 384 467.7 384L471.9 384C485.2 384 495.9 394.7 495.9 408C495.9 421.3 485.2 432 471.9 432L467.7 432C447.9 432 428.4 436.6 410.7 445.5C398.8 451.4 384.4 446.6 378.5 434.8z"/><path d="M276.4 169.8L296 178L296 522.4C248.4 505 198 496 147.2 496L112 496L112 144L147.2 144C191.6 144 235.5 152.8 276.4 169.8zM492.8 496C442 496 391.6 505 344 522.4L344 178L363.6 169.8C404.5 152.8 448.4 144 492.8 144L528 144L528 496L492.8 496zM320 136L294.9 125.5C248.1 106 197.9 96 147.2 96L112 96C85.5 96 64 117.5 64 144L64 496C64 522.5 85.5 544 112 544L147.2 544C197.9 544 248.1 554 294.9 573.5L307.7 578.8C315.6 582.1 324.4 582.1 332.3 578.8L345.1 573.5C391.9 554 442.1 544 492.8 544L528 544C554.5 544 576 522.5 576 496L576 144C576 117.5 554.5 96 528 96L492.8 96C442.1 96 391.9 106 345.1 125.5L320 136zM168 192C154.7 192 144 202.7 144 216C144 229.3 154.7 240 168 240L172.2 240C192 240 211.5 244.6 229.2 253.5C241.1 259.4 255.5 254.6 261.4 242.8C267.3 231 262.5 216.5 250.7 210.6C226.3 198.4 199.4 192.1 172.2 192.1L168 192.1zM467.8 192C440.5 192 413.7 198.3 389.3 210.5C377.4 216.4 372.6 230.8 378.6 242.7C384.6 254.6 398.9 259.4 410.8 253.4C428.5 244.5 448 239.9 467.8 239.9L472 239.9C485.3 239.9 496 229.2 496 215.9C496 202.6 485.3 191.9 472 191.9L467.8 191.9zM168 288C154.7 288 144 298.7 144 312C144 325.3 154.7 336 168 336L172.2 336C192 336 211.5 340.6 229.2 349.5C241.1 355.4 255.5 350.6 261.4 338.8C267.3 327 262.5 312.5 250.7 306.6C226.3 294.4 199.4 288.1 172.2 288.1L168 288.1zM467.8 288C440.5 288 413.7 294.3 389.3 306.5C377.4 312.4 372.6 326.8 378.6 338.7C384.6 350.6 398.9 355.4 410.8 349.4C428.5 340.5 448 335.9 467.8 335.9L472 335.9C485.3 335.9 496 325.2 496 311.9C496 298.6 485.3 287.9 472 287.9L467.8 287.9zM168 384C154.7 384 144 394.7 144 408C144 421.3 154.7 432 168 432L172.2 432C192 432 211.5 436.6 229.2 445.5C241.1 451.4 255.5 446.6 261.4 434.8C267.3 423 262.5 408.5 250.7 402.6C226.3 390.4 199.4 384.1 172.2 384.1L168 384.1zM467.8 384C440.5 384 413.7 390.3 389.3 402.5C377.4 408.4 372.6 422.8 378.6 434.7C384.6 446.6 398.9 451.4 410.8 445.4C428.5 436.5 448 431.9 467.8 431.9L472 431.9C485.3 431.9 496 421.2 496 407.9C496 394.6 485.3 383.9 472 383.9L467.8 383.9z"/></svg>`,
|
||||
shuffle: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d=""/><path d="M489 95L569 175C578.4 184.4 578.4 199.6 569 208.9L489 288.9C479.6 298.3 464.4 298.3 455.1 288.9C445.8 279.5 445.7 264.3 455.1 255L494.1 216L420 216C404.9 216 390.7 223.1 381.6 235.2L348 280L318 240L343.2 206.4C361.3 182.2 389.8 168 420 168L494.1 168L455.1 129C445.7 119.6 445.7 104.4 455.1 95.1C464.5 85.8 479.7 85.7 489 95.1zM258 400L232.8 433.6C214.7 457.8 186.2 472 156 472L88 472C74.7 472 64 461.3 64 448C64 434.7 74.7 424 88 424L156 424C171.1 424 185.3 416.9 194.4 404.8L228 360L258 400zM455 351C464.4 341.6 479.6 341.6 488.9 351L568.9 431C578.3 440.4 578.3 455.6 568.9 464.9L488.9 544.9C479.5 554.3 464.3 554.3 455 544.9C445.7 535.5 445.6 520.3 455 511L494 472L419.9 472C389.7 472 361.2 457.8 343.1 433.6L194.4 235.2C185.3 223.1 171.1 216 156 216L88 216C74.7 216 64 205.3 64 192C64 178.7 74.7 168 88 168L156 168C186.2 168 214.7 182.2 232.8 206.4L381.6 404.8C390.7 416.9 404.9 424 420 424L494.1 424L455.1 385C445.7 375.6 445.7 360.4 455.1 351.1z"/></svg>`,
|
||||
// 'template': ``,
|
||||
// 'share': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M112 320C112 346.5 133.5 368 160 368C186.5 368 208 346.5 208 320C208 293.5 186.5 272 160 272C133.5 272 112 293.5 112 320zM400 160C400 186.5 421.5 208 448 208C474.5 208 496 186.5 496 160C496 133.5 474.5 112 448 112C421.5 112 400 133.5 400 160zM400 480C400 506.5 421.5 528 448 528C474.5 528 496 506.5 496 480C496 453.5 474.5 432 448 432C421.5 432 400 453.5 400 480z"/><path d="M496 160C496 133.5 474.5 112 448 112C421.5 112 400 133.5 400 160C400 186.5 421.5 208 448 208C474.5 208 496 186.5 496 160zM544 160C544 213 501 256 448 256C420.6 256 395.9 244.5 378.4 226.1L252.9 295.8C254.9 303.5 256 311.6 256 320C256 328.4 254.9 336.5 252.9 344.2L378.4 413.9C395.9 395.5 420.6 384 448 384C501 384 544 427 544 480C544 533 501 576 448 576C395 576 352 533 352 480C352 471.7 353.1 463.5 355.1 455.8L229.6 386.1C212.1 404.5 187.4 416 160 416C107 416 64 373 64 320C64 267 107 224 160 224C187.4 224 212.1 235.5 229.6 253.9L355.1 184.2C353.1 176.5 352 168.4 352 160C352 107 395 64 448 64C501 64 544 107 544 160zM208 320C208 293.5 186.5 272 160 272C133.5 272 112 293.5 112 320C112 346.5 133.5 368 160 368C186.5 368 208 346.5 208 320zM448 528C474.5 528 496 506.5 496 480C496 453.5 474.5 432 448 432C421.5 432 400 453.5 400 480C400 506.5 421.5 528 448 528z"/></svg>`,
|
||||
// 'list-checks': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d=""/><path d="M203.7 133.8C211.3 122.9 208.7 108 197.8 100.4C186.9 92.8 172 95.4 164.4 106.3L124.7 162.8L105 143C95.6 133.7 80.4 133.7 71 143C61.6 152.3 61.7 167.6 71 177L111 217C116 222 123 224.6 130.1 223.9C137.2 223.2 143.6 219.6 147.7 213.8L203.7 133.8zM203.7 293.8C211.3 282.9 208.7 268 197.8 260.4C186.9 252.8 172 255.4 164.4 266.3L124.7 322.8L105 303C95.6 293.6 80.4 293.6 71.1 303C61.8 312.4 61.7 327.6 71 337L111 377C116 382 123 384.6 130.1 383.9C137.2 383.2 143.6 379.6 147.7 373.8L203.7 293.8zM256 160C256 173.3 266.7 184 280 184L552 184C565.3 184 576 173.3 576 160C576 146.7 565.3 136 552 136L280 136C266.7 136 256 146.7 256 160zM256 320C256 333.3 266.7 344 280 344L552 344C565.3 344 576 333.3 576 320C576 306.7 565.3 296 552 296L280 296C266.7 296 256 306.7 256 320zM224 480C224 493.3 234.7 504 248 504L552 504C565.3 504 576 493.3 576 480C576 466.7 565.3 456 552 456L248 456C234.7 456 224 466.7 224 480zM160 480C160 462.3 145.7 448 128 448C110.3 448 96 462.3 96 480C96 497.7 110.3 512 128 512C145.7 512 160 497.7 160 480z"/></svg>`,
|
||||
// 'clipboard-list': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d=""/><path d="M203.7 133.8C211.3 122.9 208.7 108 197.8 100.4C186.9 92.8 172 95.4 164.4 106.3L124.7 162.8L105 143C95.6 133.7 80.4 133.7 71 143C61.6 152.3 61.7 167.6 71 177L111 217C116 222 123 224.6 130.1 223.9C137.2 223.2 143.6 219.6 147.7 213.8L203.7 133.8zM203.7 293.8C211.3 282.9 208.7 268 197.8 260.4C186.9 252.8 172 255.4 164.4 266.3L124.7 322.8L105 303C95.6 293.6 80.4 293.6 71.1 303C61.8 312.4 61.7 327.6 71 337L111 377C116 382 123 384.6 130.1 383.9C137.2 383.2 143.6 379.6 147.7 373.8L203.7 293.8zM256 160C256 173.3 266.7 184 280 184L552 184C565.3 184 576 173.3 576 160C576 146.7 565.3 136 552 136L280 136C266.7 136 256 146.7 256 160zM256 320C256 333.3 266.7 344 280 344L552 344C565.3 344 576 333.3 576 320C576 306.7 565.3 296 552 296L280 296C266.7 296 256 306.7 256 320zM224 480C224 493.3 234.7 504 248 504L552 504C565.3 504 576 493.3 576 480C576 466.7 565.3 456 552 456L248 456C234.7 456 224 466.7 224 480zM160 480C160 462.3 145.7 448 128 448C110.3 448 96 462.3 96 480C96 497.7 110.3 512 128 512C145.7 512 160 497.7 160 480z"/></svg>`,
|
||||
share: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d="M112 320C112 346.5 133.5 368 160 368C186.5 368 208 346.5 208 320C208 293.5 186.5 272 160 272C133.5 272 112 293.5 112 320zM400 160C400 186.5 421.5 208 448 208C474.5 208 496 186.5 496 160C496 133.5 474.5 112 448 112C421.5 112 400 133.5 400 160zM400 480C400 506.5 421.5 528 448 528C474.5 528 496 506.5 496 480C496 453.5 474.5 432 448 432C421.5 432 400 453.5 400 480z"/><path d="M496 160C496 133.5 474.5 112 448 112C421.5 112 400 133.5 400 160C400 186.5 421.5 208 448 208C474.5 208 496 186.5 496 160zM544 160C544 213 501 256 448 256C420.6 256 395.9 244.5 378.4 226.1L252.9 295.8C254.9 303.5 256 311.6 256 320C256 328.4 254.9 336.5 252.9 344.2L378.4 413.9C395.9 395.5 420.6 384 448 384C501 384 544 427 544 480C544 533 501 576 448 576C395 576 352 533 352 480C352 471.7 353.1 463.5 355.1 455.8L229.6 386.1C212.1 404.5 187.4 416 160 416C107 416 64 373 64 320C64 267 107 224 160 224C187.4 224 212.1 235.5 229.6 253.9L355.1 184.2C353.1 176.5 352 168.4 352 160C352 107 395 64 448 64C501 64 544 107 544 160zM208 320C208 293.5 186.5 272 160 272C133.5 272 112 293.5 112 320C112 346.5 133.5 368 160 368C186.5 368 208 346.5 208 320zM448 528C474.5 528 496 506.5 496 480C496 453.5 474.5 432 448 432C421.5 432 400 453.5 400 480C400 506.5 421.5 528 448 528z"/></svg>`,
|
||||
'list-checks': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d=""/><path d="M203.7 133.8C211.3 122.9 208.7 108 197.8 100.4C186.9 92.8 172 95.4 164.4 106.3L124.7 162.8L105 143C95.6 133.7 80.4 133.7 71 143C61.6 152.3 61.7 167.6 71 177L111 217C116 222 123 224.6 130.1 223.9C137.2 223.2 143.6 219.6 147.7 213.8L203.7 133.8zM203.7 293.8C211.3 282.9 208.7 268 197.8 260.4C186.9 252.8 172 255.4 164.4 266.3L124.7 322.8L105 303C95.6 293.6 80.4 293.6 71.1 303C61.8 312.4 61.7 327.6 71 337L111 377C116 382 123 384.6 130.1 383.9C137.2 383.2 143.6 379.6 147.7 373.8L203.7 293.8zM256 160C256 173.3 266.7 184 280 184L552 184C565.3 184 576 173.3 576 160C576 146.7 565.3 136 552 136L280 136C266.7 136 256 146.7 256 160zM256 320C256 333.3 266.7 344 280 344L552 344C565.3 344 576 333.3 576 320C576 306.7 565.3 296 552 296L280 296C266.7 296 256 306.7 256 320zM224 480C224 493.3 234.7 504 248 504L552 504C565.3 504 576 493.3 576 480C576 466.7 565.3 456 552 456L248 456C234.7 456 224 466.7 224 480zM160 480C160 462.3 145.7 448 128 448C110.3 448 96 462.3 96 480C96 497.7 110.3 512 128 512C145.7 512 160 497.7 160 480z"/></svg>`,
|
||||
'clipboard-list': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path opacity=".4" d=""/><path d="M203.7 133.8C211.3 122.9 208.7 108 197.8 100.4C186.9 92.8 172 95.4 164.4 106.3L124.7 162.8L105 143C95.6 133.7 80.4 133.7 71 143C61.6 152.3 61.7 167.6 71 177L111 217C116 222 123 224.6 130.1 223.9C137.2 223.2 143.6 219.6 147.7 213.8L203.7 133.8zM203.7 293.8C211.3 282.9 208.7 268 197.8 260.4C186.9 252.8 172 255.4 164.4 266.3L124.7 322.8L105 303C95.6 293.6 80.4 293.6 71.1 303C61.8 312.4 61.7 327.6 71 337L111 377C116 382 123 384.6 130.1 383.9C137.2 383.2 143.6 379.6 147.7 373.8L203.7 293.8zM256 160C256 173.3 266.7 184 280 184L552 184C565.3 184 576 173.3 576 160C576 146.7 565.3 136 552 136L280 136C266.7 136 256 146.7 256 160zM256 320C256 333.3 266.7 344 280 344L552 344C565.3 344 576 333.3 576 320C576 306.7 565.3 296 552 296L280 296C266.7 296 256 306.7 256 320zM224 480C224 493.3 234.7 504 248 504L552 504C565.3 504 576 493.3 576 480C576 466.7 565.3 456 552 456L248 456C234.7 456 224 466.7 224 480zM160 480C160 462.3 145.7 448 128 448C110.3 448 96 462.3 96 480C96 497.7 110.3 512 128 512C145.7 512 160 497.7 160 480z"/></svg>`,
|
||||
// 'edit-3': ``,
|
||||
// 'mail-check': ``,
|
||||
// 'eye': ``,
|
||||
|
||||
@@ -1425,6 +1425,27 @@ export const SUB_NAV: Record<string, (NavItem | NavGroup)[]> = {
|
||||
'internet routing',
|
||||
],
|
||||
},
|
||||
{
|
||||
href: makePath('/diagnostics/network/asn-geo-lookup'),
|
||||
label: 'ASN & Geolocation Lookup',
|
||||
description: 'Look up IP address geolocation, ISP, and autonomous system information',
|
||||
icon: 'map-pin',
|
||||
keywords: [
|
||||
'asn',
|
||||
'geolocation',
|
||||
'ip',
|
||||
'lookup',
|
||||
'location',
|
||||
'isp',
|
||||
'organization',
|
||||
'country',
|
||||
'city',
|
||||
'coordinates',
|
||||
'autonomous system',
|
||||
'network',
|
||||
'provider',
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
@@ -0,0 +1,221 @@
|
||||
export const asnGeoContent = {
|
||||
title: 'ASN & Geolocation Lookup',
|
||||
description: 'Look up IP address geolocation, ISP, and autonomous system information',
|
||||
sections: {
|
||||
whatIsGeoIP: {
|
||||
title: 'What is IP Geolocation?',
|
||||
content:
|
||||
'IP geolocation is the mapping of an IP address to its real-world geographic location. Combined with ASN (Autonomous System Number) data, it provides comprehensive information about the network ownership, ISP, and approximate physical location of an IP address.',
|
||||
},
|
||||
howItWorks: {
|
||||
title: 'How Geolocation Works',
|
||||
content: 'Geolocation databases map IP address ranges to locations by combining data from:',
|
||||
steps: [
|
||||
'Regional Internet Registries (RIRs) - Provide IP allocation data',
|
||||
'ISP registration records - Organization and network details',
|
||||
'User-submitted data - Crowdsourced location corrections',
|
||||
'Active probing - Latency measurements and traceroutes',
|
||||
'Wi-Fi and mobile data - Location signals from devices',
|
||||
],
|
||||
},
|
||||
dataProvided: {
|
||||
title: 'Information Provided',
|
||||
categories: [
|
||||
{
|
||||
category: 'Network Information',
|
||||
fields: [
|
||||
{ field: 'ASN', description: 'Autonomous System Number of the network' },
|
||||
{ field: 'Organization', description: 'Network owner or operator' },
|
||||
{ field: 'ISP', description: 'Internet Service Provider name' },
|
||||
],
|
||||
},
|
||||
{
|
||||
category: 'Geographic Location',
|
||||
fields: [
|
||||
{ field: 'Country', description: 'Country name and code' },
|
||||
{ field: 'Region/State', description: 'Administrative region' },
|
||||
{ field: 'City', description: 'City name (approximate)' },
|
||||
{ field: 'Coordinates', description: 'Latitude and longitude' },
|
||||
{ field: 'Timezone', description: 'Local timezone identifier' },
|
||||
],
|
||||
},
|
||||
{
|
||||
category: 'Connection Type',
|
||||
fields: [
|
||||
{ field: 'Mobile', description: 'Whether the IP is from a mobile network' },
|
||||
{ field: 'Proxy', description: 'If the IP is a known proxy/VPN' },
|
||||
{ field: 'Hosting', description: 'If the IP belongs to a datacenter/hosting provider' },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
accuracy: {
|
||||
title: 'Accuracy Considerations',
|
||||
levels: [
|
||||
{
|
||||
level: 'Country',
|
||||
accuracy: '95-99%',
|
||||
description: 'Very high accuracy for country-level identification',
|
||||
},
|
||||
{
|
||||
level: 'Region/State',
|
||||
accuracy: '75-85%',
|
||||
description: 'Good accuracy but can vary by country and ISP',
|
||||
},
|
||||
{
|
||||
level: 'City',
|
||||
accuracy: '50-75%',
|
||||
description: 'Moderate accuracy; actual location may be in nearby cities',
|
||||
},
|
||||
{
|
||||
level: 'Coordinates',
|
||||
accuracy: '10-50 km radius',
|
||||
description: 'Approximate location; not precise enough for exact addresses',
|
||||
},
|
||||
],
|
||||
},
|
||||
useCases: {
|
||||
title: 'Common Use Cases',
|
||||
cases: [
|
||||
{
|
||||
scenario: 'Content Localization',
|
||||
use: 'Serve region-appropriate content and language',
|
||||
action: 'Check country and timezone for automatic localization',
|
||||
},
|
||||
{
|
||||
scenario: 'Fraud Detection',
|
||||
use: 'Identify suspicious access patterns',
|
||||
action: 'Compare login location with user profile and detect proxies',
|
||||
},
|
||||
{
|
||||
scenario: 'Analytics & Insights',
|
||||
use: 'Understand user demographics and traffic sources',
|
||||
action: 'Analyze geographic distribution of visitors',
|
||||
},
|
||||
{
|
||||
scenario: 'Compliance & Restrictions',
|
||||
use: 'Enforce geographic access policies',
|
||||
action: 'Block or allow access based on country or region',
|
||||
},
|
||||
{
|
||||
scenario: 'Network Troubleshooting',
|
||||
use: 'Identify network path and routing issues',
|
||||
action: 'Check ISP, ASN, and location of problem connections',
|
||||
},
|
||||
{
|
||||
scenario: 'Security Analysis',
|
||||
use: 'Detect datacenter/proxy usage',
|
||||
action: 'Flag hosting and proxy IPs for additional verification',
|
||||
},
|
||||
],
|
||||
},
|
||||
limitations: {
|
||||
title: 'Limitations & Privacy',
|
||||
points: [
|
||||
{
|
||||
limitation: 'Not Precise Location',
|
||||
description:
|
||||
'IP geolocation cannot pinpoint exact addresses or buildings. Accuracy is typically at city level or broader.',
|
||||
},
|
||||
{
|
||||
limitation: 'VPNs and Proxies',
|
||||
description:
|
||||
'Users with VPNs or proxies will appear to be in the VPN server location, not their actual location.',
|
||||
},
|
||||
{
|
||||
limitation: 'Mobile Networks',
|
||||
description:
|
||||
'Mobile IPs may show central office locations rather than user location due to carrier-grade NAT.',
|
||||
},
|
||||
{
|
||||
limitation: 'Dynamic IPs',
|
||||
description: 'IP addresses can be reassigned, so historical data may not reflect current location.',
|
||||
},
|
||||
{
|
||||
limitation: 'Privacy Concerns',
|
||||
description: 'Geolocation can reveal general location; always handle with appropriate privacy safeguards.',
|
||||
},
|
||||
],
|
||||
},
|
||||
asnExplained: {
|
||||
title: 'Understanding ASN Data',
|
||||
content:
|
||||
'An Autonomous System Number (ASN) identifies a network on the Internet. Each ASN represents a collection of IP prefixes under common administrative control.',
|
||||
aspects: [
|
||||
{
|
||||
aspect: 'Network Ownership',
|
||||
description: 'ASN reveals which organization operates the network',
|
||||
example: 'AS15169 belongs to Google LLC',
|
||||
},
|
||||
{
|
||||
aspect: 'ISP Identification',
|
||||
description: 'Identifies the Internet Service Provider',
|
||||
example: 'Residential users typically share ISP ASN',
|
||||
},
|
||||
{
|
||||
aspect: 'Routing Analysis',
|
||||
description: 'ASN is crucial for BGP routing and peering',
|
||||
example: 'Large networks may have multiple ASNs',
|
||||
},
|
||||
{
|
||||
aspect: 'Network Type',
|
||||
description: 'ASN can indicate hosting, residential, or mobile networks',
|
||||
example: 'Datacenter ASNs often host multiple services',
|
||||
},
|
||||
],
|
||||
},
|
||||
bestPractices: {
|
||||
title: 'Best Practices',
|
||||
practices: [
|
||||
{
|
||||
practice: 'Never Rely Solely on Geolocation',
|
||||
description: 'Use as one signal among many, not the sole decision factor',
|
||||
reason: 'Accuracy varies and can be circumvented',
|
||||
},
|
||||
{
|
||||
practice: 'Cache Results Appropriately',
|
||||
description: 'Cache geolocation data but refresh periodically',
|
||||
reason: 'IP allocations change over time',
|
||||
},
|
||||
{
|
||||
practice: 'Handle Privacy Responsibly',
|
||||
description: 'Be transparent about geolocation usage',
|
||||
reason: 'Users have privacy expectations and legal rights',
|
||||
},
|
||||
{
|
||||
practice: 'Consider Proxy Detection',
|
||||
description: 'Check hosting and proxy flags for security decisions',
|
||||
reason: 'Helps identify potentially suspicious traffic',
|
||||
},
|
||||
{
|
||||
practice: 'Combine Multiple Data Points',
|
||||
description: 'Use geolocation with other signals (browser, language, etc.)',
|
||||
reason: 'Improves accuracy and reduces false positives',
|
||||
},
|
||||
],
|
||||
},
|
||||
dataSource: {
|
||||
title: 'About IP-API',
|
||||
content:
|
||||
'This tool uses IP-API.com, a free geolocation API that provides accurate location data sourced from multiple regional registries and ISP databases.',
|
||||
features: [
|
||||
'Supports both IPv4 and IPv6 addresses',
|
||||
'Country, region, city, and coordinate data',
|
||||
'ISP, organization, and ASN information',
|
||||
'Mobile, proxy, and hosting detection',
|
||||
'Timezone identification',
|
||||
'No authentication required for basic usage',
|
||||
],
|
||||
},
|
||||
},
|
||||
quickTips: [
|
||||
'City-level accuracy is approximate; actual location may vary by 10-50km',
|
||||
'VPN users will appear in the VPN server location, not their real location',
|
||||
'Mobile IPs often show carrier hub locations due to CGNAT',
|
||||
'Hosting flag indicates datacenter IPs (servers, cloud instances)',
|
||||
'Proxy flag helps identify VPN, proxy, and anonymization services',
|
||||
'ASN reveals network ownership; same ASN often means same organization',
|
||||
'Coordinates are based on IP allocation, not GPS or device location',
|
||||
'Timezone data is useful for scheduling and displaying local times',
|
||||
],
|
||||
};
|
||||
@@ -0,0 +1,121 @@
|
||||
import { json, error } from '@sveltejs/kit';
|
||||
import type { RequestHandler } from './$types';
|
||||
|
||||
interface ASNGeoRequest {
|
||||
ip: string;
|
||||
}
|
||||
|
||||
interface ASNGeoResponse {
|
||||
ip: string;
|
||||
asn?: number;
|
||||
asnOrg?: string;
|
||||
isp?: string;
|
||||
organization?: string;
|
||||
country?: string;
|
||||
countryCode?: string;
|
||||
region?: string;
|
||||
regionName?: string;
|
||||
city?: string;
|
||||
zip?: string;
|
||||
latitude?: number;
|
||||
longitude?: number;
|
||||
timezone?: string;
|
||||
mobile?: boolean;
|
||||
proxy?: boolean;
|
||||
hosting?: boolean;
|
||||
timestamp: string;
|
||||
}
|
||||
|
||||
async function lookupIPAPI(ip: string): Promise<any> {
|
||||
const controller = new AbortController();
|
||||
const timeoutId = setTimeout(() => controller.abort(), 10000);
|
||||
|
||||
try {
|
||||
// Using ip-api.com (free, no auth required, allows HTTPS)
|
||||
const url = `http://ip-api.com/json/${encodeURIComponent(ip)}?fields=status,message,country,countryCode,region,regionName,city,zip,lat,lon,timezone,isp,org,as,asname,mobile,proxy,hosting,query`;
|
||||
const response = await fetch(url, {
|
||||
headers: { Accept: 'application/json' },
|
||||
signal: controller.signal,
|
||||
});
|
||||
|
||||
clearTimeout(timeoutId);
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(`IP-API failed: ${response.status}`);
|
||||
}
|
||||
|
||||
return await response.json();
|
||||
} catch (err) {
|
||||
clearTimeout(timeoutId);
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
export const POST: RequestHandler = async ({ request }) => {
|
||||
try {
|
||||
const body: ASNGeoRequest = await request.json();
|
||||
const { ip } = body;
|
||||
|
||||
if (!ip || typeof ip !== 'string' || !ip.trim()) {
|
||||
throw error(400, 'IP address is required');
|
||||
}
|
||||
|
||||
const trimmedIP = ip.trim();
|
||||
|
||||
// Basic IP validation
|
||||
const ipv4Regex = /^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$/;
|
||||
const ipv6Regex =
|
||||
/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;
|
||||
|
||||
if (!ipv4Regex.test(trimmedIP) && !ipv6Regex.test(trimmedIP)) {
|
||||
throw error(400, 'Invalid IP address format');
|
||||
}
|
||||
|
||||
// Lookup IP information
|
||||
const data = await lookupIPAPI(trimmedIP);
|
||||
|
||||
if (data.status === 'fail') {
|
||||
throw error(404, data.message || 'IP lookup failed');
|
||||
}
|
||||
|
||||
// Parse ASN from the 'as' field (format: "AS15169 Google LLC")
|
||||
let asn: number | undefined;
|
||||
let asnOrg: string | undefined;
|
||||
if (data.as) {
|
||||
const asParts = data.as.match(/^AS(\d+)\s*(.*)$/);
|
||||
if (asParts) {
|
||||
asn = parseInt(asParts[1], 10);
|
||||
asnOrg = asParts[2] || data.asname;
|
||||
}
|
||||
}
|
||||
|
||||
const response: ASNGeoResponse = {
|
||||
ip: data.query || trimmedIP,
|
||||
asn,
|
||||
asnOrg,
|
||||
isp: data.isp,
|
||||
organization: data.org,
|
||||
country: data.country,
|
||||
countryCode: data.countryCode,
|
||||
region: data.region,
|
||||
regionName: data.regionName,
|
||||
city: data.city,
|
||||
zip: data.zip,
|
||||
latitude: data.lat,
|
||||
longitude: data.lon,
|
||||
timezone: data.timezone,
|
||||
mobile: data.mobile || false,
|
||||
proxy: data.proxy || false,
|
||||
hosting: data.hosting || false,
|
||||
timestamp: new Date().toISOString(),
|
||||
};
|
||||
|
||||
return json(response);
|
||||
} catch (err) {
|
||||
console.error('ASN/Geo lookup error:', err);
|
||||
if (err && typeof err === 'object' && 'status' in err) {
|
||||
throw err;
|
||||
}
|
||||
throw error(500, `ASN/Geo lookup failed: ${err instanceof Error ? err.message : 'Unknown error'}`);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,625 @@
|
||||
<script lang="ts">
|
||||
import { tooltip } from '$lib/actions/tooltip.js';
|
||||
import Icon from '$lib/components/global/Icon.svelte';
|
||||
import { asnGeoContent } from '$lib/content/asn-geo';
|
||||
import '../../../../styles/diagnostics-pages.scss';
|
||||
|
||||
interface ASNGeoResponse {
|
||||
ip: string;
|
||||
asn?: number;
|
||||
asnOrg?: string;
|
||||
isp?: string;
|
||||
organization?: string;
|
||||
country?: string;
|
||||
countryCode?: string;
|
||||
region?: string;
|
||||
regionName?: string;
|
||||
city?: string;
|
||||
zip?: string;
|
||||
latitude?: number;
|
||||
longitude?: number;
|
||||
timezone?: string;
|
||||
mobile?: boolean;
|
||||
proxy?: boolean;
|
||||
hosting?: boolean;
|
||||
timestamp: string;
|
||||
}
|
||||
|
||||
let ip = $state('8.8.8.8');
|
||||
let loading = $state(false);
|
||||
let results = $state<ASNGeoResponse | null>(null);
|
||||
let error = $state<string | null>(null);
|
||||
let copiedState = $state(false);
|
||||
let selectedExampleIndex = $state<number | null>(null);
|
||||
|
||||
const examples = [
|
||||
{ ip: '8.8.8.8', description: 'Google Public DNS' },
|
||||
{ ip: '2.58.47.0', description: 'M247 Proton' },
|
||||
{ ip: '1.1.1.1', description: 'Cloudflare DNS' },
|
||||
{ ip: '140.82.121.4', description: 'GitHub' },
|
||||
{ ip: '151.101.1.140', description: 'Fastly CDN' },
|
||||
{ ip: '2606:4700:4700::1111', description: 'Cloudflare IPv6' },
|
||||
];
|
||||
|
||||
async function lookupIP() {
|
||||
loading = true;
|
||||
error = null;
|
||||
results = null;
|
||||
|
||||
try {
|
||||
const response = await fetch('/api/internal/diagnostics/asn-geo', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ ip: ip.trim() }),
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
const errorData = await response.json().catch(() => ({ message: `HTTP ${response.status}` }));
|
||||
throw new Error(errorData.message || `Lookup failed: ${response.status}`);
|
||||
}
|
||||
|
||||
results = await response.json();
|
||||
} catch (err: unknown) {
|
||||
error = err instanceof Error ? err.message : 'Unknown error occurred';
|
||||
} finally {
|
||||
loading = false;
|
||||
}
|
||||
}
|
||||
|
||||
function loadExample(example: (typeof examples)[0], index: number) {
|
||||
ip = example.ip;
|
||||
selectedExampleIndex = index;
|
||||
lookupIP();
|
||||
}
|
||||
|
||||
function clearExampleSelection() {
|
||||
selectedExampleIndex = null;
|
||||
}
|
||||
|
||||
async function copyResults() {
|
||||
if (!results) return;
|
||||
|
||||
let text = `ASN & Geolocation Lookup for ${results.ip}\n`;
|
||||
text += `Generated at: ${results.timestamp}\n\n`;
|
||||
|
||||
if (results.asn) {
|
||||
text += `ASN: AS${results.asn}\n`;
|
||||
if (results.asnOrg) text += `AS Organization: ${results.asnOrg}\n`;
|
||||
}
|
||||
if (results.isp) text += `ISP: ${results.isp}\n`;
|
||||
if (results.organization) text += `Organization: ${results.organization}\n`;
|
||||
|
||||
text += `\nLocation:\n`;
|
||||
if (results.city) text += `City: ${results.city}\n`;
|
||||
if (results.regionName) text += `Region: ${results.regionName}\n`;
|
||||
if (results.country) text += `Country: ${results.country} (${results.countryCode})\n`;
|
||||
if (results.zip) text += `ZIP: ${results.zip}\n`;
|
||||
if (results.timezone) text += `Timezone: ${results.timezone}\n`;
|
||||
|
||||
if (results.latitude !== undefined && results.longitude !== undefined) {
|
||||
text += `\nCoordinates: ${results.latitude}, ${results.longitude}\n`;
|
||||
}
|
||||
|
||||
text += `\nConnection Type:\n`;
|
||||
text += `Mobile: ${results.mobile ? 'Yes' : 'No'}\n`;
|
||||
text += `Proxy/VPN: ${results.proxy ? 'Yes' : 'No'}\n`;
|
||||
text += `Hosting/Datacenter: ${results.hosting ? 'Yes' : 'No'}\n`;
|
||||
|
||||
await navigator.clipboard.writeText(text);
|
||||
copiedState = true;
|
||||
setTimeout(() => (copiedState = false), 1500);
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="card">
|
||||
<header class="card-header">
|
||||
<h1>{asnGeoContent.title}</h1>
|
||||
<p>{asnGeoContent.description}</p>
|
||||
</header>
|
||||
|
||||
<!-- Examples -->
|
||||
<div class="card examples-card">
|
||||
<details class="examples-details">
|
||||
<summary class="examples-summary">
|
||||
<Icon name="chevron-right" size="xs" />
|
||||
<h4>Example Lookups</h4>
|
||||
</summary>
|
||||
<div class="examples-grid">
|
||||
{#each examples as example, i (i)}
|
||||
<button
|
||||
class="example-card"
|
||||
class:selected={selectedExampleIndex === i}
|
||||
onclick={() => loadExample(example, i)}
|
||||
use:tooltip={`Look up ${example.ip}`}
|
||||
>
|
||||
<h5>{example.ip}</h5>
|
||||
<p>{example.description}</p>
|
||||
</button>
|
||||
{/each}
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
|
||||
<!-- Input Form -->
|
||||
<div class="card input-card">
|
||||
<div class="card-header">
|
||||
<h3>IP Lookup</h3>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div class="lookup-form">
|
||||
<div class="input-row">
|
||||
<label for="ip" use:tooltip={'Enter an IPv4 or IPv6 address'}> IP Address </label>
|
||||
<input
|
||||
id="ip"
|
||||
type="text"
|
||||
bind:value={ip}
|
||||
placeholder="8.8.8.8 or 2001:4860:4860::8888"
|
||||
onchange={() => {
|
||||
clearExampleSelection();
|
||||
if (ip.trim()) lookupIP();
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<button class="lookup-btn" onclick={lookupIP} disabled={loading || !ip.trim()}>
|
||||
{#if loading}
|
||||
<Icon name="loader" size="sm" animate="spin" />
|
||||
Looking up...
|
||||
{:else}
|
||||
<Icon name="search" size="sm" />
|
||||
Lookup
|
||||
{/if}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Results -->
|
||||
{#if results}
|
||||
<div class="card results-card">
|
||||
<div class="card-header row">
|
||||
<h3>Results for {results.ip}</h3>
|
||||
<button class="copy-btn" onclick={copyResults} disabled={copiedState}>
|
||||
<Icon name={copiedState ? 'check' : 'copy'} size="xs" />
|
||||
{copiedState ? 'Copied!' : 'Copy Results'}
|
||||
</button>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div class="results-grid">
|
||||
<!-- Network Information -->
|
||||
<div class="result-card">
|
||||
<h4>Network Information</h4>
|
||||
<div class="info-list">
|
||||
{#if results.asn}
|
||||
<div class="info-item">
|
||||
<Icon name="hash" size="sm" />
|
||||
<div class="info-content">
|
||||
<span class="info-label">ASN</span>
|
||||
<span class="info-value asn-badge">AS{results.asn}</span>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{#if results.asnOrg}
|
||||
<div class="info-item">
|
||||
<Icon name="building" size="sm" />
|
||||
<div class="info-content">
|
||||
<span class="info-label">Organization</span>
|
||||
<span class="info-value">{results.asnOrg}</span>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{#if results.isp}
|
||||
<div class="info-item">
|
||||
<Icon name="wifi" size="sm" />
|
||||
<div class="info-content">
|
||||
<span class="info-label">ISP</span>
|
||||
<span class="info-value">{results.isp}</span>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Geographic Location -->
|
||||
<div class="result-card">
|
||||
<h4>Geographic Location</h4>
|
||||
<div class="info-list">
|
||||
{#if results.country}
|
||||
<div class="info-item">
|
||||
<Icon name="flag" size="sm" />
|
||||
<div class="info-content">
|
||||
<span class="info-label">Country</span>
|
||||
<span class="info-value">{results.country} ({results.countryCode})</span>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{#if results.regionName}
|
||||
<div class="info-item">
|
||||
<Icon name="map-pin" size="sm" />
|
||||
<div class="info-content">
|
||||
<span class="info-label">Region</span>
|
||||
<span class="info-value">{results.regionName}</span>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{#if results.city}
|
||||
<div class="info-item">
|
||||
<Icon name="building" size="sm" />
|
||||
<div class="info-content">
|
||||
<span class="info-label">City</span>
|
||||
<span class="info-value">{results.city}</span>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{#if results.timezone}
|
||||
<div class="info-item">
|
||||
<Icon name="clock" size="sm" />
|
||||
<div class="info-content">
|
||||
<span class="info-label">Timezone</span>
|
||||
<span class="info-value">{results.timezone}</span>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Coordinates -->
|
||||
{#if results.latitude !== undefined && results.longitude !== undefined}
|
||||
<div class="result-card">
|
||||
<h4>Coordinates</h4>
|
||||
<div class="coordinates-display">
|
||||
<div class="coordinate-info">
|
||||
<div class="coordinate-item">
|
||||
<Icon name="navigation" size="md" />
|
||||
<div class="coordinate-values">
|
||||
<div class="coordinate-row">
|
||||
<span class="coordinate-label">Latitude:</span>
|
||||
<span class="coordinate-value">{results.latitude.toFixed(4)}°</span>
|
||||
</div>
|
||||
<div class="coordinate-row">
|
||||
<span class="coordinate-label">Longitude:</span>
|
||||
<span class="coordinate-value">{results.longitude.toFixed(4)}°</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a
|
||||
href={`https://www.openstreetmap.org/?mlat=${results.latitude}&mlon=${results.longitude}&zoom=12`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="map-link"
|
||||
>
|
||||
<Icon name="external-link" size="xs" />
|
||||
View full map
|
||||
</a>
|
||||
</div>
|
||||
<div class="map-container">
|
||||
<iframe
|
||||
title="Location map"
|
||||
src={`https://www.openstreetmap.org/export/embed.html?bbox=${results.longitude - 0.1},${results.latitude - 0.1},${results.longitude + 0.1},${results.latitude + 0.1}&layer=mapnik&marker=${results.latitude},${results.longitude}`}
|
||||
style="border: 0"
|
||||
></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<!-- Connection Type -->
|
||||
<div class="result-card">
|
||||
<h4>Connection Type</h4>
|
||||
<div class="connection-flags">
|
||||
<div class="flag-item" class:active={results.mobile}>
|
||||
<Icon name={results.mobile ? 'check-circle' : 'circle'} size="sm" />
|
||||
<span>Mobile Network</span>
|
||||
</div>
|
||||
<div class="flag-item" class:active={results.proxy}>
|
||||
<Icon name={results.proxy ? 'check-circle' : 'circle'} size="sm" />
|
||||
<span>Proxy/VPN</span>
|
||||
</div>
|
||||
<div class="flag-item" class:active={results.hosting}>
|
||||
<Icon name={results.hosting ? 'check-circle' : 'circle'} size="sm" />
|
||||
<span>Hosting/Datacenter</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{#if error}
|
||||
<div class="card error-card">
|
||||
<div class="card-content">
|
||||
<div class="error-content">
|
||||
<Icon name="alert-triangle" size="md" />
|
||||
<div>
|
||||
<strong>Lookup Failed</strong>
|
||||
<p>{error}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<!-- Educational Content -->
|
||||
<div class="card info-card">
|
||||
<div class="card-header">
|
||||
<h3>About ASN & Geolocation</h3>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div class="info-grid">
|
||||
<div class="info-section">
|
||||
<h4>{asnGeoContent.sections.whatIsGeoIP.title}</h4>
|
||||
<p>{asnGeoContent.sections.whatIsGeoIP.content}</p>
|
||||
</div>
|
||||
|
||||
<div class="info-section">
|
||||
<h4>{asnGeoContent.sections.accuracy.title}</h4>
|
||||
<ul>
|
||||
{#each asnGeoContent.sections.accuracy.levels as level (level.level)}
|
||||
<li>
|
||||
<strong>{level.level} ({level.accuracy}):</strong>
|
||||
{level.description}
|
||||
</li>
|
||||
{/each}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="info-section">
|
||||
<h4>{asnGeoContent.sections.asnExplained.title}</h4>
|
||||
<p>{asnGeoContent.sections.asnExplained.content}</p>
|
||||
</div>
|
||||
|
||||
<div class="info-section">
|
||||
<h4>{asnGeoContent.sections.dataSource.title}</h4>
|
||||
<p>{asnGeoContent.sections.dataSource.content}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="quick-tips">
|
||||
<h4>Quick Tips</h4>
|
||||
<ul>
|
||||
{#each asnGeoContent.quickTips as tip, idx (idx)}
|
||||
<li>{tip}</li>
|
||||
{/each}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
.lookup-form {
|
||||
display: flex;
|
||||
gap: var(--spacing-md);
|
||||
align-items: flex-end;
|
||||
|
||||
label {
|
||||
display: block;
|
||||
margin-bottom: var(--spacing-sm);
|
||||
color: var(--text-primary);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
}
|
||||
|
||||
.input-row {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
|
||||
input {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.lookup-btn {
|
||||
flex-shrink: 0;
|
||||
white-space: nowrap;
|
||||
@media (max-width: 768px) {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.results-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: var(--spacing-lg);
|
||||
|
||||
@media (max-width: 768px) {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
.result-card {
|
||||
background: var(--bg-secondary);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--spacing-lg);
|
||||
|
||||
h4 {
|
||||
margin: 0 0 var(--spacing-md) 0;
|
||||
color: var(--text-primary);
|
||||
font-size: var(--font-size-md);
|
||||
}
|
||||
}
|
||||
|
||||
.info-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--spacing-md);
|
||||
}
|
||||
|
||||
.info-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
gap: var(--spacing-sm);
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.info-content {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--spacing-xs);
|
||||
}
|
||||
|
||||
.info-label {
|
||||
font-size: var(--font-size-xs);
|
||||
color: var(--text-secondary);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.info-value {
|
||||
font-size: var(--font-size-sm);
|
||||
color: var(--text-primary);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.asn-badge {
|
||||
font-family: var(--font-mono);
|
||||
font-weight: 700;
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
.coordinates-display {
|
||||
display: flex;
|
||||
gap: var(--spacing-md);
|
||||
align-items: flex-start;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
.coordinate-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--spacing-md);
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.coordinate-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-md);
|
||||
}
|
||||
|
||||
.coordinate-values {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--spacing-xs);
|
||||
}
|
||||
|
||||
.coordinate-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: var(--spacing-md);
|
||||
font-size: var(--font-size-sm);
|
||||
}
|
||||
|
||||
.coordinate-label {
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.coordinate-value {
|
||||
font-family: var(--font-mono);
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.map-link {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-xs);
|
||||
padding: var(--spacing-xs) var(--spacing-sm);
|
||||
font-size: var(--font-size-sm);
|
||||
color: var(--color-primary);
|
||||
text-decoration: none;
|
||||
border: 1px solid var(--color-primary);
|
||||
border-radius: var(--radius-sm);
|
||||
transition: all 0.2s;
|
||||
|
||||
&:hover {
|
||||
background: color-mix(in srgb, var(--color-primary), transparent 90%);
|
||||
}
|
||||
}
|
||||
|
||||
.map-container {
|
||||
flex: 1;
|
||||
min-width: 200px;
|
||||
height: 150px;
|
||||
border-radius: var(--radius-sm);
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--border-color);
|
||||
|
||||
iframe {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
.connection-flags {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--spacing-sm);
|
||||
}
|
||||
|
||||
.flag-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--spacing-sm);
|
||||
padding: var(--spacing-sm);
|
||||
border-radius: var(--radius-sm);
|
||||
font-size: var(--font-size-sm);
|
||||
color: var(--text-secondary);
|
||||
background: var(--bg-primary);
|
||||
border: 1px solid var(--border-color);
|
||||
transition: all 0.2s;
|
||||
|
||||
&.active {
|
||||
color: var(--color-success);
|
||||
border-color: var(--color-success);
|
||||
background: color-mix(in srgb, var(--color-success), transparent 95%);
|
||||
}
|
||||
}
|
||||
|
||||
.quick-tips {
|
||||
margin-top: var(--spacing-lg);
|
||||
padding-top: var(--spacing-lg);
|
||||
border-top: 1px solid var(--border-color);
|
||||
|
||||
h4 {
|
||||
color: var(--text-primary);
|
||||
margin: 0 0 var(--spacing-md) 0;
|
||||
}
|
||||
|
||||
ul {
|
||||
margin: 0;
|
||||
padding-left: var(--spacing-lg);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--spacing-xs);
|
||||
|
||||
li {
|
||||
color: var(--text-secondary);
|
||||
font-size: var(--font-size-sm);
|
||||
line-height: 1.6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.info-card {
|
||||
background: var(--bg-tertiary);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,112 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { asnGeoContent } from '$lib/content/asn-geo';
|
||||
|
||||
describe('ASN Geo Content', () => {
|
||||
it('should have valid structure', () => {
|
||||
expect(asnGeoContent).toBeDefined();
|
||||
expect(asnGeoContent.title).toBe('ASN & Geolocation Lookup');
|
||||
expect(asnGeoContent.description).toBeTruthy();
|
||||
expect(asnGeoContent.sections).toBeDefined();
|
||||
});
|
||||
|
||||
it('should have all required sections', () => {
|
||||
const sections = asnGeoContent.sections;
|
||||
expect(sections.whatIsGeoIP).toBeDefined();
|
||||
expect(sections.howItWorks).toBeDefined();
|
||||
expect(sections.dataProvided).toBeDefined();
|
||||
expect(sections.accuracy).toBeDefined();
|
||||
expect(sections.useCases).toBeDefined();
|
||||
expect(sections.limitations).toBeDefined();
|
||||
expect(sections.asnExplained).toBeDefined();
|
||||
expect(sections.bestPractices).toBeDefined();
|
||||
expect(sections.dataSource).toBeDefined();
|
||||
});
|
||||
|
||||
it('should have data provided categories', () => {
|
||||
const categories = asnGeoContent.sections.dataProvided.categories;
|
||||
expect(categories).toHaveLength(3);
|
||||
expect(categories[0].category).toBe('Network Information');
|
||||
expect(categories[1].category).toBe('Geographic Location');
|
||||
expect(categories[2].category).toBe('Connection Type');
|
||||
categories.forEach((cat) => {
|
||||
expect(cat.fields).toBeDefined();
|
||||
expect(cat.fields.length).toBeGreaterThan(0);
|
||||
});
|
||||
});
|
||||
|
||||
it('should have accuracy levels', () => {
|
||||
const levels = asnGeoContent.sections.accuracy.levels;
|
||||
expect(levels).toHaveLength(4);
|
||||
expect(levels[0].level).toBe('Country');
|
||||
expect(levels[1].level).toBe('Region/State');
|
||||
expect(levels[2].level).toBe('City');
|
||||
expect(levels[3].level).toBe('Coordinates');
|
||||
levels.forEach((level) => {
|
||||
expect(level.accuracy).toBeTruthy();
|
||||
expect(level.description).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
it('should have use cases', () => {
|
||||
const cases = asnGeoContent.sections.useCases.cases;
|
||||
expect(cases.length).toBeGreaterThan(0);
|
||||
cases.forEach((useCase) => {
|
||||
expect(useCase.scenario).toBeTruthy();
|
||||
expect(useCase.use).toBeTruthy();
|
||||
expect(useCase.action).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
it('should have limitations', () => {
|
||||
const limitations = asnGeoContent.sections.limitations.points;
|
||||
expect(limitations.length).toBeGreaterThan(0);
|
||||
limitations.forEach((limit) => {
|
||||
expect(limit.limitation).toBeTruthy();
|
||||
expect(limit.description).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
it('should have ASN explained aspects', () => {
|
||||
const aspects = asnGeoContent.sections.asnExplained.aspects;
|
||||
expect(aspects).toHaveLength(4);
|
||||
aspects.forEach((aspect) => {
|
||||
expect(aspect.aspect).toBeTruthy();
|
||||
expect(aspect.description).toBeTruthy();
|
||||
expect(aspect.example).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
it('should have best practices', () => {
|
||||
const practices = asnGeoContent.sections.bestPractices.practices;
|
||||
expect(practices.length).toBeGreaterThan(0);
|
||||
practices.forEach((practice) => {
|
||||
expect(practice.practice).toBeTruthy();
|
||||
expect(practice.description).toBeTruthy();
|
||||
expect(practice.reason).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
it('should have data source features', () => {
|
||||
const features = asnGeoContent.sections.dataSource.features;
|
||||
expect(features.length).toBeGreaterThan(0);
|
||||
features.forEach((feature) => {
|
||||
expect(feature).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
it('should have quick tips', () => {
|
||||
const tips = asnGeoContent.quickTips;
|
||||
expect(tips.length).toBeGreaterThan(0);
|
||||
tips.forEach((tip) => {
|
||||
expect(tip).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
it('should have how it works steps', () => {
|
||||
const steps = asnGeoContent.sections.howItWorks.steps;
|
||||
expect(steps).toHaveLength(5);
|
||||
steps.forEach((step) => {
|
||||
expect(step).toBeTruthy();
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,67 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { POST } from '../../../../../../../src/routes/api/internal/diagnostics/asn-geo/+server';
|
||||
|
||||
describe('ASN Geo API Endpoint', () => {
|
||||
it('should reject requests without ip', async () => {
|
||||
const request = new Request('http://localhost', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({}),
|
||||
});
|
||||
|
||||
await expect(POST({ request } as any)).rejects.toThrow();
|
||||
});
|
||||
|
||||
it('should reject requests with empty ip', async () => {
|
||||
const request = new Request('http://localhost', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ ip: '' }),
|
||||
});
|
||||
|
||||
await expect(POST({ request } as any)).rejects.toThrow();
|
||||
});
|
||||
|
||||
it('should reject invalid IP format', async () => {
|
||||
const request = new Request('http://localhost', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ ip: 'invalid-ip' }),
|
||||
});
|
||||
|
||||
await expect(POST({ request } as any)).rejects.toThrow();
|
||||
});
|
||||
|
||||
it('should accept valid IPv4 format', async () => {
|
||||
const request = new Request('http://localhost', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ ip: '1.2.3.4' }),
|
||||
});
|
||||
|
||||
// Note: This will attempt to call the external API, which may be blocked in tests
|
||||
// We're just validating the request format is accepted, not the full response
|
||||
try {
|
||||
await POST({ request } as any);
|
||||
} catch (err: any) {
|
||||
// External API call may fail in test environment, that's ok
|
||||
// We just want to ensure it didn't reject the request format
|
||||
expect(err.status).not.toBe(400);
|
||||
}
|
||||
});
|
||||
|
||||
it('should accept valid IPv6 format', async () => {
|
||||
const request = new Request('http://localhost', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ ip: '2001:db8::1' }),
|
||||
});
|
||||
|
||||
try {
|
||||
await POST({ request } as any);
|
||||
} catch (err: any) {
|
||||
// External API call may fail in test environment, that's ok
|
||||
expect(err.status).not.toBe(400);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,54 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { POST } from '../../../../../../../src/routes/api/internal/diagnostics/bgp/+server';
|
||||
|
||||
describe('BGP API Endpoint', () => {
|
||||
it('should reject requests without resource', async () => {
|
||||
const request = new Request('http://localhost', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({}),
|
||||
});
|
||||
|
||||
await expect(POST({ request } as any)).rejects.toThrow();
|
||||
});
|
||||
|
||||
it('should reject requests with empty resource', async () => {
|
||||
const request = new Request('http://localhost', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ resource: '' }),
|
||||
});
|
||||
|
||||
await expect(POST({ request } as any)).rejects.toThrow();
|
||||
});
|
||||
|
||||
it('should accept valid IP address', async () => {
|
||||
const request = new Request('http://localhost', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ resource: '8.8.8.8' }),
|
||||
});
|
||||
|
||||
// This will make an actual API call to RIPE RIS
|
||||
const response = await POST({ request } as any);
|
||||
const data = await response.json();
|
||||
|
||||
expect(data).toHaveProperty('resource');
|
||||
expect(data).toHaveProperty('timestamp');
|
||||
expect(data.resource).toBe('8.8.8.8');
|
||||
});
|
||||
|
||||
it('should accept valid CIDR prefix', async () => {
|
||||
const request = new Request('http://localhost', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ resource: '8.8.8.0/24' }),
|
||||
});
|
||||
|
||||
const response = await POST({ request } as any);
|
||||
const data = await response.json();
|
||||
|
||||
expect(data).toHaveProperty('resource');
|
||||
expect(data).toHaveProperty('announced');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user