diff --git a/lam/lib/plugins/captcha/FriendlyCaptcha.inc b/lam/lib/plugins/captcha/FriendlyCaptcha.inc index 001672620..0d62db9c8 100644 --- a/lam/lib/plugins/captcha/FriendlyCaptcha.inc +++ b/lam/lib/plugins/captcha/FriendlyCaptcha.inc @@ -120,7 +120,7 @@ class htmlFriendlyCaptcha extends htmlElement { * @return array List of input field names and their type (name => type) */ function generateHTML($module, $input, $values, $restricted, $scope) { - $script = new htmlScript('../lib/extra/friendlyCaptcha/friendly-challenge-0.9.15.js'); + $script = new htmlScript('../lib/extra/friendlyCaptcha/friendly-challenge-0.9.17.js'); $script->generateHTML($module, $input, $values, $restricted, $scope); echo '
'; return []; diff --git a/lam/sbom-composer.json b/lam/sbom-composer.json index 85bb405a1..d25179a75 100644 --- a/lam/sbom-composer.json +++ b/lam/sbom-composer.json @@ -80,12 +80,12 @@ } ], "component": { - "bom-ref": "ldap-account-manager/ldap-account-manager-8.8.0.0", + "bom-ref": "ldap-account-manager/ldap-account-manager-8.9.0.0", "type": "application", "name": "ldap-account-manager", - "version": "8.8", + "version": "8.9", "group": "ldap-account-manager", - "purl": "pkg:composer/ldap-account-manager/ldap-account-manager@8.8", + "purl": "pkg:composer/ldap-account-manager/ldap-account-manager@8.9", "properties": [ { "name": "cdx:composer:package:type", @@ -607,10 +607,10 @@ ] }, { - "bom-ref": "guzzlehttp/psr7-2.6.2.0", + "bom-ref": "guzzlehttp/psr7-2.7.0.0", "type": "library", "name": "psr7", - "version": "2.6.2", + "version": "2.7.0", "group": "guzzlehttp", "description": "PSR-7 message implementation that also provides common utility methods", "author": "Graham Campbell, Michael Dowling, George Mponos, Tobias Nyholm, M\u00e1rk S\u00e1gi-Kaz\u00e1r, Tobias Schultze, M\u00e1rk S\u00e1gi-Kaz\u00e1r", @@ -621,17 +621,17 @@ } } ], - "purl": "pkg:composer/guzzlehttp/psr7@2.6.2", + "purl": "pkg:composer/guzzlehttp/psr7@2.7.0", "externalReferences": [ { "type": "distribution", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221", - "comment": "dist reference: 45b30f99ac27b5ca93cb4831afe16285f57b8221" + "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", + "comment": "dist reference: a70f5c95fb43bc83f07c9c948baa0dc1829bf201" }, { "type": "vcs", "url": "https://github.com/guzzle/psr7.git", - "comment": "source reference: 45b30f99ac27b5ca93cb4831afe16285f57b8221" + "comment": "source reference: a70f5c95fb43bc83f07c9c948baa0dc1829bf201" }, { "type": "issue-tracker", @@ -640,18 +640,18 @@ }, { "type": "vcs", - "url": "https://github.com/guzzle/psr7/tree/2.6.2", + "url": "https://github.com/guzzle/psr7/tree/2.7.0", "comment": "as detected from Composer manifest 'support.source'" } ], "properties": [ { "name": "cdx:composer:package:distReference", - "value": "45b30f99ac27b5ca93cb4831afe16285f57b8221" + "value": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" }, { "name": "cdx:composer:package:sourceReference", - "value": "45b30f99ac27b5ca93cb4831afe16285f57b8221" + "value": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" }, { "name": "cdx:composer:package:type", @@ -713,10 +713,10 @@ ] }, { - "bom-ref": "illuminate/collections-10.48.12.0", + "bom-ref": "illuminate/collections-10.48.20.0", "type": "library", "name": "collections", - "version": "v10.48.12", + "version": "v10.48.20", "group": "illuminate", "description": "The Illuminate Collections package.", "author": "Taylor Otwell", @@ -727,17 +727,17 @@ } } ], - "purl": "pkg:composer/illuminate/collections@v10.48.12", + "purl": "pkg:composer/illuminate/collections@v10.48.20", "externalReferences": [ { "type": "distribution", - "url": "https://api.github.com/repos/illuminate/collections/zipball/f9589f1063a449111dcaa1d68285b507d9483a95", - "comment": "dist reference: f9589f1063a449111dcaa1d68285b507d9483a95" + "url": "https://api.github.com/repos/illuminate/collections/zipball/37c863cffb345869dd134eff8e646bc82a19cc96", + "comment": "dist reference: 37c863cffb345869dd134eff8e646bc82a19cc96" }, { "type": "vcs", "url": "https://github.com/illuminate/collections.git", - "comment": "source reference: f9589f1063a449111dcaa1d68285b507d9483a95" + "comment": "source reference: 37c863cffb345869dd134eff8e646bc82a19cc96" }, { "type": "website", @@ -758,11 +758,11 @@ "properties": [ { "name": "cdx:composer:package:distReference", - "value": "f9589f1063a449111dcaa1d68285b507d9483a95" + "value": "37c863cffb345869dd134eff8e646bc82a19cc96" }, { "name": "cdx:composer:package:sourceReference", - "value": "f9589f1063a449111dcaa1d68285b507d9483a95" + "value": "37c863cffb345869dd134eff8e646bc82a19cc96" }, { "name": "cdx:composer:package:type", @@ -771,10 +771,10 @@ ] }, { - "bom-ref": "illuminate/conditionable-10.48.12.0", + "bom-ref": "illuminate/conditionable-10.48.20.0", "type": "library", "name": "conditionable", - "version": "v10.48.12", + "version": "v10.48.20", "group": "illuminate", "description": "The Illuminate Conditionable package.", "author": "Taylor Otwell", @@ -785,7 +785,7 @@ } } ], - "purl": "pkg:composer/illuminate/conditionable@v10.48.12", + "purl": "pkg:composer/illuminate/conditionable@v10.48.20", "externalReferences": [ { "type": "distribution", @@ -829,10 +829,10 @@ ] }, { - "bom-ref": "illuminate/contracts-10.48.12.0", + "bom-ref": "illuminate/contracts-10.48.20.0", "type": "library", "name": "contracts", - "version": "v10.48.12", + "version": "v10.48.20", "group": "illuminate", "description": "The Illuminate Contracts package.", "author": "Taylor Otwell", @@ -843,7 +843,7 @@ } } ], - "purl": "pkg:composer/illuminate/contracts@v10.48.12", + "purl": "pkg:composer/illuminate/contracts@v10.48.20", "externalReferences": [ { "type": "distribution", @@ -887,10 +887,10 @@ ] }, { - "bom-ref": "illuminate/macroable-10.48.12.0", + "bom-ref": "illuminate/macroable-10.48.20.0", "type": "library", "name": "macroable", - "version": "v10.48.12", + "version": "v10.48.20", "group": "illuminate", "description": "The Illuminate Macroable package.", "author": "Taylor Otwell", @@ -901,7 +901,7 @@ } } ], - "purl": "pkg:composer/illuminate/macroable@v10.48.12", + "purl": "pkg:composer/illuminate/macroable@v10.48.20", "externalReferences": [ { "type": "distribution", @@ -945,10 +945,10 @@ ] }, { - "bom-ref": "illuminate/pagination-10.48.12.0", + "bom-ref": "illuminate/pagination-10.48.20.0", "type": "library", "name": "pagination", - "version": "v10.48.12", + "version": "v10.48.20", "group": "illuminate", "description": "The Illuminate Pagination package.", "author": "Taylor Otwell", @@ -959,7 +959,7 @@ } } ], - "purl": "pkg:composer/illuminate/pagination@v10.48.12", + "purl": "pkg:composer/illuminate/pagination@v10.48.20", "externalReferences": [ { "type": "distribution", @@ -1003,10 +1003,10 @@ ] }, { - "bom-ref": "illuminate/support-10.48.12.0", + "bom-ref": "illuminate/support-10.48.20.0", "type": "library", "name": "support", - "version": "v10.48.12", + "version": "v10.48.20", "group": "illuminate", "description": "The Illuminate Support package.", "author": "Taylor Otwell", @@ -1017,17 +1017,17 @@ } } ], - "purl": "pkg:composer/illuminate/support@v10.48.12", + "purl": "pkg:composer/illuminate/support@v10.48.20", "externalReferences": [ { "type": "distribution", - "url": "https://api.github.com/repos/illuminate/support/zipball/263f389d81488c237846b69469f91387ca2729f3", - "comment": "dist reference: 263f389d81488c237846b69469f91387ca2729f3" + "url": "https://api.github.com/repos/illuminate/support/zipball/56c6d9895605b019e3debb9440454596ef99312a", + "comment": "dist reference: 56c6d9895605b019e3debb9440454596ef99312a" }, { "type": "vcs", "url": "https://github.com/illuminate/support.git", - "comment": "source reference: 263f389d81488c237846b69469f91387ca2729f3" + "comment": "source reference: 56c6d9895605b019e3debb9440454596ef99312a" }, { "type": "website", @@ -1048,11 +1048,11 @@ "properties": [ { "name": "cdx:composer:package:distReference", - "value": "263f389d81488c237846b69469f91387ca2729f3" + "value": "56c6d9895605b019e3debb9440454596ef99312a" }, { "name": "cdx:composer:package:sourceReference", - "value": "263f389d81488c237846b69469f91387ca2729f3" + "value": "56c6d9895605b019e3debb9440454596ef99312a" }, { "name": "cdx:composer:package:type", @@ -1061,10 +1061,10 @@ ] }, { - "bom-ref": "monolog/monolog-3.6.0.0", + "bom-ref": "monolog/monolog-3.7.0.0", "type": "library", "name": "monolog", - "version": "3.6.0", + "version": "3.7.0", "group": "monolog", "description": "Sends your logs to files, sockets, inboxes, databases and various web services", "author": "Jordi Boggiano", @@ -1075,17 +1075,17 @@ } } ], - "purl": "pkg:composer/monolog/monolog@3.6.0", + "purl": "pkg:composer/monolog/monolog@3.7.0", "externalReferences": [ { "type": "distribution", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/4b18b21a5527a3d5ffdac2fd35d3ab25a9597654", - "comment": "dist reference: 4b18b21a5527a3d5ffdac2fd35d3ab25a9597654" + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f4393b648b78a5408747de94fca38beb5f7e9ef8", + "comment": "dist reference: f4393b648b78a5408747de94fca38beb5f7e9ef8" }, { "type": "vcs", "url": "https://github.com/Seldaek/monolog.git", - "comment": "source reference: 4b18b21a5527a3d5ffdac2fd35d3ab25a9597654" + "comment": "source reference: f4393b648b78a5408747de94fca38beb5f7e9ef8" }, { "type": "website", @@ -1099,18 +1099,18 @@ }, { "type": "vcs", - "url": "https://github.com/Seldaek/monolog/tree/3.6.0", + "url": "https://github.com/Seldaek/monolog/tree/3.7.0", "comment": "as detected from Composer manifest 'support.source'" } ], "properties": [ { "name": "cdx:composer:package:distReference", - "value": "4b18b21a5527a3d5ffdac2fd35d3ab25a9597654" + "value": "f4393b648b78a5408747de94fca38beb5f7e9ef8" }, { "name": "cdx:composer:package:sourceReference", - "value": "4b18b21a5527a3d5ffdac2fd35d3ab25a9597654" + "value": "f4393b648b78a5408747de94fca38beb5f7e9ef8" }, { "name": "cdx:composer:package:type", @@ -1409,10 +1409,10 @@ ] }, { - "bom-ref": "phpseclib/phpseclib-3.0.37.0", + "bom-ref": "phpseclib/phpseclib-3.0.41.0", "type": "library", "name": "phpseclib", - "version": "3.0.37", + "version": "3.0.41", "group": "phpseclib", "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.", "author": "Jim Wigginton, Patrick Monnerat, Andreas Fischer, Hans-J\u00fcrgen Petrich, Graham Campbell", @@ -1423,17 +1423,17 @@ } } ], - "purl": "pkg:composer/phpseclib/phpseclib@3.0.37", + "purl": "pkg:composer/phpseclib/phpseclib@3.0.41", "externalReferences": [ { "type": "distribution", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/cfa2013d0f68c062055180dd4328cc8b9d1f30b8", - "comment": "dist reference: cfa2013d0f68c062055180dd4328cc8b9d1f30b8" + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/621c73f7dcb310b61de34d1da4c4204e8ace6ceb", + "comment": "dist reference: 621c73f7dcb310b61de34d1da4c4204e8ace6ceb" }, { "type": "vcs", "url": "https://github.com/phpseclib/phpseclib.git", - "comment": "source reference: cfa2013d0f68c062055180dd4328cc8b9d1f30b8" + "comment": "source reference: 621c73f7dcb310b61de34d1da4c4204e8ace6ceb" }, { "type": "website", @@ -1447,18 +1447,18 @@ }, { "type": "vcs", - "url": "https://github.com/phpseclib/phpseclib/tree/3.0.37", + "url": "https://github.com/phpseclib/phpseclib/tree/3.0.41", "comment": "as detected from Composer manifest 'support.source'" } ], "properties": [ { "name": "cdx:composer:package:distReference", - "value": "cfa2013d0f68c062055180dd4328cc8b9d1f30b8" + "value": "621c73f7dcb310b61de34d1da4c4204e8ace6ceb" }, { "name": "cdx:composer:package:sourceReference", - "value": "cfa2013d0f68c062055180dd4328cc8b9d1f30b8" + "value": "621c73f7dcb310b61de34d1da4c4204e8ace6ceb" }, { "name": "cdx:composer:package:type", @@ -1838,10 +1838,10 @@ ] }, { - "bom-ref": "psr/log-3.0.0.0", + "bom-ref": "psr/log-3.0.1.0", "type": "library", "name": "log", - "version": "3.0.0", + "version": "3.0.1", "group": "psr", "description": "Common interface for logging libraries", "author": "PHP-FIG", @@ -1852,17 +1852,17 @@ } } ], - "purl": "pkg:composer/psr/log@3.0.0", + "purl": "pkg:composer/psr/log@3.0.1", "externalReferences": [ { "type": "distribution", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", - "comment": "dist reference: fe5ea303b0887d5caefd3d431c3e61ad47037001" + "url": "https://api.github.com/repos/php-fig/log/zipball/79dff0b268932c640297f5208d6298f71855c03e", + "comment": "dist reference: 79dff0b268932c640297f5208d6298f71855c03e" }, { "type": "vcs", "url": "https://github.com/php-fig/log.git", - "comment": "source reference: fe5ea303b0887d5caefd3d431c3e61ad47037001" + "comment": "source reference: 79dff0b268932c640297f5208d6298f71855c03e" }, { "type": "website", @@ -1871,18 +1871,18 @@ }, { "type": "vcs", - "url": "https://github.com/php-fig/log/tree/3.0.0", + "url": "https://github.com/php-fig/log/tree/3.0.1", "comment": "as detected from Composer manifest 'support.source'" } ], "properties": [ { "name": "cdx:composer:package:distReference", - "value": "fe5ea303b0887d5caefd3d431c3e61ad47037001" + "value": "79dff0b268932c640297f5208d6298f71855c03e" }, { "name": "cdx:composer:package:sourceReference", - "value": "fe5ea303b0887d5caefd3d431c3e61ad47037001" + "value": "79dff0b268932c640297f5208d6298f71855c03e" }, { "name": "cdx:composer:package:type", @@ -2025,10 +2025,10 @@ ] }, { - "bom-ref": "spomky-labs/cbor-php-3.0.4.0", + "bom-ref": "spomky-labs/cbor-php-3.1.0.0", "type": "library", "name": "cbor-php", - "version": "3.0.4", + "version": "3.1.0", "group": "spomky-labs", "description": "CBOR Encoder/Decoder for PHP", "author": "Florent Morselli, All contributors", @@ -2039,17 +2039,17 @@ } } ], - "purl": "pkg:composer/spomky-labs/cbor-php@3.0.4", + "purl": "pkg:composer/spomky-labs/cbor-php@3.1.0", "externalReferences": [ { "type": "distribution", - "url": "https://api.github.com/repos/Spomky-Labs/cbor-php/zipball/658ed12a85a6b31fa312b89cd92f3a4ce6df4c6b", - "comment": "dist reference: 658ed12a85a6b31fa312b89cd92f3a4ce6df4c6b" + "url": "https://api.github.com/repos/Spomky-Labs/cbor-php/zipball/499d9bff0a6d59c4f1b813cc617fc3fd56d6dca4", + "comment": "dist reference: 499d9bff0a6d59c4f1b813cc617fc3fd56d6dca4" }, { "type": "vcs", "url": "https://github.com/Spomky-Labs/cbor-php.git", - "comment": "source reference: 658ed12a85a6b31fa312b89cd92f3a4ce6df4c6b" + "comment": "source reference: 499d9bff0a6d59c4f1b813cc617fc3fd56d6dca4" }, { "type": "issue-tracker", @@ -2058,18 +2058,18 @@ }, { "type": "vcs", - "url": "https://github.com/Spomky-Labs/cbor-php/tree/3.0.4", + "url": "https://github.com/Spomky-Labs/cbor-php/tree/3.1.0", "comment": "as detected from Composer manifest 'support.source'" } ], "properties": [ { "name": "cdx:composer:package:distReference", - "value": "658ed12a85a6b31fa312b89cd92f3a4ce6df4c6b" + "value": "499d9bff0a6d59c4f1b813cc617fc3fd56d6dca4" }, { "name": "cdx:composer:package:sourceReference", - "value": "658ed12a85a6b31fa312b89cd92f3a4ce6df4c6b" + "value": "499d9bff0a6d59c4f1b813cc617fc3fd56d6dca4" }, { "name": "cdx:composer:package:type", @@ -2131,10 +2131,10 @@ ] }, { - "bom-ref": "symfony/http-client-6.4.8.0", + "bom-ref": "symfony/http-client-6.4.11.0", "type": "library", "name": "http-client", - "version": "v6.4.8", + "version": "v6.4.11", "group": "symfony", "description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously", "author": "Nicolas Grekas, Symfony Community", @@ -2145,17 +2145,17 @@ } } ], - "purl": "pkg:composer/symfony/http-client@v6.4.8", + "purl": "pkg:composer/symfony/http-client@v6.4.11", "externalReferences": [ { "type": "distribution", - "url": "https://api.github.com/repos/symfony/http-client/zipball/61faba993e620fc22d4f0ab3b6bcf8fbb0d44b05", - "comment": "dist reference: 61faba993e620fc22d4f0ab3b6bcf8fbb0d44b05" + "url": "https://api.github.com/repos/symfony/http-client/zipball/4c92046bb788648ff1098cc66da69aa7eac8cb65", + "comment": "dist reference: 4c92046bb788648ff1098cc66da69aa7eac8cb65" }, { "type": "vcs", "url": "https://github.com/symfony/http-client.git", - "comment": "source reference: 61faba993e620fc22d4f0ab3b6bcf8fbb0d44b05" + "comment": "source reference: 4c92046bb788648ff1098cc66da69aa7eac8cb65" }, { "type": "website", @@ -2164,18 +2164,18 @@ }, { "type": "vcs", - "url": "https://github.com/symfony/http-client/tree/v6.4.8", + "url": "https://github.com/symfony/http-client/tree/v6.4.11", "comment": "as detected from Composer manifest 'support.source'" } ], "properties": [ { "name": "cdx:composer:package:distReference", - "value": "61faba993e620fc22d4f0ab3b6bcf8fbb0d44b05" + "value": "4c92046bb788648ff1098cc66da69aa7eac8cb65" }, { "name": "cdx:composer:package:sourceReference", - "value": "61faba993e620fc22d4f0ab3b6bcf8fbb0d44b05" + "value": "4c92046bb788648ff1098cc66da69aa7eac8cb65" }, { "name": "cdx:composer:package:type", @@ -2237,10 +2237,10 @@ ] }, { - "bom-ref": "symfony/http-foundation-6.4.8.0", + "bom-ref": "symfony/http-foundation-6.4.10.0", "type": "library", "name": "http-foundation", - "version": "v6.4.8", + "version": "v6.4.10", "group": "symfony", "description": "Defines an object-oriented layer for the HTTP specification", "author": "Fabien Potencier, Symfony Community", @@ -2251,17 +2251,17 @@ } } ], - "purl": "pkg:composer/symfony/http-foundation@v6.4.8", + "purl": "pkg:composer/symfony/http-foundation@v6.4.10", "externalReferences": [ { "type": "distribution", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/27de8cc95e11db7a50b027e71caaab9024545947", - "comment": "dist reference: 27de8cc95e11db7a50b027e71caaab9024545947" + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/117f1f20a7ade7bcea28b861fb79160a21a1e37b", + "comment": "dist reference: 117f1f20a7ade7bcea28b861fb79160a21a1e37b" }, { "type": "vcs", "url": "https://github.com/symfony/http-foundation.git", - "comment": "source reference: 27de8cc95e11db7a50b027e71caaab9024545947" + "comment": "source reference: 117f1f20a7ade7bcea28b861fb79160a21a1e37b" }, { "type": "website", @@ -2270,18 +2270,18 @@ }, { "type": "vcs", - "url": "https://github.com/symfony/http-foundation/tree/v6.4.8", + "url": "https://github.com/symfony/http-foundation/tree/v6.4.10", "comment": "as detected from Composer manifest 'support.source'" } ], "properties": [ { "name": "cdx:composer:package:distReference", - "value": "27de8cc95e11db7a50b027e71caaab9024545947" + "value": "117f1f20a7ade7bcea28b861fb79160a21a1e37b" }, { "name": "cdx:composer:package:sourceReference", - "value": "27de8cc95e11db7a50b027e71caaab9024545947" + "value": "117f1f20a7ade7bcea28b861fb79160a21a1e37b" }, { "name": "cdx:composer:package:type", @@ -2290,10 +2290,10 @@ ] }, { - "bom-ref": "symfony/polyfill-mbstring-1.29.0.0", + "bom-ref": "symfony/polyfill-mbstring-1.30.0.0", "type": "library", "name": "polyfill-mbstring", - "version": "v1.29.0", + "version": "v1.30.0", "group": "symfony", "description": "Symfony polyfill for the Mbstring extension", "author": "Nicolas Grekas, Symfony Community", @@ -2304,17 +2304,17 @@ } } ], - "purl": "pkg:composer/symfony/polyfill-mbstring@v1.29.0", + "purl": "pkg:composer/symfony/polyfill-mbstring@v1.30.0", "externalReferences": [ { "type": "distribution", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", - "comment": "dist reference: 9773676c8a1bb1f8d4340a62efe641cf76eda7ec" + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "comment": "dist reference: fd22ab50000ef01661e2a31d850ebaa297f8e03c" }, { "type": "vcs", "url": "https://github.com/symfony/polyfill-mbstring.git", - "comment": "source reference: 9773676c8a1bb1f8d4340a62efe641cf76eda7ec" + "comment": "source reference: fd22ab50000ef01661e2a31d850ebaa297f8e03c" }, { "type": "website", @@ -2323,18 +2323,18 @@ }, { "type": "vcs", - "url": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0", + "url": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0", "comment": "as detected from Composer manifest 'support.source'" } ], "properties": [ { "name": "cdx:composer:package:distReference", - "value": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" + "value": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" }, { "name": "cdx:composer:package:sourceReference", - "value": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" + "value": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" }, { "name": "cdx:composer:package:type", @@ -2343,10 +2343,10 @@ ] }, { - "bom-ref": "symfony/polyfill-php80-1.29.0.0", + "bom-ref": "symfony/polyfill-php80-1.30.0.0", "type": "library", "name": "polyfill-php80", - "version": "v1.29.0", + "version": "v1.30.0", "group": "symfony", "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", "author": "Ion Bazan, Nicolas Grekas, Symfony Community", @@ -2357,17 +2357,17 @@ } } ], - "purl": "pkg:composer/symfony/polyfill-php80@v1.29.0", + "purl": "pkg:composer/symfony/polyfill-php80@v1.30.0", "externalReferences": [ { "type": "distribution", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", - "comment": "dist reference: 87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433", + "comment": "dist reference: 77fa7995ac1b21ab60769b7323d600a991a90433" }, { "type": "vcs", "url": "https://github.com/symfony/polyfill-php80.git", - "comment": "source reference: 87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" + "comment": "source reference: 77fa7995ac1b21ab60769b7323d600a991a90433" }, { "type": "website", @@ -2376,18 +2376,18 @@ }, { "type": "vcs", - "url": "https://github.com/symfony/polyfill-php80/tree/v1.29.0", + "url": "https://github.com/symfony/polyfill-php80/tree/v1.30.0", "comment": "as detected from Composer manifest 'support.source'" } ], "properties": [ { "name": "cdx:composer:package:distReference", - "value": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" + "value": "77fa7995ac1b21ab60769b7323d600a991a90433" }, { "name": "cdx:composer:package:sourceReference", - "value": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" + "value": "77fa7995ac1b21ab60769b7323d600a991a90433" }, { "name": "cdx:composer:package:type", @@ -2396,10 +2396,10 @@ ] }, { - "bom-ref": "symfony/polyfill-php83-1.29.0.0", + "bom-ref": "symfony/polyfill-php83-1.30.0.0", "type": "library", "name": "polyfill-php83", - "version": "v1.29.0", + "version": "v1.30.0", "group": "symfony", "description": "Symfony polyfill backporting some PHP 8.3+ features to lower PHP versions", "author": "Nicolas Grekas, Symfony Community", @@ -2410,17 +2410,17 @@ } } ], - "purl": "pkg:composer/symfony/polyfill-php83@v1.29.0", + "purl": "pkg:composer/symfony/polyfill-php83@v1.30.0", "externalReferences": [ { "type": "distribution", - "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/86fcae159633351e5fd145d1c47de6c528f8caff", - "comment": "dist reference: 86fcae159633351e5fd145d1c47de6c528f8caff" + "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/dbdcdf1a4dcc2743591f1079d0c35ab1e2dcbbc9", + "comment": "dist reference: dbdcdf1a4dcc2743591f1079d0c35ab1e2dcbbc9" }, { "type": "vcs", "url": "https://github.com/symfony/polyfill-php83.git", - "comment": "source reference: 86fcae159633351e5fd145d1c47de6c528f8caff" + "comment": "source reference: dbdcdf1a4dcc2743591f1079d0c35ab1e2dcbbc9" }, { "type": "website", @@ -2429,18 +2429,18 @@ }, { "type": "vcs", - "url": "https://github.com/symfony/polyfill-php83/tree/v1.29.0", + "url": "https://github.com/symfony/polyfill-php83/tree/v1.30.0", "comment": "as detected from Composer manifest 'support.source'" } ], "properties": [ { "name": "cdx:composer:package:distReference", - "value": "86fcae159633351e5fd145d1c47de6c528f8caff" + "value": "dbdcdf1a4dcc2743591f1079d0c35ab1e2dcbbc9" }, { "name": "cdx:composer:package:sourceReference", - "value": "86fcae159633351e5fd145d1c47de6c528f8caff" + "value": "dbdcdf1a4dcc2743591f1079d0c35ab1e2dcbbc9" }, { "name": "cdx:composer:package:type", @@ -2449,10 +2449,10 @@ ] }, { - "bom-ref": "symfony/polyfill-uuid-1.29.0.0", + "bom-ref": "symfony/polyfill-uuid-1.30.0.0", "type": "library", "name": "polyfill-uuid", - "version": "v1.29.0", + "version": "v1.30.0", "group": "symfony", "description": "Symfony polyfill for uuid functions", "author": "Gr\u00e9goire Pineau, Symfony Community", @@ -2463,17 +2463,17 @@ } } ], - "purl": "pkg:composer/symfony/polyfill-uuid@v1.29.0", + "purl": "pkg:composer/symfony/polyfill-uuid@v1.30.0", "externalReferences": [ { "type": "distribution", - "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/3abdd21b0ceaa3000ee950097bc3cf9efc137853", - "comment": "dist reference: 3abdd21b0ceaa3000ee950097bc3cf9efc137853" + "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/2ba1f33797470debcda07fe9dce20a0003df18e9", + "comment": "dist reference: 2ba1f33797470debcda07fe9dce20a0003df18e9" }, { "type": "vcs", "url": "https://github.com/symfony/polyfill-uuid.git", - "comment": "source reference: 3abdd21b0ceaa3000ee950097bc3cf9efc137853" + "comment": "source reference: 2ba1f33797470debcda07fe9dce20a0003df18e9" }, { "type": "website", @@ -2482,18 +2482,18 @@ }, { "type": "vcs", - "url": "https://github.com/symfony/polyfill-uuid/tree/v1.29.0", + "url": "https://github.com/symfony/polyfill-uuid/tree/v1.30.0", "comment": "as detected from Composer manifest 'support.source'" } ], "properties": [ { "name": "cdx:composer:package:distReference", - "value": "3abdd21b0ceaa3000ee950097bc3cf9efc137853" + "value": "2ba1f33797470debcda07fe9dce20a0003df18e9" }, { "name": "cdx:composer:package:sourceReference", - "value": "3abdd21b0ceaa3000ee950097bc3cf9efc137853" + "value": "2ba1f33797470debcda07fe9dce20a0003df18e9" }, { "name": "cdx:composer:package:type", @@ -2502,10 +2502,10 @@ ] }, { - "bom-ref": "symfony/psr-http-message-bridge-6.4.8.0", + "bom-ref": "symfony/psr-http-message-bridge-6.4.11.0", "type": "library", "name": "psr-http-message-bridge", - "version": "v6.4.8", + "version": "v6.4.11", "group": "symfony", "description": "PSR HTTP message bridge", "author": "Fabien Potencier, Symfony Community", @@ -2516,17 +2516,17 @@ } } ], - "purl": "pkg:composer/symfony/psr-http-message-bridge@v6.4.8", + "purl": "pkg:composer/symfony/psr-http-message-bridge@v6.4.11", "externalReferences": [ { "type": "distribution", - "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/23a162bd446b93948a2c2f6909d80ad06195be10", - "comment": "dist reference: 23a162bd446b93948a2c2f6909d80ad06195be10" + "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/74835ba54eca99a38f374f7a6d932fa510124773", + "comment": "dist reference: 74835ba54eca99a38f374f7a6d932fa510124773" }, { "type": "vcs", "url": "https://github.com/symfony/psr-http-message-bridge.git", - "comment": "source reference: 23a162bd446b93948a2c2f6909d80ad06195be10" + "comment": "source reference: 74835ba54eca99a38f374f7a6d932fa510124773" }, { "type": "website", @@ -2535,18 +2535,18 @@ }, { "type": "vcs", - "url": "https://github.com/symfony/psr-http-message-bridge/tree/v6.4.8", + "url": "https://github.com/symfony/psr-http-message-bridge/tree/v6.4.11", "comment": "as detected from Composer manifest 'support.source'" } ], "properties": [ { "name": "cdx:composer:package:distReference", - "value": "23a162bd446b93948a2c2f6909d80ad06195be10" + "value": "74835ba54eca99a38f374f7a6d932fa510124773" }, { "name": "cdx:composer:package:sourceReference", - "value": "23a162bd446b93948a2c2f6909d80ad06195be10" + "value": "74835ba54eca99a38f374f7a6d932fa510124773" }, { "name": "cdx:composer:package:type", @@ -2608,10 +2608,10 @@ ] }, { - "bom-ref": "symfony/translation-6.4.8.0", + "bom-ref": "symfony/translation-6.4.10.0", "type": "library", "name": "translation", - "version": "v6.4.8", + "version": "v6.4.10", "group": "symfony", "description": "Provides tools to internationalize your application", "author": "Fabien Potencier, Symfony Community", @@ -2622,17 +2622,17 @@ } } ], - "purl": "pkg:composer/symfony/translation@v6.4.8", + "purl": "pkg:composer/symfony/translation@v6.4.10", "externalReferences": [ { "type": "distribution", - "url": "https://api.github.com/repos/symfony/translation/zipball/a002933b13989fc4bd0b58e04bf7eec5210e438a", - "comment": "dist reference: a002933b13989fc4bd0b58e04bf7eec5210e438a" + "url": "https://api.github.com/repos/symfony/translation/zipball/94041203f8ac200ae9e7c6a18fa6137814ccecc9", + "comment": "dist reference: 94041203f8ac200ae9e7c6a18fa6137814ccecc9" }, { "type": "vcs", "url": "https://github.com/symfony/translation.git", - "comment": "source reference: a002933b13989fc4bd0b58e04bf7eec5210e438a" + "comment": "source reference: 94041203f8ac200ae9e7c6a18fa6137814ccecc9" }, { "type": "website", @@ -2641,18 +2641,18 @@ }, { "type": "vcs", - "url": "https://github.com/symfony/translation/tree/v6.4.8", + "url": "https://github.com/symfony/translation/tree/v6.4.10", "comment": "as detected from Composer manifest 'support.source'" } ], "properties": [ { "name": "cdx:composer:package:distReference", - "value": "a002933b13989fc4bd0b58e04bf7eec5210e438a" + "value": "94041203f8ac200ae9e7c6a18fa6137814ccecc9" }, { "name": "cdx:composer:package:sourceReference", - "value": "a002933b13989fc4bd0b58e04bf7eec5210e438a" + "value": "94041203f8ac200ae9e7c6a18fa6137814ccecc9" }, { "name": "cdx:composer:package:type", @@ -2714,10 +2714,10 @@ ] }, { - "bom-ref": "symfony/uid-6.4.8.0", + "bom-ref": "symfony/uid-6.4.11.0", "type": "library", "name": "uid", - "version": "v6.4.8", + "version": "v6.4.11", "group": "symfony", "description": "Provides an object-oriented API to generate and represent UIDs", "author": "Gr\u00e9goire Pineau, Nicolas Grekas, Symfony Community", @@ -2728,17 +2728,17 @@ } } ], - "purl": "pkg:composer/symfony/uid@v6.4.8", + "purl": "pkg:composer/symfony/uid@v6.4.11", "externalReferences": [ { "type": "distribution", - "url": "https://api.github.com/repos/symfony/uid/zipball/35904eca37a84bb764c560cbfcac9f0ac2bcdbdf", - "comment": "dist reference: 35904eca37a84bb764c560cbfcac9f0ac2bcdbdf" + "url": "https://api.github.com/repos/symfony/uid/zipball/6a0394ad707de386547223948fac1e0f2805bc0b", + "comment": "dist reference: 6a0394ad707de386547223948fac1e0f2805bc0b" }, { "type": "vcs", "url": "https://github.com/symfony/uid.git", - "comment": "source reference: 35904eca37a84bb764c560cbfcac9f0ac2bcdbdf" + "comment": "source reference: 6a0394ad707de386547223948fac1e0f2805bc0b" }, { "type": "website", @@ -2747,18 +2747,18 @@ }, { "type": "vcs", - "url": "https://github.com/symfony/uid/tree/v6.4.8", + "url": "https://github.com/symfony/uid/tree/v6.4.11", "comment": "as detected from Composer manifest 'support.source'" } ], "properties": [ { "name": "cdx:composer:package:distReference", - "value": "35904eca37a84bb764c560cbfcac9f0ac2bcdbdf" + "value": "6a0394ad707de386547223948fac1e0f2805bc0b" }, { "name": "cdx:composer:package:sourceReference", - "value": "35904eca37a84bb764c560cbfcac9f0ac2bcdbdf" + "value": "6a0394ad707de386547223948fac1e0f2805bc0b" }, { "name": "cdx:composer:package:type", @@ -3465,7 +3465,7 @@ "psr/http-message-1.1.0.0", "psr/simple-cache-1.0.1.0", "spomky-labs/base64url-2.0.4.0", - "symfony/polyfill-mbstring-1.29.0.0", + "symfony/polyfill-mbstring-1.30.0.0", "web-token/jwt-checker-2.2.11.0", "web-token/jwt-core-2.2.11.0", "web-token/jwt-easy-2.2.11.0", @@ -3499,7 +3499,7 @@ "ref": "firebase/php-jwt-6.10.1.0" }, { - "ref": "guzzlehttp/psr7-2.6.2.0", + "ref": "guzzlehttp/psr7-2.7.0.0", "dependsOn": [ "psr/http-factory-1.1.0.0", "psr/http-message-1.1.0.0", @@ -3509,55 +3509,55 @@ { "ref": "http-interop/http-factory-guzzle-1.2.0.0", "dependsOn": [ - "guzzlehttp/psr7-2.6.2.0", + "guzzlehttp/psr7-2.7.0.0", "psr/http-factory-1.1.0.0" ] }, { - "ref": "illuminate/collections-10.48.12.0", + "ref": "illuminate/collections-10.48.20.0", "dependsOn": [ - "illuminate/conditionable-10.48.12.0", - "illuminate/contracts-10.48.12.0", - "illuminate/macroable-10.48.12.0" + "illuminate/conditionable-10.48.20.0", + "illuminate/contracts-10.48.20.0", + "illuminate/macroable-10.48.20.0" ] }, { - "ref": "illuminate/conditionable-10.48.12.0" + "ref": "illuminate/conditionable-10.48.20.0" }, { - "ref": "illuminate/contracts-10.48.12.0", + "ref": "illuminate/contracts-10.48.20.0", "dependsOn": [ "psr/container-2.0.2.0", "psr/simple-cache-1.0.1.0" ] }, { - "ref": "illuminate/macroable-10.48.12.0" + "ref": "illuminate/macroable-10.48.20.0" }, { - "ref": "illuminate/pagination-10.48.12.0", + "ref": "illuminate/pagination-10.48.20.0", "dependsOn": [ - "illuminate/collections-10.48.12.0", - "illuminate/contracts-10.48.12.0", - "illuminate/support-10.48.12.0" + "illuminate/collections-10.48.20.0", + "illuminate/contracts-10.48.20.0", + "illuminate/support-10.48.20.0" ] }, { - "ref": "illuminate/support-10.48.12.0", + "ref": "illuminate/support-10.48.20.0", "dependsOn": [ "doctrine/inflector-2.0.10.0", - "illuminate/collections-10.48.12.0", - "illuminate/conditionable-10.48.12.0", - "illuminate/contracts-10.48.12.0", - "illuminate/macroable-10.48.12.0", + "illuminate/collections-10.48.20.0", + "illuminate/conditionable-10.48.20.0", + "illuminate/contracts-10.48.20.0", + "illuminate/macroable-10.48.20.0", "nesbot/carbon-2.72.5.0", "voku/portable-ascii-2.0.1.0" ] }, { - "ref": "monolog/monolog-3.6.0.0", + "ref": "monolog/monolog-3.7.0.0", "dependsOn": [ - "psr/log-3.0.0.0" + "psr/log-3.0.1.0" ] }, { @@ -3565,9 +3565,9 @@ "dependsOn": [ "carbonphp/carbon-doctrine-types-3.2.0.0", "psr/clock-1.0.0.0", - "symfony/polyfill-mbstring-1.29.0.0", - "symfony/polyfill-php80-1.29.0.0", - "symfony/translation-6.4.8.0" + "symfony/polyfill-mbstring-1.30.0.0", + "symfony/polyfill-php80-1.30.0.0", + "symfony/translation-6.4.10.0" ] }, { @@ -3583,7 +3583,7 @@ "ref": "phpmailer/phpmailer-6.9.1.0" }, { - "ref": "phpseclib/phpseclib-3.0.37.0", + "ref": "phpseclib/phpseclib-3.0.41.0", "dependsOn": [ "paragonie/constant_time_encoding-2.7.0.0", "paragonie/random_compat-2.0.21.0" @@ -3624,7 +3624,7 @@ ] }, { - "ref": "psr/log-3.0.0.0" + "ref": "psr/log-3.0.1.0" }, { "ref": "psr/simple-cache-1.0.1.0" @@ -3636,7 +3636,7 @@ "ref": "spomky-labs/base64url-2.0.4.0" }, { - "ref": "spomky-labs/cbor-php-3.0.4.0", + "ref": "spomky-labs/cbor-php-3.1.0.0", "dependsOn": [ "brick/math-0.9.3.0" ] @@ -3645,9 +3645,9 @@ "ref": "symfony/deprecation-contracts-3.5.0.0" }, { - "ref": "symfony/http-client-6.4.8.0", + "ref": "symfony/http-client-6.4.11.0", "dependsOn": [ - "psr/log-3.0.0.0", + "psr/log-3.0.1.0", "symfony/deprecation-contracts-3.5.0.0", "symfony/http-client-contracts-3.5.0.0", "symfony/service-contracts-3.5.0.0" @@ -3657,33 +3657,30 @@ "ref": "symfony/http-client-contracts-3.5.0.0" }, { - "ref": "symfony/http-foundation-6.4.8.0", + "ref": "symfony/http-foundation-6.4.10.0", "dependsOn": [ "symfony/deprecation-contracts-3.5.0.0", - "symfony/polyfill-mbstring-1.29.0.0", - "symfony/polyfill-php83-1.29.0.0" + "symfony/polyfill-mbstring-1.30.0.0", + "symfony/polyfill-php83-1.30.0.0" ] }, { - "ref": "symfony/polyfill-mbstring-1.29.0.0" + "ref": "symfony/polyfill-mbstring-1.30.0.0" }, { - "ref": "symfony/polyfill-php80-1.29.0.0" + "ref": "symfony/polyfill-php80-1.30.0.0" }, { - "ref": "symfony/polyfill-php83-1.29.0.0", - "dependsOn": [ - "symfony/polyfill-php80-1.29.0.0" - ] + "ref": "symfony/polyfill-php83-1.30.0.0" }, { - "ref": "symfony/polyfill-uuid-1.29.0.0" + "ref": "symfony/polyfill-uuid-1.30.0.0" }, { - "ref": "symfony/psr-http-message-bridge-6.4.8.0", + "ref": "symfony/psr-http-message-bridge-6.4.11.0", "dependsOn": [ "psr/http-message-1.1.0.0", - "symfony/http-foundation-6.4.8.0" + "symfony/http-foundation-6.4.10.0" ] }, { @@ -3694,10 +3691,10 @@ ] }, { - "ref": "symfony/translation-6.4.8.0", + "ref": "symfony/translation-6.4.10.0", "dependsOn": [ "symfony/deprecation-contracts-3.5.0.0", - "symfony/polyfill-mbstring-1.29.0.0", + "symfony/polyfill-mbstring-1.30.0.0", "symfony/translation-contracts-3.5.0.0" ] }, @@ -3705,9 +3702,9 @@ "ref": "symfony/translation-contracts-3.5.0.0" }, { - "ref": "symfony/uid-6.4.8.0", + "ref": "symfony/uid-6.4.11.0", "dependsOn": [ - "symfony/polyfill-uuid-1.29.0.0" + "symfony/polyfill-uuid-1.30.0.0" ] }, { @@ -3730,7 +3727,7 @@ "paragonie/constant_time_encoding-2.7.0.0", "psr/http-client-1.0.3.0", "psr/http-factory-1.1.0.0", - "psr/log-3.0.0.0" + "psr/log-3.0.1.0" ] }, { @@ -3742,9 +3739,9 @@ "psr/http-client-1.0.3.0", "psr/http-factory-1.1.0.0", "psr/http-message-1.1.0.0", - "psr/log-3.0.0.0", - "spomky-labs/cbor-php-3.0.4.0", - "symfony/uid-6.4.8.0", + "psr/log-3.0.1.0", + "spomky-labs/cbor-php-3.1.0.0", + "symfony/uid-6.4.11.0", "thecodingmachine/safe-2.5.0.0", "web-auth/cose-lib-4.0.13.0", "web-auth/metadata-service-4.0.5.0" @@ -3802,29 +3799,29 @@ { "ref": "webklex/php-imap-5.5.0.0", "dependsOn": [ - "illuminate/pagination-10.48.12.0", + "illuminate/pagination-10.48.20.0", "nesbot/carbon-2.72.5.0", - "symfony/http-foundation-6.4.8.0" + "symfony/http-foundation-6.4.10.0" ] }, { - "ref": "ldap-account-manager/ldap-account-manager-8.8.0.0", + "ref": "ldap-account-manager/ldap-account-manager-8.9.0.0", "dependsOn": [ "web-auth/webauthn-lib-4.0.5.0", "web-auth/cose-lib-4.0.13.0", "web-auth/metadata-service-4.0.5.0", - "symfony/psr-http-message-bridge-6.4.8.0", - "symfony/http-foundation-6.4.8.0", - "symfony/http-client-6.4.8.0", + "symfony/psr-http-message-bridge-6.4.11.0", + "symfony/http-foundation-6.4.10.0", + "symfony/http-client-6.4.11.0", "http-interop/http-factory-guzzle-1.2.0.0", "webklex/php-imap-5.5.0.0", "phpmailer/phpmailer-6.9.1.0", - "guzzlehttp/psr7-2.6.2.0", + "guzzlehttp/psr7-2.7.0.0", "paragonie/random_compat-2.0.21.0", - "phpseclib/phpseclib-3.0.37.0", + "phpseclib/phpseclib-3.0.41.0", "christian-riesen/base32-1.6.0.0", "facile-it/php-openid-client-0.2.0.0", - "monolog/monolog-3.6.0.0", + "monolog/monolog-3.7.0.0", "duosecurity/duo_universal_php-1.0.2.0" ] } diff --git a/lam/sbom-libs.json b/lam/sbom-libs.json index 641d1340e..4412ef595 100644 --- a/lam/sbom-libs.json +++ b/lam/sbom-libs.json @@ -1,10 +1,10 @@ { "bomFormat" : "CycloneDX", "specVersion" : "1.5", - "serialNumber" : "urn:uuid:f3e3a97d-1ae7-46db-a896-250fc05a857d", + "serialNumber" : "urn:uuid:2b7c174d-f91f-4cf4-ab67-7a39f7f9d8ae", "version" : 1, "metadata" : { - "timestamp" : "2024-06-05T18:42:19Z", + "timestamp" : "2024-09-05T17:36:52Z", "tools" : [ { "vendor" : "OWASP", @@ -69,7 +69,7 @@ { "group" : "cdx:npm:package:bundled", "name" : "friendly-challenge", - "version" : "0.9.15", + "version" : "0.9.17", "licenses" : [ { "license" : { @@ -77,7 +77,7 @@ } } ], - "purl" : "pkg:npm/friendly-challenge@0.9.15", + "purl" : "pkg:npm/friendly-challenge@0.9.17", "type" : "library", "bom-ref" : "5ffbae18-bc06-4fdb-ba19-f9e9e1afdda5" }, @@ -129,7 +129,7 @@ { "group" : "cdx:npm:package:bundled", "name" : "sortablejs", - "version" : "1.15.2", + "version" : "1.15.3", "licenses" : [ { "license" : { @@ -137,14 +137,14 @@ } } ], - "purl" : "pkg:npm/sortablejs@1.15.2", + "purl" : "pkg:npm/sortablejs@1.15.3", "type" : "library", "bom-ref" : "394fe3c8-0e03-407a-96e2-2d3608e97265" }, { "group" : "cdx:npm:package:bundled", "name" : "sweetalert2", - "version" : "11.11.1", + "version" : "11.13.2", "licenses" : [ { "license" : { @@ -152,10 +152,18 @@ } } ], - "purl" : "pkg:npm/sweetalert2@11.11.1", + "purl" : "pkg:npm/sweetalert2@11.13.2", "type" : "library", "bom-ref" : "b1e652b5-d76e-4b07-acab-2d1a0908a96f" }, + { + "group" : "cdx:npm:package:bundled", + "name" : "tabulator-tables", + "version" : "6.2.5", + "purl" : "pkg:npm/tabulator-tables@6.2.5", + "type" : "library", + "bom-ref" : "78b9ccbd-dbc9-4f40-9b44-338a721cbf8a" + }, { "group" : "cdx:composer:package", "name" : "tecnickcom/tcpdf", @@ -228,6 +236,10 @@ "ref" : "b1e652b5-d76e-4b07-acab-2d1a0908a96f", "dependsOn" : [ ] }, + { + "ref" : "78b9ccbd-dbc9-4f40-9b44-338a721cbf8a", + "dependsOn" : [ ] + }, { "ref" : "72240acd-7de4-4058-b56f-e64638babcbf", "dependsOn" : [ ] diff --git a/lam/sbom.json b/lam/sbom.json index 72143a642..79da42652 100644 --- a/lam/sbom.json +++ b/lam/sbom.json @@ -1,7 +1,7 @@ { "bomFormat": "CycloneDX", "specVersion": "1.5", - "serialNumber": "urn:uuid:b5f0b4a0-9355-49c2-9f60-a1268984d338", + "serialNumber": "urn:uuid:b730765d-2e6f-4ec9-8587-4a07759574a9", "version": 1, "metadata": { "tools": [ @@ -87,7 +87,7 @@ "component": { "type": "application", "name": "ldap-account-manager", - "version": "8.8" + "version": "8.9" } }, "components": [ @@ -604,11 +604,11 @@ }, { "type": "library", - "bom-ref": "guzzlehttp/psr7-2.6.2.0", + "bom-ref": "guzzlehttp/psr7-2.7.0.0", "author": "Graham Campbell, Michael Dowling, George Mponos, Tobias Nyholm, M\u00E1rk S\u00E1gi-Kaz\u00E1r, Tobias Schultze, M\u00E1rk S\u00E1gi-Kaz\u00E1r", "group": "guzzlehttp", "name": "psr7", - "version": "2.6.2", + "version": "2.7.0", "description": "PSR-7 message implementation that also provides common utility methods", "licenses": [ { @@ -617,17 +617,17 @@ } } ], - "purl": "pkg:composer/guzzlehttp/psr7@2.6.2", + "purl": "pkg:composer/guzzlehttp/psr7@2.7.0", "externalReferences": [ { - "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", "type": "distribution", - "comment": "dist reference: 45b30f99ac27b5ca93cb4831afe16285f57b8221" + "comment": "dist reference: a70f5c95fb43bc83f07c9c948baa0dc1829bf201" }, { "url": "https://github.com/guzzle/psr7.git", "type": "vcs", - "comment": "source reference: 45b30f99ac27b5ca93cb4831afe16285f57b8221" + "comment": "source reference: a70f5c95fb43bc83f07c9c948baa0dc1829bf201" }, { "url": "https://github.com/guzzle/psr7/issues", @@ -635,7 +635,7 @@ "comment": "as detected from Composer manifest \u0027support.issues\u0027" }, { - "url": "https://github.com/guzzle/psr7/tree/2.6.2", + "url": "https://github.com/guzzle/psr7/tree/2.7.0", "type": "vcs", "comment": "as detected from Composer manifest \u0027support.source\u0027" } @@ -643,11 +643,11 @@ "properties": [ { "name": "cdx:composer:package:distReference", - "value": "45b30f99ac27b5ca93cb4831afe16285f57b8221" + "value": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" }, { "name": "cdx:composer:package:sourceReference", - "value": "45b30f99ac27b5ca93cb4831afe16285f57b8221" + "value": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" }, { "name": "cdx:composer:package:type", @@ -710,11 +710,11 @@ }, { "type": "library", - "bom-ref": "illuminate/collections-10.48.12.0", + "bom-ref": "illuminate/collections-10.48.20.0", "author": "Taylor Otwell", "group": "illuminate", "name": "collections", - "version": "v10.48.12", + "version": "v10.48.20", "description": "The Illuminate Collections package.", "licenses": [ { @@ -723,17 +723,17 @@ } } ], - "purl": "pkg:composer/illuminate/collections@v10.48.12", + "purl": "pkg:composer/illuminate/collections@v10.48.20", "externalReferences": [ { - "url": "https://api.github.com/repos/illuminate/collections/zipball/f9589f1063a449111dcaa1d68285b507d9483a95", + "url": "https://api.github.com/repos/illuminate/collections/zipball/37c863cffb345869dd134eff8e646bc82a19cc96", "type": "distribution", - "comment": "dist reference: f9589f1063a449111dcaa1d68285b507d9483a95" + "comment": "dist reference: 37c863cffb345869dd134eff8e646bc82a19cc96" }, { "url": "https://github.com/illuminate/collections.git", "type": "vcs", - "comment": "source reference: f9589f1063a449111dcaa1d68285b507d9483a95" + "comment": "source reference: 37c863cffb345869dd134eff8e646bc82a19cc96" }, { "url": "https://laravel.com", @@ -754,11 +754,11 @@ "properties": [ { "name": "cdx:composer:package:distReference", - "value": "f9589f1063a449111dcaa1d68285b507d9483a95" + "value": "37c863cffb345869dd134eff8e646bc82a19cc96" }, { "name": "cdx:composer:package:sourceReference", - "value": "f9589f1063a449111dcaa1d68285b507d9483a95" + "value": "37c863cffb345869dd134eff8e646bc82a19cc96" }, { "name": "cdx:composer:package:type", @@ -768,11 +768,11 @@ }, { "type": "library", - "bom-ref": "illuminate/conditionable-10.48.12.0", + "bom-ref": "illuminate/conditionable-10.48.20.0", "author": "Taylor Otwell", "group": "illuminate", "name": "conditionable", - "version": "v10.48.12", + "version": "v10.48.20", "description": "The Illuminate Conditionable package.", "licenses": [ { @@ -781,7 +781,7 @@ } } ], - "purl": "pkg:composer/illuminate/conditionable@v10.48.12", + "purl": "pkg:composer/illuminate/conditionable@v10.48.20", "externalReferences": [ { "url": "https://api.github.com/repos/illuminate/conditionable/zipball/d0958e4741fc9d6f516a552060fd1b829a85e009", @@ -826,11 +826,11 @@ }, { "type": "library", - "bom-ref": "illuminate/contracts-10.48.12.0", + "bom-ref": "illuminate/contracts-10.48.20.0", "author": "Taylor Otwell", "group": "illuminate", "name": "contracts", - "version": "v10.48.12", + "version": "v10.48.20", "description": "The Illuminate Contracts package.", "licenses": [ { @@ -839,7 +839,7 @@ } } ], - "purl": "pkg:composer/illuminate/contracts@v10.48.12", + "purl": "pkg:composer/illuminate/contracts@v10.48.20", "externalReferences": [ { "url": "https://api.github.com/repos/illuminate/contracts/zipball/8d7152c4a1f5d9cf7da3e8b71f23e4556f6138ac", @@ -884,11 +884,11 @@ }, { "type": "library", - "bom-ref": "illuminate/macroable-10.48.12.0", + "bom-ref": "illuminate/macroable-10.48.20.0", "author": "Taylor Otwell", "group": "illuminate", "name": "macroable", - "version": "v10.48.12", + "version": "v10.48.20", "description": "The Illuminate Macroable package.", "licenses": [ { @@ -897,7 +897,7 @@ } } ], - "purl": "pkg:composer/illuminate/macroable@v10.48.12", + "purl": "pkg:composer/illuminate/macroable@v10.48.20", "externalReferences": [ { "url": "https://api.github.com/repos/illuminate/macroable/zipball/dff667a46ac37b634dcf68909d9d41e94dc97c27", @@ -942,11 +942,11 @@ }, { "type": "library", - "bom-ref": "illuminate/pagination-10.48.12.0", + "bom-ref": "illuminate/pagination-10.48.20.0", "author": "Taylor Otwell", "group": "illuminate", "name": "pagination", - "version": "v10.48.12", + "version": "v10.48.20", "description": "The Illuminate Pagination package.", "licenses": [ { @@ -955,7 +955,7 @@ } } ], - "purl": "pkg:composer/illuminate/pagination@v10.48.12", + "purl": "pkg:composer/illuminate/pagination@v10.48.20", "externalReferences": [ { "url": "https://api.github.com/repos/illuminate/pagination/zipball/616874b9607ff35925347e1710a8b5151858cdf2", @@ -1000,11 +1000,11 @@ }, { "type": "library", - "bom-ref": "illuminate/support-10.48.12.0", + "bom-ref": "illuminate/support-10.48.20.0", "author": "Taylor Otwell", "group": "illuminate", "name": "support", - "version": "v10.48.12", + "version": "v10.48.20", "description": "The Illuminate Support package.", "licenses": [ { @@ -1013,17 +1013,17 @@ } } ], - "purl": "pkg:composer/illuminate/support@v10.48.12", + "purl": "pkg:composer/illuminate/support@v10.48.20", "externalReferences": [ { - "url": "https://api.github.com/repos/illuminate/support/zipball/263f389d81488c237846b69469f91387ca2729f3", + "url": "https://api.github.com/repos/illuminate/support/zipball/56c6d9895605b019e3debb9440454596ef99312a", "type": "distribution", - "comment": "dist reference: 263f389d81488c237846b69469f91387ca2729f3" + "comment": "dist reference: 56c6d9895605b019e3debb9440454596ef99312a" }, { "url": "https://github.com/illuminate/support.git", "type": "vcs", - "comment": "source reference: 263f389d81488c237846b69469f91387ca2729f3" + "comment": "source reference: 56c6d9895605b019e3debb9440454596ef99312a" }, { "url": "https://laravel.com", @@ -1044,11 +1044,11 @@ "properties": [ { "name": "cdx:composer:package:distReference", - "value": "263f389d81488c237846b69469f91387ca2729f3" + "value": "56c6d9895605b019e3debb9440454596ef99312a" }, { "name": "cdx:composer:package:sourceReference", - "value": "263f389d81488c237846b69469f91387ca2729f3" + "value": "56c6d9895605b019e3debb9440454596ef99312a" }, { "name": "cdx:composer:package:type", @@ -1058,11 +1058,11 @@ }, { "type": "library", - "bom-ref": "monolog/monolog-3.6.0.0", + "bom-ref": "monolog/monolog-3.7.0.0", "author": "Jordi Boggiano", "group": "monolog", "name": "monolog", - "version": "3.6.0", + "version": "3.7.0", "description": "Sends your logs to files, sockets, inboxes, databases and various web services", "licenses": [ { @@ -1071,17 +1071,17 @@ } } ], - "purl": "pkg:composer/monolog/monolog@3.6.0", + "purl": "pkg:composer/monolog/monolog@3.7.0", "externalReferences": [ { - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/4b18b21a5527a3d5ffdac2fd35d3ab25a9597654", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f4393b648b78a5408747de94fca38beb5f7e9ef8", "type": "distribution", - "comment": "dist reference: 4b18b21a5527a3d5ffdac2fd35d3ab25a9597654" + "comment": "dist reference: f4393b648b78a5408747de94fca38beb5f7e9ef8" }, { "url": "https://github.com/Seldaek/monolog.git", "type": "vcs", - "comment": "source reference: 4b18b21a5527a3d5ffdac2fd35d3ab25a9597654" + "comment": "source reference: f4393b648b78a5408747de94fca38beb5f7e9ef8" }, { "url": "https://github.com/Seldaek/monolog", @@ -1094,7 +1094,7 @@ "comment": "as detected from Composer manifest \u0027support.issues\u0027" }, { - "url": "https://github.com/Seldaek/monolog/tree/3.6.0", + "url": "https://github.com/Seldaek/monolog/tree/3.7.0", "type": "vcs", "comment": "as detected from Composer manifest \u0027support.source\u0027" } @@ -1102,11 +1102,11 @@ "properties": [ { "name": "cdx:composer:package:distReference", - "value": "4b18b21a5527a3d5ffdac2fd35d3ab25a9597654" + "value": "f4393b648b78a5408747de94fca38beb5f7e9ef8" }, { "name": "cdx:composer:package:sourceReference", - "value": "4b18b21a5527a3d5ffdac2fd35d3ab25a9597654" + "value": "f4393b648b78a5408747de94fca38beb5f7e9ef8" }, { "name": "cdx:composer:package:type", @@ -1406,11 +1406,11 @@ }, { "type": "library", - "bom-ref": "phpseclib/phpseclib-3.0.37.0", + "bom-ref": "phpseclib/phpseclib-3.0.41.0", "author": "Jim Wigginton, Patrick Monnerat, Andreas Fischer, Hans-J\u00FCrgen Petrich, Graham Campbell", "group": "phpseclib", "name": "phpseclib", - "version": "3.0.37", + "version": "3.0.41", "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.", "licenses": [ { @@ -1419,17 +1419,17 @@ } } ], - "purl": "pkg:composer/phpseclib/phpseclib@3.0.37", + "purl": "pkg:composer/phpseclib/phpseclib@3.0.41", "externalReferences": [ { - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/cfa2013d0f68c062055180dd4328cc8b9d1f30b8", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/621c73f7dcb310b61de34d1da4c4204e8ace6ceb", "type": "distribution", - "comment": "dist reference: cfa2013d0f68c062055180dd4328cc8b9d1f30b8" + "comment": "dist reference: 621c73f7dcb310b61de34d1da4c4204e8ace6ceb" }, { "url": "https://github.com/phpseclib/phpseclib.git", "type": "vcs", - "comment": "source reference: cfa2013d0f68c062055180dd4328cc8b9d1f30b8" + "comment": "source reference: 621c73f7dcb310b61de34d1da4c4204e8ace6ceb" }, { "url": "http://phpseclib.sourceforge.net", @@ -1442,7 +1442,7 @@ "comment": "as detected from Composer manifest \u0027support.issues\u0027" }, { - "url": "https://github.com/phpseclib/phpseclib/tree/3.0.37", + "url": "https://github.com/phpseclib/phpseclib/tree/3.0.41", "type": "vcs", "comment": "as detected from Composer manifest \u0027support.source\u0027" } @@ -1450,11 +1450,11 @@ "properties": [ { "name": "cdx:composer:package:distReference", - "value": "cfa2013d0f68c062055180dd4328cc8b9d1f30b8" + "value": "621c73f7dcb310b61de34d1da4c4204e8ace6ceb" }, { "name": "cdx:composer:package:sourceReference", - "value": "cfa2013d0f68c062055180dd4328cc8b9d1f30b8" + "value": "621c73f7dcb310b61de34d1da4c4204e8ace6ceb" }, { "name": "cdx:composer:package:type", @@ -1835,11 +1835,11 @@ }, { "type": "library", - "bom-ref": "psr/log-3.0.0.0", + "bom-ref": "psr/log-3.0.1.0", "author": "PHP-FIG", "group": "psr", "name": "log", - "version": "3.0.0", + "version": "3.0.1", "description": "Common interface for logging libraries", "licenses": [ { @@ -1848,17 +1848,17 @@ } } ], - "purl": "pkg:composer/psr/log@3.0.0", + "purl": "pkg:composer/psr/log@3.0.1", "externalReferences": [ { - "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", + "url": "https://api.github.com/repos/php-fig/log/zipball/79dff0b268932c640297f5208d6298f71855c03e", "type": "distribution", - "comment": "dist reference: fe5ea303b0887d5caefd3d431c3e61ad47037001" + "comment": "dist reference: 79dff0b268932c640297f5208d6298f71855c03e" }, { "url": "https://github.com/php-fig/log.git", "type": "vcs", - "comment": "source reference: fe5ea303b0887d5caefd3d431c3e61ad47037001" + "comment": "source reference: 79dff0b268932c640297f5208d6298f71855c03e" }, { "url": "https://github.com/php-fig/log", @@ -1866,7 +1866,7 @@ "comment": "as detected from Composer manifest \u0027homepage\u0027" }, { - "url": "https://github.com/php-fig/log/tree/3.0.0", + "url": "https://github.com/php-fig/log/tree/3.0.1", "type": "vcs", "comment": "as detected from Composer manifest \u0027support.source\u0027" } @@ -1874,11 +1874,11 @@ "properties": [ { "name": "cdx:composer:package:distReference", - "value": "fe5ea303b0887d5caefd3d431c3e61ad47037001" + "value": "79dff0b268932c640297f5208d6298f71855c03e" }, { "name": "cdx:composer:package:sourceReference", - "value": "fe5ea303b0887d5caefd3d431c3e61ad47037001" + "value": "79dff0b268932c640297f5208d6298f71855c03e" }, { "name": "cdx:composer:package:type", @@ -2022,11 +2022,11 @@ }, { "type": "library", - "bom-ref": "spomky-labs/cbor-php-3.0.4.0", + "bom-ref": "spomky-labs/cbor-php-3.1.0.0", "author": "Florent Morselli, All contributors", "group": "spomky-labs", "name": "cbor-php", - "version": "3.0.4", + "version": "3.1.0", "description": "CBOR Encoder/Decoder for PHP", "licenses": [ { @@ -2035,17 +2035,17 @@ } } ], - "purl": "pkg:composer/spomky-labs/cbor-php@3.0.4", + "purl": "pkg:composer/spomky-labs/cbor-php@3.1.0", "externalReferences": [ { - "url": "https://api.github.com/repos/Spomky-Labs/cbor-php/zipball/658ed12a85a6b31fa312b89cd92f3a4ce6df4c6b", + "url": "https://api.github.com/repos/Spomky-Labs/cbor-php/zipball/499d9bff0a6d59c4f1b813cc617fc3fd56d6dca4", "type": "distribution", - "comment": "dist reference: 658ed12a85a6b31fa312b89cd92f3a4ce6df4c6b" + "comment": "dist reference: 499d9bff0a6d59c4f1b813cc617fc3fd56d6dca4" }, { "url": "https://github.com/Spomky-Labs/cbor-php.git", "type": "vcs", - "comment": "source reference: 658ed12a85a6b31fa312b89cd92f3a4ce6df4c6b" + "comment": "source reference: 499d9bff0a6d59c4f1b813cc617fc3fd56d6dca4" }, { "url": "https://github.com/Spomky-Labs/cbor-php/issues", @@ -2053,7 +2053,7 @@ "comment": "as detected from Composer manifest \u0027support.issues\u0027" }, { - "url": "https://github.com/Spomky-Labs/cbor-php/tree/3.0.4", + "url": "https://github.com/Spomky-Labs/cbor-php/tree/3.1.0", "type": "vcs", "comment": "as detected from Composer manifest \u0027support.source\u0027" } @@ -2061,11 +2061,11 @@ "properties": [ { "name": "cdx:composer:package:distReference", - "value": "658ed12a85a6b31fa312b89cd92f3a4ce6df4c6b" + "value": "499d9bff0a6d59c4f1b813cc617fc3fd56d6dca4" }, { "name": "cdx:composer:package:sourceReference", - "value": "658ed12a85a6b31fa312b89cd92f3a4ce6df4c6b" + "value": "499d9bff0a6d59c4f1b813cc617fc3fd56d6dca4" }, { "name": "cdx:composer:package:type", @@ -2128,11 +2128,11 @@ }, { "type": "library", - "bom-ref": "symfony/http-client-6.4.8.0", + "bom-ref": "symfony/http-client-6.4.11.0", "author": "Nicolas Grekas, Symfony Community", "group": "symfony", "name": "http-client", - "version": "v6.4.8", + "version": "v6.4.11", "description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously", "licenses": [ { @@ -2141,17 +2141,17 @@ } } ], - "purl": "pkg:composer/symfony/http-client@v6.4.8", + "purl": "pkg:composer/symfony/http-client@v6.4.11", "externalReferences": [ { - "url": "https://api.github.com/repos/symfony/http-client/zipball/61faba993e620fc22d4f0ab3b6bcf8fbb0d44b05", + "url": "https://api.github.com/repos/symfony/http-client/zipball/4c92046bb788648ff1098cc66da69aa7eac8cb65", "type": "distribution", - "comment": "dist reference: 61faba993e620fc22d4f0ab3b6bcf8fbb0d44b05" + "comment": "dist reference: 4c92046bb788648ff1098cc66da69aa7eac8cb65" }, { "url": "https://github.com/symfony/http-client.git", "type": "vcs", - "comment": "source reference: 61faba993e620fc22d4f0ab3b6bcf8fbb0d44b05" + "comment": "source reference: 4c92046bb788648ff1098cc66da69aa7eac8cb65" }, { "url": "https://symfony.com", @@ -2159,7 +2159,7 @@ "comment": "as detected from Composer manifest \u0027homepage\u0027" }, { - "url": "https://github.com/symfony/http-client/tree/v6.4.8", + "url": "https://github.com/symfony/http-client/tree/v6.4.11", "type": "vcs", "comment": "as detected from Composer manifest \u0027support.source\u0027" } @@ -2167,11 +2167,11 @@ "properties": [ { "name": "cdx:composer:package:distReference", - "value": "61faba993e620fc22d4f0ab3b6bcf8fbb0d44b05" + "value": "4c92046bb788648ff1098cc66da69aa7eac8cb65" }, { "name": "cdx:composer:package:sourceReference", - "value": "61faba993e620fc22d4f0ab3b6bcf8fbb0d44b05" + "value": "4c92046bb788648ff1098cc66da69aa7eac8cb65" }, { "name": "cdx:composer:package:type", @@ -2234,11 +2234,11 @@ }, { "type": "library", - "bom-ref": "symfony/http-foundation-6.4.8.0", + "bom-ref": "symfony/http-foundation-6.4.10.0", "author": "Fabien Potencier, Symfony Community", "group": "symfony", "name": "http-foundation", - "version": "v6.4.8", + "version": "v6.4.10", "description": "Defines an object-oriented layer for the HTTP specification", "licenses": [ { @@ -2247,17 +2247,17 @@ } } ], - "purl": "pkg:composer/symfony/http-foundation@v6.4.8", + "purl": "pkg:composer/symfony/http-foundation@v6.4.10", "externalReferences": [ { - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/27de8cc95e11db7a50b027e71caaab9024545947", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/117f1f20a7ade7bcea28b861fb79160a21a1e37b", "type": "distribution", - "comment": "dist reference: 27de8cc95e11db7a50b027e71caaab9024545947" + "comment": "dist reference: 117f1f20a7ade7bcea28b861fb79160a21a1e37b" }, { "url": "https://github.com/symfony/http-foundation.git", "type": "vcs", - "comment": "source reference: 27de8cc95e11db7a50b027e71caaab9024545947" + "comment": "source reference: 117f1f20a7ade7bcea28b861fb79160a21a1e37b" }, { "url": "https://symfony.com", @@ -2265,7 +2265,7 @@ "comment": "as detected from Composer manifest \u0027homepage\u0027" }, { - "url": "https://github.com/symfony/http-foundation/tree/v6.4.8", + "url": "https://github.com/symfony/http-foundation/tree/v6.4.10", "type": "vcs", "comment": "as detected from Composer manifest \u0027support.source\u0027" } @@ -2273,11 +2273,11 @@ "properties": [ { "name": "cdx:composer:package:distReference", - "value": "27de8cc95e11db7a50b027e71caaab9024545947" + "value": "117f1f20a7ade7bcea28b861fb79160a21a1e37b" }, { "name": "cdx:composer:package:sourceReference", - "value": "27de8cc95e11db7a50b027e71caaab9024545947" + "value": "117f1f20a7ade7bcea28b861fb79160a21a1e37b" }, { "name": "cdx:composer:package:type", @@ -2287,11 +2287,11 @@ }, { "type": "library", - "bom-ref": "symfony/polyfill-mbstring-1.29.0.0", + "bom-ref": "symfony/polyfill-mbstring-1.30.0.0", "author": "Nicolas Grekas, Symfony Community", "group": "symfony", "name": "polyfill-mbstring", - "version": "v1.29.0", + "version": "v1.30.0", "description": "Symfony polyfill for the Mbstring extension", "licenses": [ { @@ -2300,17 +2300,17 @@ } } ], - "purl": "pkg:composer/symfony/polyfill-mbstring@v1.29.0", + "purl": "pkg:composer/symfony/polyfill-mbstring@v1.30.0", "externalReferences": [ { - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", "type": "distribution", - "comment": "dist reference: 9773676c8a1bb1f8d4340a62efe641cf76eda7ec" + "comment": "dist reference: fd22ab50000ef01661e2a31d850ebaa297f8e03c" }, { "url": "https://github.com/symfony/polyfill-mbstring.git", "type": "vcs", - "comment": "source reference: 9773676c8a1bb1f8d4340a62efe641cf76eda7ec" + "comment": "source reference: fd22ab50000ef01661e2a31d850ebaa297f8e03c" }, { "url": "https://symfony.com", @@ -2318,7 +2318,7 @@ "comment": "as detected from Composer manifest \u0027homepage\u0027" }, { - "url": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0", + "url": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0", "type": "vcs", "comment": "as detected from Composer manifest \u0027support.source\u0027" } @@ -2326,11 +2326,11 @@ "properties": [ { "name": "cdx:composer:package:distReference", - "value": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" + "value": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" }, { "name": "cdx:composer:package:sourceReference", - "value": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" + "value": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" }, { "name": "cdx:composer:package:type", @@ -2340,11 +2340,11 @@ }, { "type": "library", - "bom-ref": "symfony/polyfill-php80-1.29.0.0", + "bom-ref": "symfony/polyfill-php80-1.30.0.0", "author": "Ion Bazan, Nicolas Grekas, Symfony Community", "group": "symfony", "name": "polyfill-php80", - "version": "v1.29.0", + "version": "v1.30.0", "description": "Symfony polyfill backporting some PHP 8.0\u002B features to lower PHP versions", "licenses": [ { @@ -2353,17 +2353,17 @@ } } ], - "purl": "pkg:composer/symfony/polyfill-php80@v1.29.0", + "purl": "pkg:composer/symfony/polyfill-php80@v1.30.0", "externalReferences": [ { - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433", "type": "distribution", - "comment": "dist reference: 87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" + "comment": "dist reference: 77fa7995ac1b21ab60769b7323d600a991a90433" }, { "url": "https://github.com/symfony/polyfill-php80.git", "type": "vcs", - "comment": "source reference: 87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" + "comment": "source reference: 77fa7995ac1b21ab60769b7323d600a991a90433" }, { "url": "https://symfony.com", @@ -2371,7 +2371,7 @@ "comment": "as detected from Composer manifest \u0027homepage\u0027" }, { - "url": "https://github.com/symfony/polyfill-php80/tree/v1.29.0", + "url": "https://github.com/symfony/polyfill-php80/tree/v1.30.0", "type": "vcs", "comment": "as detected from Composer manifest \u0027support.source\u0027" } @@ -2379,11 +2379,11 @@ "properties": [ { "name": "cdx:composer:package:distReference", - "value": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" + "value": "77fa7995ac1b21ab60769b7323d600a991a90433" }, { "name": "cdx:composer:package:sourceReference", - "value": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" + "value": "77fa7995ac1b21ab60769b7323d600a991a90433" }, { "name": "cdx:composer:package:type", @@ -2393,11 +2393,11 @@ }, { "type": "library", - "bom-ref": "symfony/polyfill-php83-1.29.0.0", + "bom-ref": "symfony/polyfill-php83-1.30.0.0", "author": "Nicolas Grekas, Symfony Community", "group": "symfony", "name": "polyfill-php83", - "version": "v1.29.0", + "version": "v1.30.0", "description": "Symfony polyfill backporting some PHP 8.3\u002B features to lower PHP versions", "licenses": [ { @@ -2406,17 +2406,17 @@ } } ], - "purl": "pkg:composer/symfony/polyfill-php83@v1.29.0", + "purl": "pkg:composer/symfony/polyfill-php83@v1.30.0", "externalReferences": [ { - "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/86fcae159633351e5fd145d1c47de6c528f8caff", + "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/dbdcdf1a4dcc2743591f1079d0c35ab1e2dcbbc9", "type": "distribution", - "comment": "dist reference: 86fcae159633351e5fd145d1c47de6c528f8caff" + "comment": "dist reference: dbdcdf1a4dcc2743591f1079d0c35ab1e2dcbbc9" }, { "url": "https://github.com/symfony/polyfill-php83.git", "type": "vcs", - "comment": "source reference: 86fcae159633351e5fd145d1c47de6c528f8caff" + "comment": "source reference: dbdcdf1a4dcc2743591f1079d0c35ab1e2dcbbc9" }, { "url": "https://symfony.com", @@ -2424,7 +2424,7 @@ "comment": "as detected from Composer manifest \u0027homepage\u0027" }, { - "url": "https://github.com/symfony/polyfill-php83/tree/v1.29.0", + "url": "https://github.com/symfony/polyfill-php83/tree/v1.30.0", "type": "vcs", "comment": "as detected from Composer manifest \u0027support.source\u0027" } @@ -2432,11 +2432,11 @@ "properties": [ { "name": "cdx:composer:package:distReference", - "value": "86fcae159633351e5fd145d1c47de6c528f8caff" + "value": "dbdcdf1a4dcc2743591f1079d0c35ab1e2dcbbc9" }, { "name": "cdx:composer:package:sourceReference", - "value": "86fcae159633351e5fd145d1c47de6c528f8caff" + "value": "dbdcdf1a4dcc2743591f1079d0c35ab1e2dcbbc9" }, { "name": "cdx:composer:package:type", @@ -2446,11 +2446,11 @@ }, { "type": "library", - "bom-ref": "symfony/polyfill-uuid-1.29.0.0", + "bom-ref": "symfony/polyfill-uuid-1.30.0.0", "author": "Gr\u00E9goire Pineau, Symfony Community", "group": "symfony", "name": "polyfill-uuid", - "version": "v1.29.0", + "version": "v1.30.0", "description": "Symfony polyfill for uuid functions", "licenses": [ { @@ -2459,17 +2459,17 @@ } } ], - "purl": "pkg:composer/symfony/polyfill-uuid@v1.29.0", + "purl": "pkg:composer/symfony/polyfill-uuid@v1.30.0", "externalReferences": [ { - "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/3abdd21b0ceaa3000ee950097bc3cf9efc137853", + "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/2ba1f33797470debcda07fe9dce20a0003df18e9", "type": "distribution", - "comment": "dist reference: 3abdd21b0ceaa3000ee950097bc3cf9efc137853" + "comment": "dist reference: 2ba1f33797470debcda07fe9dce20a0003df18e9" }, { "url": "https://github.com/symfony/polyfill-uuid.git", "type": "vcs", - "comment": "source reference: 3abdd21b0ceaa3000ee950097bc3cf9efc137853" + "comment": "source reference: 2ba1f33797470debcda07fe9dce20a0003df18e9" }, { "url": "https://symfony.com", @@ -2477,7 +2477,7 @@ "comment": "as detected from Composer manifest \u0027homepage\u0027" }, { - "url": "https://github.com/symfony/polyfill-uuid/tree/v1.29.0", + "url": "https://github.com/symfony/polyfill-uuid/tree/v1.30.0", "type": "vcs", "comment": "as detected from Composer manifest \u0027support.source\u0027" } @@ -2485,11 +2485,11 @@ "properties": [ { "name": "cdx:composer:package:distReference", - "value": "3abdd21b0ceaa3000ee950097bc3cf9efc137853" + "value": "2ba1f33797470debcda07fe9dce20a0003df18e9" }, { "name": "cdx:composer:package:sourceReference", - "value": "3abdd21b0ceaa3000ee950097bc3cf9efc137853" + "value": "2ba1f33797470debcda07fe9dce20a0003df18e9" }, { "name": "cdx:composer:package:type", @@ -2499,11 +2499,11 @@ }, { "type": "library", - "bom-ref": "symfony/psr-http-message-bridge-6.4.8.0", + "bom-ref": "symfony/psr-http-message-bridge-6.4.11.0", "author": "Fabien Potencier, Symfony Community", "group": "symfony", "name": "psr-http-message-bridge", - "version": "v6.4.8", + "version": "v6.4.11", "description": "PSR HTTP message bridge", "licenses": [ { @@ -2512,17 +2512,17 @@ } } ], - "purl": "pkg:composer/symfony/psr-http-message-bridge@v6.4.8", + "purl": "pkg:composer/symfony/psr-http-message-bridge@v6.4.11", "externalReferences": [ { - "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/23a162bd446b93948a2c2f6909d80ad06195be10", + "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/74835ba54eca99a38f374f7a6d932fa510124773", "type": "distribution", - "comment": "dist reference: 23a162bd446b93948a2c2f6909d80ad06195be10" + "comment": "dist reference: 74835ba54eca99a38f374f7a6d932fa510124773" }, { "url": "https://github.com/symfony/psr-http-message-bridge.git", "type": "vcs", - "comment": "source reference: 23a162bd446b93948a2c2f6909d80ad06195be10" + "comment": "source reference: 74835ba54eca99a38f374f7a6d932fa510124773" }, { "url": "https://symfony.com", @@ -2530,7 +2530,7 @@ "comment": "as detected from Composer manifest \u0027homepage\u0027" }, { - "url": "https://github.com/symfony/psr-http-message-bridge/tree/v6.4.8", + "url": "https://github.com/symfony/psr-http-message-bridge/tree/v6.4.11", "type": "vcs", "comment": "as detected from Composer manifest \u0027support.source\u0027" } @@ -2538,11 +2538,11 @@ "properties": [ { "name": "cdx:composer:package:distReference", - "value": "23a162bd446b93948a2c2f6909d80ad06195be10" + "value": "74835ba54eca99a38f374f7a6d932fa510124773" }, { "name": "cdx:composer:package:sourceReference", - "value": "23a162bd446b93948a2c2f6909d80ad06195be10" + "value": "74835ba54eca99a38f374f7a6d932fa510124773" }, { "name": "cdx:composer:package:type", @@ -2605,11 +2605,11 @@ }, { "type": "library", - "bom-ref": "symfony/translation-6.4.8.0", + "bom-ref": "symfony/translation-6.4.10.0", "author": "Fabien Potencier, Symfony Community", "group": "symfony", "name": "translation", - "version": "v6.4.8", + "version": "v6.4.10", "description": "Provides tools to internationalize your application", "licenses": [ { @@ -2618,17 +2618,17 @@ } } ], - "purl": "pkg:composer/symfony/translation@v6.4.8", + "purl": "pkg:composer/symfony/translation@v6.4.10", "externalReferences": [ { - "url": "https://api.github.com/repos/symfony/translation/zipball/a002933b13989fc4bd0b58e04bf7eec5210e438a", + "url": "https://api.github.com/repos/symfony/translation/zipball/94041203f8ac200ae9e7c6a18fa6137814ccecc9", "type": "distribution", - "comment": "dist reference: a002933b13989fc4bd0b58e04bf7eec5210e438a" + "comment": "dist reference: 94041203f8ac200ae9e7c6a18fa6137814ccecc9" }, { "url": "https://github.com/symfony/translation.git", "type": "vcs", - "comment": "source reference: a002933b13989fc4bd0b58e04bf7eec5210e438a" + "comment": "source reference: 94041203f8ac200ae9e7c6a18fa6137814ccecc9" }, { "url": "https://symfony.com", @@ -2636,7 +2636,7 @@ "comment": "as detected from Composer manifest \u0027homepage\u0027" }, { - "url": "https://github.com/symfony/translation/tree/v6.4.8", + "url": "https://github.com/symfony/translation/tree/v6.4.10", "type": "vcs", "comment": "as detected from Composer manifest \u0027support.source\u0027" } @@ -2644,11 +2644,11 @@ "properties": [ { "name": "cdx:composer:package:distReference", - "value": "a002933b13989fc4bd0b58e04bf7eec5210e438a" + "value": "94041203f8ac200ae9e7c6a18fa6137814ccecc9" }, { "name": "cdx:composer:package:sourceReference", - "value": "a002933b13989fc4bd0b58e04bf7eec5210e438a" + "value": "94041203f8ac200ae9e7c6a18fa6137814ccecc9" }, { "name": "cdx:composer:package:type", @@ -2711,11 +2711,11 @@ }, { "type": "library", - "bom-ref": "symfony/uid-6.4.8.0", + "bom-ref": "symfony/uid-6.4.11.0", "author": "Gr\u00E9goire Pineau, Nicolas Grekas, Symfony Community", "group": "symfony", "name": "uid", - "version": "v6.4.8", + "version": "v6.4.11", "description": "Provides an object-oriented API to generate and represent UIDs", "licenses": [ { @@ -2724,17 +2724,17 @@ } } ], - "purl": "pkg:composer/symfony/uid@v6.4.8", + "purl": "pkg:composer/symfony/uid@v6.4.11", "externalReferences": [ { - "url": "https://api.github.com/repos/symfony/uid/zipball/35904eca37a84bb764c560cbfcac9f0ac2bcdbdf", + "url": "https://api.github.com/repos/symfony/uid/zipball/6a0394ad707de386547223948fac1e0f2805bc0b", "type": "distribution", - "comment": "dist reference: 35904eca37a84bb764c560cbfcac9f0ac2bcdbdf" + "comment": "dist reference: 6a0394ad707de386547223948fac1e0f2805bc0b" }, { "url": "https://github.com/symfony/uid.git", "type": "vcs", - "comment": "source reference: 35904eca37a84bb764c560cbfcac9f0ac2bcdbdf" + "comment": "source reference: 6a0394ad707de386547223948fac1e0f2805bc0b" }, { "url": "https://symfony.com", @@ -2742,7 +2742,7 @@ "comment": "as detected from Composer manifest \u0027homepage\u0027" }, { - "url": "https://github.com/symfony/uid/tree/v6.4.8", + "url": "https://github.com/symfony/uid/tree/v6.4.11", "type": "vcs", "comment": "as detected from Composer manifest \u0027support.source\u0027" } @@ -2750,11 +2750,11 @@ "properties": [ { "name": "cdx:composer:package:distReference", - "value": "35904eca37a84bb764c560cbfcac9f0ac2bcdbdf" + "value": "6a0394ad707de386547223948fac1e0f2805bc0b" }, { "name": "cdx:composer:package:sourceReference", - "value": "35904eca37a84bb764c560cbfcac9f0ac2bcdbdf" + "value": "6a0394ad707de386547223948fac1e0f2805bc0b" }, { "name": "cdx:composer:package:type", @@ -3432,11 +3432,11 @@ }, { "type": "application", - "bom-ref": "ldap-account-manager/ldap-account-manager-8.8.0.0", + "bom-ref": "ldap-account-manager/ldap-account-manager-8.9.0.0", "group": "ldap-account-manager", "name": "ldap-account-manager", - "version": "8.8", - "purl": "pkg:composer/ldap-account-manager/ldap-account-manager@8.8", + "version": "8.9", + "purl": "pkg:composer/ldap-account-manager/ldap-account-manager@8.9", "properties": [ { "name": "cdx:composer:package:type", @@ -3494,7 +3494,7 @@ "bom-ref": "5ffbae18-bc06-4fdb-ba19-f9e9e1afdda5", "group": "cdx:npm:package:bundled", "name": "friendly-challenge", - "version": "0.9.15", + "version": "0.9.17", "licenses": [ { "license": { @@ -3502,7 +3502,7 @@ } } ], - "purl": "pkg:npm/friendly-challenge@0.9.15" + "purl": "pkg:npm/friendly-challenge@0.9.17" }, { "type": "library", @@ -3554,7 +3554,7 @@ "bom-ref": "394fe3c8-0e03-407a-96e2-2d3608e97265", "group": "cdx:npm:package:bundled", "name": "sortablejs", - "version": "1.15.2", + "version": "1.15.3", "licenses": [ { "license": { @@ -3562,14 +3562,14 @@ } } ], - "purl": "pkg:npm/sortablejs@1.15.2" + "purl": "pkg:npm/sortablejs@1.15.3" }, { "type": "library", "bom-ref": "b1e652b5-d76e-4b07-acab-2d1a0908a96f", "group": "cdx:npm:package:bundled", "name": "sweetalert2", - "version": "11.11.1", + "version": "11.13.2", "licenses": [ { "license": { @@ -3577,7 +3577,15 @@ } } ], - "purl": "pkg:npm/sweetalert2@11.11.1" + "purl": "pkg:npm/sweetalert2@11.13.2" + }, + { + "type": "library", + "bom-ref": "78b9ccbd-dbc9-4f40-9b44-338a721cbf8a", + "group": "cdx:npm:package:bundled", + "name": "tabulator-tables", + "version": "6.2.5", + "purl": "pkg:npm/tabulator-tables@6.2.5" }, { "type": "library", @@ -3614,7 +3622,7 @@ "bom-ref": "c2095505-c3af-4958-af68-6a61f216807d", "group": "ldap-account-manager", "name": "ldap-account-manager", - "version": "8.8" + "version": "8.9" } ], "dependencies": [ @@ -3647,7 +3655,7 @@ "psr/http-message-1.1.0.0", "psr/simple-cache-1.0.1.0", "spomky-labs/base64url-2.0.4.0", - "symfony/polyfill-mbstring-1.29.0.0", + "symfony/polyfill-mbstring-1.30.0.0", "web-token/jwt-checker-2.2.11.0", "web-token/jwt-core-2.2.11.0", "web-token/jwt-easy-2.2.11.0", @@ -3681,7 +3689,7 @@ "ref": "firebase/php-jwt-6.10.1.0" }, { - "ref": "guzzlehttp/psr7-2.6.2.0", + "ref": "guzzlehttp/psr7-2.7.0.0", "dependsOn": [ "psr/http-factory-1.1.0.0", "psr/http-message-1.1.0.0", @@ -3691,55 +3699,55 @@ { "ref": "http-interop/http-factory-guzzle-1.2.0.0", "dependsOn": [ - "guzzlehttp/psr7-2.6.2.0", + "guzzlehttp/psr7-2.7.0.0", "psr/http-factory-1.1.0.0" ] }, { - "ref": "illuminate/collections-10.48.12.0", + "ref": "illuminate/collections-10.48.20.0", "dependsOn": [ - "illuminate/conditionable-10.48.12.0", - "illuminate/contracts-10.48.12.0", - "illuminate/macroable-10.48.12.0" + "illuminate/conditionable-10.48.20.0", + "illuminate/contracts-10.48.20.0", + "illuminate/macroable-10.48.20.0" ] }, { - "ref": "illuminate/conditionable-10.48.12.0" + "ref": "illuminate/conditionable-10.48.20.0" }, { - "ref": "illuminate/contracts-10.48.12.0", + "ref": "illuminate/contracts-10.48.20.0", "dependsOn": [ "psr/container-2.0.2.0", "psr/simple-cache-1.0.1.0" ] }, { - "ref": "illuminate/macroable-10.48.12.0" + "ref": "illuminate/macroable-10.48.20.0" }, { - "ref": "illuminate/pagination-10.48.12.0", + "ref": "illuminate/pagination-10.48.20.0", "dependsOn": [ - "illuminate/collections-10.48.12.0", - "illuminate/contracts-10.48.12.0", - "illuminate/support-10.48.12.0" + "illuminate/collections-10.48.20.0", + "illuminate/contracts-10.48.20.0", + "illuminate/support-10.48.20.0" ] }, { - "ref": "illuminate/support-10.48.12.0", + "ref": "illuminate/support-10.48.20.0", "dependsOn": [ "doctrine/inflector-2.0.10.0", - "illuminate/collections-10.48.12.0", - "illuminate/conditionable-10.48.12.0", - "illuminate/contracts-10.48.12.0", - "illuminate/macroable-10.48.12.0", + "illuminate/collections-10.48.20.0", + "illuminate/conditionable-10.48.20.0", + "illuminate/contracts-10.48.20.0", + "illuminate/macroable-10.48.20.0", "nesbot/carbon-2.72.5.0", "voku/portable-ascii-2.0.1.0" ] }, { - "ref": "monolog/monolog-3.6.0.0", + "ref": "monolog/monolog-3.7.0.0", "dependsOn": [ - "psr/log-3.0.0.0" + "psr/log-3.0.1.0" ] }, { @@ -3747,9 +3755,9 @@ "dependsOn": [ "carbonphp/carbon-doctrine-types-3.2.0.0", "psr/clock-1.0.0.0", - "symfony/polyfill-mbstring-1.29.0.0", - "symfony/polyfill-php80-1.29.0.0", - "symfony/translation-6.4.8.0" + "symfony/polyfill-mbstring-1.30.0.0", + "symfony/polyfill-php80-1.30.0.0", + "symfony/translation-6.4.10.0" ] }, { @@ -3765,7 +3773,7 @@ "ref": "phpmailer/phpmailer-6.9.1.0" }, { - "ref": "phpseclib/phpseclib-3.0.37.0", + "ref": "phpseclib/phpseclib-3.0.41.0", "dependsOn": [ "paragonie/constant_time_encoding-2.7.0.0", "paragonie/random_compat-2.0.21.0" @@ -3806,7 +3814,7 @@ ] }, { - "ref": "psr/log-3.0.0.0" + "ref": "psr/log-3.0.1.0" }, { "ref": "psr/simple-cache-1.0.1.0" @@ -3818,7 +3826,7 @@ "ref": "spomky-labs/base64url-2.0.4.0" }, { - "ref": "spomky-labs/cbor-php-3.0.4.0", + "ref": "spomky-labs/cbor-php-3.1.0.0", "dependsOn": [ "brick/math-0.9.3.0" ] @@ -3827,9 +3835,9 @@ "ref": "symfony/deprecation-contracts-3.5.0.0" }, { - "ref": "symfony/http-client-6.4.8.0", + "ref": "symfony/http-client-6.4.11.0", "dependsOn": [ - "psr/log-3.0.0.0", + "psr/log-3.0.1.0", "symfony/deprecation-contracts-3.5.0.0", "symfony/http-client-contracts-3.5.0.0", "symfony/service-contracts-3.5.0.0" @@ -3839,33 +3847,30 @@ "ref": "symfony/http-client-contracts-3.5.0.0" }, { - "ref": "symfony/http-foundation-6.4.8.0", + "ref": "symfony/http-foundation-6.4.10.0", "dependsOn": [ "symfony/deprecation-contracts-3.5.0.0", - "symfony/polyfill-mbstring-1.29.0.0", - "symfony/polyfill-php83-1.29.0.0" + "symfony/polyfill-mbstring-1.30.0.0", + "symfony/polyfill-php83-1.30.0.0" ] }, { - "ref": "symfony/polyfill-mbstring-1.29.0.0" + "ref": "symfony/polyfill-mbstring-1.30.0.0" }, { - "ref": "symfony/polyfill-php80-1.29.0.0" + "ref": "symfony/polyfill-php80-1.30.0.0" }, { - "ref": "symfony/polyfill-php83-1.29.0.0", - "dependsOn": [ - "symfony/polyfill-php80-1.29.0.0" - ] + "ref": "symfony/polyfill-php83-1.30.0.0" }, { - "ref": "symfony/polyfill-uuid-1.29.0.0" + "ref": "symfony/polyfill-uuid-1.30.0.0" }, { - "ref": "symfony/psr-http-message-bridge-6.4.8.0", + "ref": "symfony/psr-http-message-bridge-6.4.11.0", "dependsOn": [ "psr/http-message-1.1.0.0", - "symfony/http-foundation-6.4.8.0" + "symfony/http-foundation-6.4.10.0" ] }, { @@ -3876,10 +3881,10 @@ ] }, { - "ref": "symfony/translation-6.4.8.0", + "ref": "symfony/translation-6.4.10.0", "dependsOn": [ "symfony/deprecation-contracts-3.5.0.0", - "symfony/polyfill-mbstring-1.29.0.0", + "symfony/polyfill-mbstring-1.30.0.0", "symfony/translation-contracts-3.5.0.0" ] }, @@ -3887,9 +3892,9 @@ "ref": "symfony/translation-contracts-3.5.0.0" }, { - "ref": "symfony/uid-6.4.8.0", + "ref": "symfony/uid-6.4.11.0", "dependsOn": [ - "symfony/polyfill-uuid-1.29.0.0" + "symfony/polyfill-uuid-1.30.0.0" ] }, { @@ -3912,7 +3917,7 @@ "paragonie/constant_time_encoding-2.7.0.0", "psr/http-client-1.0.3.0", "psr/http-factory-1.1.0.0", - "psr/log-3.0.0.0" + "psr/log-3.0.1.0" ] }, { @@ -3924,9 +3929,9 @@ "psr/http-client-1.0.3.0", "psr/http-factory-1.1.0.0", "psr/http-message-1.1.0.0", - "psr/log-3.0.0.0", - "spomky-labs/cbor-php-3.0.4.0", - "symfony/uid-6.4.8.0", + "psr/log-3.0.1.0", + "spomky-labs/cbor-php-3.1.0.0", + "symfony/uid-6.4.11.0", "thecodingmachine/safe-2.5.0.0", "web-auth/cose-lib-4.0.13.0", "web-auth/metadata-service-4.0.5.0" @@ -3984,29 +3989,29 @@ { "ref": "webklex/php-imap-5.5.0.0", "dependsOn": [ - "illuminate/pagination-10.48.12.0", + "illuminate/pagination-10.48.20.0", "nesbot/carbon-2.72.5.0", - "symfony/http-foundation-6.4.8.0" + "symfony/http-foundation-6.4.10.0" ] }, { - "ref": "ldap-account-manager/ldap-account-manager-8.8.0.0", + "ref": "ldap-account-manager/ldap-account-manager-8.9.0.0", "dependsOn": [ "web-auth/webauthn-lib-4.0.5.0", "web-auth/cose-lib-4.0.13.0", "web-auth/metadata-service-4.0.5.0", - "symfony/psr-http-message-bridge-6.4.8.0", - "symfony/http-foundation-6.4.8.0", - "symfony/http-client-6.4.8.0", + "symfony/psr-http-message-bridge-6.4.11.0", + "symfony/http-foundation-6.4.10.0", + "symfony/http-client-6.4.11.0", "http-interop/http-factory-guzzle-1.2.0.0", "webklex/php-imap-5.5.0.0", "phpmailer/phpmailer-6.9.1.0", - "guzzlehttp/psr7-2.6.2.0", + "guzzlehttp/psr7-2.7.0.0", "paragonie/random_compat-2.0.21.0", - "phpseclib/phpseclib-3.0.37.0", + "phpseclib/phpseclib-3.0.41.0", "christian-riesen/base32-1.6.0.0", "facile-it/php-openid-client-0.2.0.0", - "monolog/monolog-3.6.0.0", + "monolog/monolog-3.7.0.0", "duosecurity/duo_universal_php-1.0.2.0" ] }, @@ -4050,6 +4055,10 @@ "ref": "b1e652b5-d76e-4b07-acab-2d1a0908a96f", "dependsOn": [] }, + { + "ref": "78b9ccbd-dbc9-4f40-9b44-338a721cbf8a", + "dependsOn": [] + }, { "ref": "72240acd-7de4-4058-b56f-e64638babcbf", "dependsOn": [] diff --git a/lam/style/200_sweetalert2_11.11.1.css b/lam/style/200_sweetalert2_11.13.2.css similarity index 97% rename from lam/style/200_sweetalert2_11.11.1.css rename to lam/style/200_sweetalert2_11.13.2.css index 7b549e1eb..4af54fbd2 100644 --- a/lam/style/200_sweetalert2_11.11.1.css +++ b/lam/style/200_sweetalert2_11.13.2.css @@ -316,7 +316,7 @@ div:where(.swal2-container) button:where(.swal2-styled) { div:where(.swal2-container) button:where(.swal2-styled):not([disabled]) { cursor: pointer; } -div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm { +div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm) { border: 0; border-radius: 0.25em; background: initial; @@ -324,10 +324,10 @@ div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm { color: #fff; font-size: 1em; } -div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm:focus { +div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):focus-visible { box-shadow: 0 0 0 3px rgba(112, 102, 224, 0.5); } -div:where(.swal2-container) button:where(.swal2-styled).swal2-deny { +div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny) { border: 0; border-radius: 0.25em; background: initial; @@ -335,10 +335,10 @@ div:where(.swal2-container) button:where(.swal2-styled).swal2-deny { color: #fff; font-size: 1em; } -div:where(.swal2-container) button:where(.swal2-styled).swal2-deny:focus { +div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):focus-visible { box-shadow: 0 0 0 3px rgba(220, 55, 65, 0.5); } -div:where(.swal2-container) button:where(.swal2-styled).swal2-cancel { +div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel) { border: 0; border-radius: 0.25em; background: initial; @@ -346,13 +346,13 @@ div:where(.swal2-container) button:where(.swal2-styled).swal2-cancel { color: #fff; font-size: 1em; } -div:where(.swal2-container) button:where(.swal2-styled).swal2-cancel:focus { +div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):focus-visible { box-shadow: 0 0 0 3px rgba(110, 120, 129, 0.5); } -div:where(.swal2-container) button:where(.swal2-styled).swal2-default-outline:focus { +div:where(.swal2-container) button:where(.swal2-styled).swal2-default-outline:focus-visible { box-shadow: 0 0 0 3px rgba(100, 150, 200, 0.5); } -div:where(.swal2-container) button:where(.swal2-styled):focus { +div:where(.swal2-container) button:where(.swal2-styled):focus-visible { outline: none; } div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner { @@ -411,7 +411,7 @@ div:where(.swal2-container) button:where(.swal2-close):hover { background: transparent; color: #f27474; } -div:where(.swal2-container) button:where(.swal2-close):focus { +div:where(.swal2-container) button:where(.swal2-close):focus-visible { outline: none; box-shadow: inset 0 0 0 3px rgba(100, 150, 200, 0.5); } @@ -421,8 +421,8 @@ div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner { div:where(.swal2-container) .swal2-html-container { z-index: 1; justify-content: center; - margin: 1em 1.6em 0.3em; - padding: 0; + margin: 0; + padding: 1em 1.6em 0.3em; overflow: auto; color: inherit; font-size: 1.125em; diff --git a/lam/templates/lib/400_Sortable-1.15.2.js b/lam/templates/lib/400_Sortable-1.15.3.js similarity index 99% rename from lam/templates/lib/400_Sortable-1.15.2.js rename to lam/templates/lib/400_Sortable-1.15.3.js index 3af939cf1..89cede7c1 100644 --- a/lam/templates/lib/400_Sortable-1.15.2.js +++ b/lam/templates/lib/400_Sortable-1.15.3.js @@ -1,5 +1,5 @@ /**! - * Sortable 1.15.2 + * Sortable 1.15.3 * @author RubaXa * @author owenm * @license MIT @@ -134,7 +134,7 @@ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } - var version = "1.15.2"; + var version = "1.15.3"; function userAgent(pattern) { if (typeof window !== 'undefined' && window.navigator) { @@ -1467,7 +1467,7 @@ } target = parent; // store last element } - /* jshint boss:true */ while (parent = parent.parentNode); + /* jshint boss:true */ while (parent = getParentOrHost(parent)); } _unhideGhostForTarget(); } @@ -2373,7 +2373,8 @@ nextTick: _nextTick, cancelNextTick: _cancelNextTick, detectDirection: _detectDirection, - getChild: getChild + getChild: getChild, + expando: expando }; /** diff --git a/lam/templates/lib/620_sweetalert2_11.11.1.js b/lam/templates/lib/620_sweetalert2_11.13.2.js similarity index 61% rename from lam/templates/lib/620_sweetalert2_11.11.1.js rename to lam/templates/lib/620_sweetalert2_11.13.2.js index f05cda911..cd6bbca57 100644 --- a/lam/templates/lib/620_sweetalert2_11.11.1.js +++ b/lam/templates/lib/620_sweetalert2_11.13.2.js @@ -1,5 +1,5 @@ /*! -* sweetalert2 v11.11.1 +* sweetalert2 v11.13.2 * Released under the MIT License. */ (function (global, factory) { @@ -8,34 +8,13 @@ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Sweetalert2 = factory()); })(this, (function () { 'use strict'; - function _arrayLikeToArray(r, a) { - (null == a || a > r.length) && (a = r.length); - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; - return n; - } - function _arrayWithHoles(r) { - if (Array.isArray(r)) return r; - } - function _arrayWithoutHoles(r) { - if (Array.isArray(r)) return _arrayLikeToArray(r); - } function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } - function _assertThisInitialized(e) { - if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - return e; - } - function _callSuper(t, o, e) { - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); - } function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } - function _classCallCheck(a, n) { - if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); - } function _classPrivateFieldGet2(s, a) { return s.get(_assertClassBrand(s, a)); } @@ -45,147 +24,12 @@ function _classPrivateFieldSet2(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; } - function _construct(t, e, r) { - if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); - var o = [null]; - o.push.apply(o, e); - var p = new (t.bind.apply(t, o))(); - return p; - } - function _defineProperties(e, r) { - for (var t = 0; t < r.length; t++) { - var o = r[t]; - o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); - } - } - function _createClass(e, r, t) { - return r && _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", { - writable: !1 - }), e; - } - function _get() { - return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { - var p = _superPropBase(e, t); - if (p) { - var n = Object.getOwnPropertyDescriptor(p, t); - return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; - } - }, _get.apply(null, arguments); - } - function _getPrototypeOf(t) { - return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { - return t.__proto__ || Object.getPrototypeOf(t); - }, _getPrototypeOf(t); - } - function _inherits(t, e) { - if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); - t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - writable: !0, - configurable: !0 - } - }), Object.defineProperty(t, "prototype", { - writable: !1 - }), e && _setPrototypeOf(t, e); - } - function _isNativeReflectConstruct() { - try { - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (t) {} - return (_isNativeReflectConstruct = function () { - return !!t; - })(); - } - function _iterableToArray(r) { - if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); - } - function _iterableToArrayLimit(r, l) { - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; - if (null != t) { - var e, - n, - i, - u, - a = [], - f = !0, - o = !1; - try { - if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); - } catch (r) { - o = !0, n = r; - } finally { - try { - if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; - } finally { - if (o) throw n; - } - } - return a; - } - } - function _nonIterableRest() { - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - function _possibleConstructorReturn(t, e) { - if (e && ("object" == typeof e || "function" == typeof e)) return e; - if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); - return _assertThisInitialized(t); - } - function _setPrototypeOf(t, e) { - return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { - return t.__proto__ = e, t; - }, _setPrototypeOf(t, e); - } - function _slicedToArray(r, e) { - return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); - } - function _superPropBase(t, o) { - for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));); - return t; - } - function _toConsumableArray(r) { - return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); - } - function _toPrimitive(t, r) { - if ("object" != typeof t || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r ); - if ("object" != typeof i) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return (String )(t); - } - function _toPropertyKey(t) { - var i = _toPrimitive(t, "string"); - return "symbol" == typeof i ? i : i + ""; - } - function _typeof(o) { - "@babel/helpers - typeof"; - - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { - return typeof o; - } : function (o) { - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; - }, _typeof(o); - } - function _unsupportedIterableToArray(r, a) { - if (r) { - if ("string" == typeof r) return _arrayLikeToArray(r, a); - var t = {}.toString.call(r).slice(8, -1); - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; - } - } - var RESTORE_FOCUS_TIMEOUT = 100; + const RESTORE_FOCUS_TIMEOUT = 100; /** @type {GlobalState} */ - var globalState = {}; - var focusPreviousActiveElement = function focusPreviousActiveElement() { + const globalState = {}; + const focusPreviousActiveElement = () => { if (globalState.previousActiveElement instanceof HTMLElement) { globalState.previousActiveElement.focus(); globalState.previousActiveElement = null; @@ -200,14 +44,14 @@ * @param {boolean} returnFocus * @returns {Promise} */ - var restoreActiveElement = function restoreActiveElement(returnFocus) { - return new Promise(function (resolve) { + const restoreActiveElement = returnFocus => { + return new Promise(resolve => { if (!returnFocus) { return resolve(); } - var x = window.scrollX; - var y = window.scrollY; - globalState.restoreFocusTimeout = setTimeout(function () { + const x = window.scrollX; + const y = window.scrollY; + globalState.restoreFocusTimeout = setTimeout(() => { focusPreviousActiveElement(); resolve(); }, RESTORE_FOCUS_TIMEOUT); // issues/900 @@ -216,80 +60,9 @@ }); }; - var swalPrefix = 'swal2-'; - - /** - * @typedef - * { | 'container' - * | 'shown' - * | 'height-auto' - * | 'iosfix' - * | 'popup' - * | 'modal' - * | 'no-backdrop' - * | 'no-transition' - * | 'toast' - * | 'toast-shown' - * | 'show' - * | 'hide' - * | 'close' - * | 'title' - * | 'html-container' - * | 'actions' - * | 'confirm' - * | 'deny' - * | 'cancel' - * | 'default-outline' - * | 'footer' - * | 'icon' - * | 'icon-content' - * | 'image' - * | 'input' - * | 'file' - * | 'range' - * | 'select' - * | 'radio' - * | 'checkbox' - * | 'label' - * | 'textarea' - * | 'inputerror' - * | 'input-label' - * | 'validation-message' - * | 'progress-steps' - * | 'active-progress-step' - * | 'progress-step' - * | 'progress-step-line' - * | 'loader' - * | 'loading' - * | 'styled' - * | 'top' - * | 'top-start' - * | 'top-end' - * | 'top-left' - * | 'top-right' - * | 'center' - * | 'center-start' - * | 'center-end' - * | 'center-left' - * | 'center-right' - * | 'bottom' - * | 'bottom-start' - * | 'bottom-end' - * | 'bottom-left' - * | 'bottom-right' - * | 'grow-row' - * | 'grow-column' - * | 'grow-fullscreen' - * | 'rtl' - * | 'timer-progress-bar' - * | 'timer-progress-bar-container' - * | 'scrollbar-measure' - * | 'icon-success' - * | 'icon-warning' - * | 'icon-info' - * | 'icon-question' - * | 'icon-error' - * } SwalClass + const swalPrefix = 'swal2-'; + + /** * @typedef {Record} SwalClasses */ @@ -299,20 +72,20 @@ */ /** @type {SwalClass[]} */ - var classNames = ['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'show', 'hide', 'close', 'title', 'html-container', 'actions', 'confirm', 'deny', 'cancel', 'default-outline', 'footer', 'icon', 'icon-content', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'label', 'textarea', 'inputerror', 'input-label', 'validation-message', 'progress-steps', 'active-progress-step', 'progress-step', 'progress-step-line', 'loader', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen', 'rtl', 'timer-progress-bar', 'timer-progress-bar-container', 'scrollbar-measure', 'icon-success', 'icon-warning', 'icon-info', 'icon-question', 'icon-error']; - var swalClasses = classNames.reduce(function (acc, className) { + const classNames = ['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'show', 'hide', 'close', 'title', 'html-container', 'actions', 'confirm', 'deny', 'cancel', 'default-outline', 'footer', 'icon', 'icon-content', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'label', 'textarea', 'inputerror', 'input-label', 'validation-message', 'progress-steps', 'active-progress-step', 'progress-step', 'progress-step-line', 'loader', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen', 'rtl', 'timer-progress-bar', 'timer-progress-bar-container', 'scrollbar-measure', 'icon-success', 'icon-warning', 'icon-info', 'icon-question', 'icon-error']; + const swalClasses = classNames.reduce((acc, className) => { acc[className] = swalPrefix + className; return acc; }, /** @type {SwalClasses} */{}); /** @type {SwalIcon[]} */ - var icons = ['success', 'warning', 'info', 'question', 'error']; - var iconTypes = icons.reduce(function (acc, icon) { + const icons = ['success', 'warning', 'info', 'question', 'error']; + const iconTypes = icons.reduce((acc, icon) => { acc[icon] = swalPrefix + icon; return acc; }, /** @type {SwalIcons} */{}); - var consolePrefix = 'SweetAlert2:'; + const consolePrefix = 'SweetAlert2:'; /** * Capitalize the first letter of a string @@ -320,17 +93,15 @@ * @param {string} str * @returns {string} */ - var capitalizeFirstLetter = function capitalizeFirstLetter(str) { - return str.charAt(0).toUpperCase() + str.slice(1); - }; + const capitalizeFirstLetter = str => str.charAt(0).toUpperCase() + str.slice(1); /** * Standardize console warnings * * @param {string | string[]} message */ - var warn = function warn(message) { - console.warn("".concat(consolePrefix, " ").concat(_typeof(message) === 'object' ? message.join(' ') : message)); + const warn = message => { + console.warn(`${consolePrefix} ${typeof message === 'object' ? message.join(' ') : message}`); }; /** @@ -338,8 +109,8 @@ * * @param {string} message */ - var error = function error(message) { - console.error("".concat(consolePrefix, " ").concat(message)); + const error = message => { + console.error(`${consolePrefix} ${message}`); }; /** @@ -348,14 +119,14 @@ * @type {string[]} * @private */ - var previousWarnOnceMessages = []; + const previousWarnOnceMessages = []; /** * Show a console warning, but only if it hasn't already been shown * * @param {string} message */ - var warnOnce = function warnOnce(message) { + const warnOnce = message => { if (!previousWarnOnceMessages.includes(message)) { previousWarnOnceMessages.push(message); warn(message); @@ -366,10 +137,11 @@ * Show a one-time console warning about deprecated params/methods * * @param {string} deprecatedParam - * @param {string} useInstead + * @param {string?} useInstead */ - var warnAboutDeprecation = function warnAboutDeprecation(deprecatedParam, useInstead) { - warnOnce("\"".concat(deprecatedParam, "\" is deprecated and will be removed in the next major release. Please use \"").concat(useInstead, "\" instead.")); + const warnAboutDeprecation = function (deprecatedParam) { + let useInstead = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + warnOnce(`"${deprecatedParam}" is deprecated and will be removed in the next major release.${useInstead ? ` Use "${useInstead}" instead.` : ''}`); }; /** @@ -379,49 +151,39 @@ * @param {Function | any} arg * @returns {any} */ - var callIfFunction = function callIfFunction(arg) { - return typeof arg === 'function' ? arg() : arg; - }; + const callIfFunction = arg => typeof arg === 'function' ? arg() : arg; /** * @param {any} arg * @returns {boolean} */ - var hasToPromiseFn = function hasToPromiseFn(arg) { - return arg && typeof arg.toPromise === 'function'; - }; + const hasToPromiseFn = arg => arg && typeof arg.toPromise === 'function'; /** * @param {any} arg * @returns {Promise} */ - var asPromise = function asPromise(arg) { - return hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg); - }; + const asPromise = arg => hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg); /** * @param {any} arg * @returns {boolean} */ - var isPromise = function isPromise(arg) { - return arg && Promise.resolve(arg) === arg; - }; + const isPromise = arg => arg && Promise.resolve(arg) === arg; /** * Gets the popup container which contains the backdrop and the popup itself. * * @returns {HTMLElement | null} */ - var getContainer = function getContainer() { - return document.body.querySelector(".".concat(swalClasses.container)); - }; + const getContainer = () => document.body.querySelector(`.${swalClasses.container}`); /** * @param {string} selectorString * @returns {HTMLElement | null} */ - var elementBySelector = function elementBySelector(selectorString) { - var container = getContainer(); + const elementBySelector = selectorString => { + const container = getContainer(); return container ? container.querySelector(selectorString) : null; }; @@ -429,146 +191,127 @@ * @param {string} className * @returns {HTMLElement | null} */ - var elementByClass = function elementByClass(className) { - return elementBySelector(".".concat(className)); + const elementByClass = className => { + return elementBySelector(`.${className}`); }; /** * @returns {HTMLElement | null} */ - var getPopup = function getPopup() { - return elementByClass(swalClasses.popup); - }; + const getPopup = () => elementByClass(swalClasses.popup); /** * @returns {HTMLElement | null} */ - var getIcon = function getIcon() { - return elementByClass(swalClasses.icon); - }; + const getIcon = () => elementByClass(swalClasses.icon); /** * @returns {HTMLElement | null} */ - var getIconContent = function getIconContent() { - return elementByClass(swalClasses['icon-content']); - }; + const getIconContent = () => elementByClass(swalClasses['icon-content']); /** * @returns {HTMLElement | null} */ - var getTitle = function getTitle() { - return elementByClass(swalClasses.title); - }; + const getTitle = () => elementByClass(swalClasses.title); /** * @returns {HTMLElement | null} */ - var getHtmlContainer = function getHtmlContainer() { - return elementByClass(swalClasses['html-container']); - }; + const getHtmlContainer = () => elementByClass(swalClasses['html-container']); /** * @returns {HTMLElement | null} */ - var getImage = function getImage() { - return elementByClass(swalClasses.image); - }; + const getImage = () => elementByClass(swalClasses.image); /** * @returns {HTMLElement | null} */ - var getProgressSteps = function getProgressSteps() { - return elementByClass(swalClasses['progress-steps']); - }; + const getProgressSteps = () => elementByClass(swalClasses['progress-steps']); /** * @returns {HTMLElement | null} */ - var getValidationMessage = function getValidationMessage() { - return elementByClass(swalClasses['validation-message']); - }; + const getValidationMessage = () => elementByClass(swalClasses['validation-message']); /** * @returns {HTMLButtonElement | null} */ - var getConfirmButton = function getConfirmButton() { - return /** @type {HTMLButtonElement} */elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.confirm)); - }; + const getConfirmButton = () => (/** @type {HTMLButtonElement} */elementBySelector(`.${swalClasses.actions} .${swalClasses.confirm}`)); /** * @returns {HTMLButtonElement | null} */ - var getCancelButton = function getCancelButton() { - return /** @type {HTMLButtonElement} */elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.cancel)); - }; + const getCancelButton = () => (/** @type {HTMLButtonElement} */elementBySelector(`.${swalClasses.actions} .${swalClasses.cancel}`)); /** * @returns {HTMLButtonElement | null} */ - var getDenyButton = function getDenyButton() { - return /** @type {HTMLButtonElement} */elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.deny)); - }; + const getDenyButton = () => (/** @type {HTMLButtonElement} */elementBySelector(`.${swalClasses.actions} .${swalClasses.deny}`)); /** * @returns {HTMLElement | null} */ - var getInputLabel = function getInputLabel() { - return elementByClass(swalClasses['input-label']); - }; + const getInputLabel = () => elementByClass(swalClasses['input-label']); /** * @returns {HTMLElement | null} */ - var getLoader = function getLoader() { - return elementBySelector(".".concat(swalClasses.loader)); - }; + const getLoader = () => elementBySelector(`.${swalClasses.loader}`); /** * @returns {HTMLElement | null} */ - var getActions = function getActions() { - return elementByClass(swalClasses.actions); - }; + const getActions = () => elementByClass(swalClasses.actions); /** * @returns {HTMLElement | null} */ - var getFooter = function getFooter() { - return elementByClass(swalClasses.footer); - }; + const getFooter = () => elementByClass(swalClasses.footer); /** * @returns {HTMLElement | null} */ - var getTimerProgressBar = function getTimerProgressBar() { - return elementByClass(swalClasses['timer-progress-bar']); - }; + const getTimerProgressBar = () => elementByClass(swalClasses['timer-progress-bar']); /** * @returns {HTMLElement | null} */ - var getCloseButton = function getCloseButton() { - return elementByClass(swalClasses.close); - }; + const getCloseButton = () => elementByClass(swalClasses.close); // https://github.com/jkup/focusable/blob/master/index.js - var focusable = "\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex=\"0\"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n"; + const focusable = ` + a[href], + area[href], + input:not([disabled]), + select:not([disabled]), + textarea:not([disabled]), + button:not([disabled]), + iframe, + object, + embed, + [tabindex="0"], + [contenteditable], + audio[controls], + video[controls], + summary +`; /** * @returns {HTMLElement[]} */ - var getFocusableElements = function getFocusableElements() { - var popup = getPopup(); + const getFocusableElements = () => { + const popup = getPopup(); if (!popup) { return []; } /** @type {NodeListOf} */ - var focusableElementsWithTabindex = popup.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'); - var focusableElementsWithTabindexSorted = Array.from(focusableElementsWithTabindex) + const focusableElementsWithTabindex = popup.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'); + const focusableElementsWithTabindexSorted = Array.from(focusableElementsWithTabindex) // sort according to tabindex - .sort(function (a, b) { - var tabindexA = parseInt(a.getAttribute('tabindex') || '0'); - var tabindexB = parseInt(b.getAttribute('tabindex') || '0'); + .sort((a, b) => { + const tabindexA = parseInt(a.getAttribute('tabindex') || '0'); + const tabindexB = parseInt(b.getAttribute('tabindex') || '0'); if (tabindexA > tabindexB) { return 1; } else if (tabindexA < tabindexB) { @@ -578,27 +321,23 @@ }); /** @type {NodeListOf} */ - var otherFocusableElements = popup.querySelectorAll(focusable); - var otherFocusableElementsFiltered = Array.from(otherFocusableElements).filter(function (el) { - return el.getAttribute('tabindex') !== '-1'; - }); - return _toConsumableArray(new Set(focusableElementsWithTabindexSorted.concat(otherFocusableElementsFiltered))).filter(function (el) { - return isVisible$1(el); - }); + const otherFocusableElements = popup.querySelectorAll(focusable); + const otherFocusableElementsFiltered = Array.from(otherFocusableElements).filter(el => el.getAttribute('tabindex') !== '-1'); + return [...new Set(focusableElementsWithTabindexSorted.concat(otherFocusableElementsFiltered))].filter(el => isVisible$1(el)); }; /** * @returns {boolean} */ - var isModal = function isModal() { + const isModal = () => { return hasClass(document.body, swalClasses.shown) && !hasClass(document.body, swalClasses['toast-shown']) && !hasClass(document.body, swalClasses['no-backdrop']); }; /** * @returns {boolean} */ - var isToast = function isToast() { - var popup = getPopup(); + const isToast = () => { + const popup = getPopup(); if (!popup) { return false; } @@ -608,8 +347,8 @@ /** * @returns {boolean} */ - var isLoading = function isLoading() { - var popup = getPopup(); + const isLoading = () => { + const popup = getPopup(); if (!popup) { return false; } @@ -623,23 +362,27 @@ * @param {HTMLElement} elem * @param {string} html */ - var setInnerHtml = function setInnerHtml(elem, html) { + const setInnerHtml = (elem, html) => { elem.textContent = ''; if (html) { - var parser = new DOMParser(); - var parsed = parser.parseFromString(html, "text/html"); - var head = parsed.querySelector('head'); - head && Array.from(head.childNodes).forEach(function (child) { - elem.appendChild(child); - }); - var body = parsed.querySelector('body'); - body && Array.from(body.childNodes).forEach(function (child) { - if (child instanceof HTMLVideoElement || child instanceof HTMLAudioElement) { - elem.appendChild(child.cloneNode(true)); // https://github.com/sweetalert2/sweetalert2/issues/2507 - } else { + const parser = new DOMParser(); + const parsed = parser.parseFromString(html, `text/html`); + const head = parsed.querySelector('head'); + if (head) { + Array.from(head.childNodes).forEach(child => { elem.appendChild(child); - } - }); + }); + } + const body = parsed.querySelector('body'); + if (body) { + Array.from(body.childNodes).forEach(child => { + if (child instanceof HTMLVideoElement || child instanceof HTMLAudioElement) { + elem.appendChild(child.cloneNode(true)); // https://github.com/sweetalert2/sweetalert2/issues/2507 + } else { + elem.appendChild(child); + } + }); + } } }; @@ -648,12 +391,12 @@ * @param {string} className * @returns {boolean} */ - var hasClass = function hasClass(elem, className) { + const hasClass = (elem, className) => { if (!className) { return false; } - var classList = className.split(/\s+/); - for (var i = 0; i < classList.length; i++) { + const classList = className.split(/\s+/); + for (let i = 0; i < classList.length; i++) { if (!elem.classList.contains(classList[i])) { return false; } @@ -665,8 +408,8 @@ * @param {HTMLElement} elem * @param {SweetAlertOptions} params */ - var removeCustomClasses = function removeCustomClasses(elem, params) { - Array.from(elem.classList).forEach(function (className) { + const removeCustomClasses = (elem, params) => { + Array.from(elem.classList).forEach(className => { if (!Object.values(swalClasses).includes(className) && !Object.values(iconTypes).includes(className) && !Object.values(params.showClass || {}).includes(className)) { elem.classList.remove(className); } @@ -678,15 +421,20 @@ * @param {SweetAlertOptions} params * @param {string} className */ - var applyCustomClass = function applyCustomClass(elem, params, className) { + const applyCustomClass = (elem, params, className) => { removeCustomClasses(elem, params); - if (params.customClass && params.customClass[className]) { - if (typeof params.customClass[className] !== 'string' && !params.customClass[className].forEach) { - warn("Invalid type of customClass.".concat(className, "! Expected string or iterable object, got \"").concat(_typeof(params.customClass[className]), "\"")); - return; - } - addClass(elem, params.customClass[className]); + if (!params.customClass) { + return; + } + const customClass = params.customClass[(/** @type {keyof SweetAlertCustomClass} */className)]; + if (!customClass) { + return; } + if (typeof customClass !== 'string' && !customClass.forEach) { + warn(`Invalid type of customClass.${className}! Expected string or iterable object, got "${typeof customClass}"`); + return; + } + addClass(elem, customClass); }; /** @@ -694,7 +442,7 @@ * @param {import('./renderers/renderInput').InputClass | SweetAlertInput} inputClass * @returns {HTMLInputElement | null} */ - var getInput$1 = function getInput(popup, inputClass) { + const getInput$1 = (popup, inputClass) => { if (!inputClass) { return null; } @@ -702,28 +450,28 @@ case 'select': case 'textarea': case 'file': - return popup.querySelector(".".concat(swalClasses.popup, " > .").concat(swalClasses[inputClass])); + return popup.querySelector(`.${swalClasses.popup} > .${swalClasses[inputClass]}`); case 'checkbox': - return popup.querySelector(".".concat(swalClasses.popup, " > .").concat(swalClasses.checkbox, " input")); + return popup.querySelector(`.${swalClasses.popup} > .${swalClasses.checkbox} input`); case 'radio': - return popup.querySelector(".".concat(swalClasses.popup, " > .").concat(swalClasses.radio, " input:checked")) || popup.querySelector(".".concat(swalClasses.popup, " > .").concat(swalClasses.radio, " input:first-child")); + return popup.querySelector(`.${swalClasses.popup} > .${swalClasses.radio} input:checked`) || popup.querySelector(`.${swalClasses.popup} > .${swalClasses.radio} input:first-child`); case 'range': - return popup.querySelector(".".concat(swalClasses.popup, " > .").concat(swalClasses.range, " input")); + return popup.querySelector(`.${swalClasses.popup} > .${swalClasses.range} input`); default: - return popup.querySelector(".".concat(swalClasses.popup, " > .").concat(swalClasses.input)); + return popup.querySelector(`.${swalClasses.popup} > .${swalClasses.input}`); } }; /** * @param {HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement} input */ - var focusInput = function focusInput(input) { + const focusInput = input => { input.focus(); // place cursor at end of text in text input if (input.type !== 'file') { // http://stackoverflow.com/a/2345915 - var val = input.value; + const val = input.value; input.value = ''; input.value = val; } @@ -734,20 +482,28 @@ * @param {string | string[] | readonly string[] | undefined} classList * @param {boolean} condition */ - var toggleClass = function toggleClass(target, classList, condition) { + const toggleClass = (target, classList, condition) => { if (!target || !classList) { return; } if (typeof classList === 'string') { classList = classList.split(/\s+/).filter(Boolean); } - classList.forEach(function (className) { + classList.forEach(className => { if (Array.isArray(target)) { - target.forEach(function (elem) { - condition ? elem.classList.add(className) : elem.classList.remove(className); + target.forEach(elem => { + if (condition) { + elem.classList.add(className); + } else { + elem.classList.remove(className); + } }); } else { - condition ? target.classList.add(className) : target.classList.remove(className); + if (condition) { + target.classList.add(className); + } else { + target.classList.remove(className); + } } }); }; @@ -756,7 +512,7 @@ * @param {HTMLElement | HTMLElement[] | null} target * @param {string | string[] | readonly string[] | undefined} classList */ - var addClass = function addClass(target, classList) { + const addClass = (target, classList) => { toggleClass(target, classList, true); }; @@ -764,7 +520,7 @@ * @param {HTMLElement | HTMLElement[] | null} target * @param {string | string[] | readonly string[] | undefined} classList */ - var removeClass = function removeClass(target, classList) { + const removeClass = (target, classList) => { toggleClass(target, classList, false); }; @@ -775,10 +531,10 @@ * @param {string} className * @returns {HTMLElement | undefined} */ - var getDirectChildByClass = function getDirectChildByClass(elem, className) { - var children = Array.from(elem.children); - for (var i = 0; i < children.length; i++) { - var child = children[i]; + const getDirectChildByClass = (elem, className) => { + const children = Array.from(elem.children); + for (let i = 0; i < children.length; i++) { + const child = children[i]; if (child instanceof HTMLElement && hasClass(child, className)) { return child; } @@ -790,12 +546,12 @@ * @param {string} property * @param {*} value */ - var applyNumericalStyle = function applyNumericalStyle(elem, property, value) { - if (value === "".concat(parseInt(value))) { + const applyNumericalStyle = (elem, property, value) => { + if (value === `${parseInt(value)}`) { value = parseInt(value); } if (value || parseInt(value) === 0) { - elem.style.setProperty(property, typeof value === 'number' ? "".concat(value, "px") : value); + elem.style.setProperty(property, typeof value === 'number' ? `${value}px` : value); } else { elem.style.removeProperty(property); } @@ -805,28 +561,34 @@ * @param {HTMLElement | null} elem * @param {string} display */ - var show = function show(elem) { - var display = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'flex'; - elem && (elem.style.display = display); + const show = function (elem) { + let display = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'flex'; + if (!elem) { + return; + } + elem.style.display = display; }; /** * @param {HTMLElement | null} elem */ - var hide = function hide(elem) { - elem && (elem.style.display = 'none'); + const hide = elem => { + if (!elem) { + return; + } + elem.style.display = 'none'; }; /** * @param {HTMLElement | null} elem * @param {string} display */ - var showWhenInnerHtmlPresent = function showWhenInnerHtmlPresent(elem) { - var display = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'block'; + const showWhenInnerHtmlPresent = function (elem) { + let display = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'block'; if (!elem) { return; } - new MutationObserver(function () { + new MutationObserver(() => { toggle(elem, elem.innerHTML, display); }).observe(elem, { childList: true, @@ -840,9 +602,9 @@ * @param {string} property * @param {string} value */ - var setStyle = function setStyle(parent, selector, property, value) { + const setStyle = (parent, selector, property, value) => { /** @type {HTMLElement | null} */ - var el = parent.querySelector(selector); + const el = parent.querySelector(selector); if (el) { el.style.setProperty(property, value); } @@ -853,9 +615,13 @@ * @param {any} condition * @param {string} display */ - var toggle = function toggle(elem, condition) { - var display = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'flex'; - condition ? show(elem, display) : hide(elem); + const toggle = function (elem, condition) { + let display = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'flex'; + if (condition) { + show(elem, display); + } else { + hide(elem); + } }; /** @@ -864,24 +630,18 @@ * @param {HTMLElement | null} elem * @returns {boolean} */ - var isVisible$1 = function isVisible(elem) { - return !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length)); - }; + const isVisible$1 = elem => !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length)); /** * @returns {boolean} */ - var allButtonsAreHidden = function allButtonsAreHidden() { - return !isVisible$1(getConfirmButton()) && !isVisible$1(getDenyButton()) && !isVisible$1(getCancelButton()); - }; + const allButtonsAreHidden = () => !isVisible$1(getConfirmButton()) && !isVisible$1(getDenyButton()) && !isVisible$1(getCancelButton()); /** * @param {HTMLElement} elem * @returns {boolean} */ - var isScrollable = function isScrollable(elem) { - return !!(elem.scrollHeight > elem.clientHeight); - }; + const isScrollable = elem => !!(elem.scrollHeight > elem.clientHeight); /** * borrowed from https://stackoverflow.com/a/46352119 @@ -889,10 +649,10 @@ * @param {HTMLElement} elem * @returns {boolean} */ - var hasCssAnimation = function hasCssAnimation(elem) { - var style = window.getComputedStyle(elem); - var animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0'); - var transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0'); + const hasCssAnimation = elem => { + const style = window.getComputedStyle(elem); + const animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0'); + const transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0'); return animDuration > 0 || transDuration > 0; }; @@ -900,9 +660,9 @@ * @param {number} timer * @param {boolean} reset */ - var animateTimerProgressBar = function animateTimerProgressBar(timer) { - var reset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - var timerProgressBar = getTimerProgressBar(); + const animateTimerProgressBar = function (timer) { + let reset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + const timerProgressBar = getTimerProgressBar(); if (!timerProgressBar) { return; } @@ -911,23 +671,23 @@ timerProgressBar.style.transition = 'none'; timerProgressBar.style.width = '100%'; } - setTimeout(function () { - timerProgressBar.style.transition = "width ".concat(timer / 1000, "s linear"); + setTimeout(() => { + timerProgressBar.style.transition = `width ${timer / 1000}s linear`; timerProgressBar.style.width = '0%'; }, 10); } }; - var stopTimerProgressBar = function stopTimerProgressBar() { - var timerProgressBar = getTimerProgressBar(); + const stopTimerProgressBar = () => { + const timerProgressBar = getTimerProgressBar(); if (!timerProgressBar) { return; } - var timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + const timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width); timerProgressBar.style.removeProperty('transition'); timerProgressBar.style.width = '100%'; - var timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width); - var timerProgressBarPercent = timerProgressBarWidth / timerProgressBarFullWidth * 100; - timerProgressBar.style.width = "".concat(timerProgressBarPercent, "%"); + const timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + const timerProgressBarPercent = timerProgressBarWidth / timerProgressBarFullWidth * 100; + timerProgressBar.style.width = `${timerProgressBarPercent}%`; }; /** @@ -935,17 +695,48 @@ * * @returns {boolean} */ - var isNodeEnv = function isNodeEnv() { - return typeof window === 'undefined' || typeof document === 'undefined'; - }; - - var sweetHTML = "\n
\n \n
    \n
    \n \n

    \n
    \n \n \n
    \n \n \n
    \n \n
    \n \n \n
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n").replace(/(^|\n)\s*/g, ''); + const isNodeEnv = () => typeof window === 'undefined' || typeof document === 'undefined'; + + const sweetHTML = ` +
    + +
      +
      + +

      +
      + + +
      + + +
      + +
      + + +
      +
      +
      + + + +
      +
      +
      +
      +
      +
      +`.replace(/(^|\n)\s*/g, ''); /** * @returns {boolean} */ - var resetOldContainer = function resetOldContainer() { - var oldContainer = getContainer(); + const resetOldContainer = () => { + const oldContainer = getContainer(); if (!oldContainer) { return false; } @@ -953,31 +744,31 @@ removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]); return true; }; - var resetValidationMessage$1 = function resetValidationMessage() { + const resetValidationMessage$1 = () => { globalState.currentInstance.resetValidationMessage(); }; - var addInputChangeListeners = function addInputChangeListeners() { - var popup = getPopup(); - var input = getDirectChildByClass(popup, swalClasses.input); - var file = getDirectChildByClass(popup, swalClasses.file); + const addInputChangeListeners = () => { + const popup = getPopup(); + const input = getDirectChildByClass(popup, swalClasses.input); + const file = getDirectChildByClass(popup, swalClasses.file); /** @type {HTMLInputElement} */ - var range = popup.querySelector(".".concat(swalClasses.range, " input")); + const range = popup.querySelector(`.${swalClasses.range} input`); /** @type {HTMLOutputElement} */ - var rangeOutput = popup.querySelector(".".concat(swalClasses.range, " output")); - var select = getDirectChildByClass(popup, swalClasses.select); + const rangeOutput = popup.querySelector(`.${swalClasses.range} output`); + const select = getDirectChildByClass(popup, swalClasses.select); /** @type {HTMLInputElement} */ - var checkbox = popup.querySelector(".".concat(swalClasses.checkbox, " input")); - var textarea = getDirectChildByClass(popup, swalClasses.textarea); + const checkbox = popup.querySelector(`.${swalClasses.checkbox} input`); + const textarea = getDirectChildByClass(popup, swalClasses.textarea); input.oninput = resetValidationMessage$1; file.onchange = resetValidationMessage$1; select.onchange = resetValidationMessage$1; checkbox.onchange = resetValidationMessage$1; textarea.oninput = resetValidationMessage$1; - range.oninput = function () { + range.oninput = () => { resetValidationMessage$1(); rangeOutput.value = range.value; }; - range.onchange = function () { + range.onchange = () => { resetValidationMessage$1(); rangeOutput.value = range.value; }; @@ -987,15 +778,13 @@ * @param {string | HTMLElement} target * @returns {HTMLElement} */ - var getTarget = function getTarget(target) { - return typeof target === 'string' ? document.querySelector(target) : target; - }; + const getTarget = target => typeof target === 'string' ? document.querySelector(target) : target; /** * @param {SweetAlertOptions} params */ - var setupAccessibility = function setupAccessibility(params) { - var popup = getPopup(); + const setupAccessibility = params => { + const popup = getPopup(); popup.setAttribute('role', params.toast ? 'alert' : 'dialog'); popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive'); if (!params.toast) { @@ -1006,7 +795,7 @@ /** * @param {HTMLElement} targetElement */ - var setupRTL = function setupRTL(targetElement) { + const setupRTL = targetElement => { if (window.getComputedStyle(targetElement).direction === 'rtl') { addClass(getContainer(), swalClasses.rtl); } @@ -1017,20 +806,20 @@ * * @param {SweetAlertOptions} params */ - var init = function init(params) { + const init = params => { // Clean up the old popup container if it exists - var oldContainerExisted = resetOldContainer(); + const oldContainerExisted = resetOldContainer(); if (isNodeEnv()) { error('SweetAlert2 requires document to initialize'); return; } - var container = document.createElement('div'); + const container = document.createElement('div'); container.className = swalClasses.container; if (oldContainerExisted) { addClass(container, swalClasses['no-transition']); } setInnerHtml(container, sweetHTML); - var targetElement = getTarget(params.target); + const targetElement = getTarget(params.target); targetElement.appendChild(container); setupAccessibility(params); setupRTL(targetElement); @@ -1041,14 +830,14 @@ * @param {HTMLElement | object | string} param * @param {HTMLElement} target */ - var parseHtmlToContainer = function parseHtmlToContainer(param, target) { + const parseHtmlToContainer = (param, target) => { // DOM element if (param instanceof HTMLElement) { target.appendChild(param); } // Object - else if (_typeof(param) === 'object') { + else if (typeof param === 'object') { handleObject(param, target); } @@ -1062,7 +851,7 @@ * @param {any} param * @param {HTMLElement} target */ - var handleObject = function handleObject(param, target) { + const handleObject = (param, target) => { // JQuery element(s) if (param.jquery) { handleJqueryElem(target, param); @@ -1078,10 +867,10 @@ * @param {HTMLElement} target * @param {any} elem */ - var handleJqueryElem = function handleJqueryElem(target, elem) { + const handleJqueryElem = (target, elem) => { target.textContent = ''; if (0 in elem) { - for (var i = 0; (i in elem); i++) { + for (let i = 0; i in elem; i++) { target.appendChild(elem[i].cloneNode(true)); } } else { @@ -1092,12 +881,12 @@ /** * @returns {'webkitAnimationEnd' | 'animationend' | false} */ - var animationEndEvent = function () { + const animationEndEvent = (() => { // Prevent run in Node env if (isNodeEnv()) { return false; } - var testEl = document.createElement('div'); + const testEl = document.createElement('div'); // Chrome, Safari and Opera if (typeof testEl.style.webkitAnimation !== 'undefined') { @@ -1109,15 +898,15 @@ return 'animationend'; } return false; - }(); + })(); /** * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ - var renderActions = function renderActions(instance, params) { - var actions = getActions(); - var loader = getLoader(); + const renderActions = (instance, params) => { + const actions = getActions(); + const loader = getLoader(); if (!actions || !loader) { return; } @@ -1146,9 +935,9 @@ * @param {SweetAlertOptions} params */ function renderButtons(actions, loader, params) { - var confirmButton = getConfirmButton(); - var denyButton = getDenyButton(); - var cancelButton = getCancelButton(); + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); if (!confirmButton || !denyButton || !cancelButton) { return; } @@ -1204,22 +993,22 @@ * @param {SweetAlertOptions} params */ function renderButton(button, buttonType, params) { - var buttonName = /** @type {'Confirm' | 'Deny' | 'Cancel'} */capitalizeFirstLetter(buttonType); - toggle(button, params["show".concat(buttonName, "Button")], 'inline-block'); - setInnerHtml(button, params["".concat(buttonType, "ButtonText")] || ''); // Set caption text - button.setAttribute('aria-label', params["".concat(buttonType, "ButtonAriaLabel")] || ''); // ARIA label + const buttonName = /** @type {'Confirm' | 'Deny' | 'Cancel'} */capitalizeFirstLetter(buttonType); + toggle(button, params[`show${buttonName}Button`], 'inline-block'); + setInnerHtml(button, params[`${buttonType}ButtonText`] || ''); // Set caption text + button.setAttribute('aria-label', params[`${buttonType}ButtonAriaLabel`] || ''); // ARIA label // Add buttons custom classes button.className = swalClasses[buttonType]; - applyCustomClass(button, params, "".concat(buttonType, "Button")); + applyCustomClass(button, params, `${buttonType}Button`); } /** * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ - var renderCloseButton = function renderCloseButton(instance, params) { - var closeButton = getCloseButton(); + const renderCloseButton = (instance, params) => { + const closeButton = getCloseButton(); if (!closeButton) { return; } @@ -1235,8 +1024,8 @@ * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ - var renderContainer = function renderContainer(instance, params) { - var container = getContainer(); + const renderContainer = (instance, params) => { + const container = getContainer(); if (!container) { return; } @@ -1284,7 +1073,7 @@ if (!grow) { return; } - addClass(container, swalClasses["grow-".concat(grow)]); + addClass(container, swalClasses[`grow-${grow}`]); } /** @@ -1302,22 +1091,25 @@ domCache: new WeakMap() }; + /// + + /** @type {InputClass[]} */ - var inputClasses = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea']; + const inputClasses = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea']; /** * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ - var renderInput = function renderInput(instance, params) { - var popup = getPopup(); + const renderInput = (instance, params) => { + const popup = getPopup(); if (!popup) { return; } - var innerParams = privateProps.innerParams.get(instance); - var rerender = !innerParams || params.input !== innerParams.input; - inputClasses.forEach(function (inputClass) { - var inputContainer = getDirectChildByClass(popup, swalClasses[inputClass]); + const innerParams = privateProps.innerParams.get(instance); + const rerender = !innerParams || params.input !== innerParams.input; + inputClasses.forEach(inputClass => { + const inputContainer = getDirectChildByClass(popup, swalClasses[inputClass]); if (!inputContainer) { return; } @@ -1343,21 +1135,24 @@ /** * @param {SweetAlertOptions} params */ - var showInput = function showInput(params) { + const showInput = params => { if (!params.input) { return; } if (!renderInputType[params.input]) { - error("Unexpected type of input! Expected ".concat(Object.keys(renderInputType).join(' | '), ", got \"").concat(params.input, "\"")); + error(`Unexpected type of input! Expected ${Object.keys(renderInputType).join(' | ')}, got "${params.input}"`); return; } - var inputContainer = getInputContainer(params.input); - var input = renderInputType[params.input](inputContainer, params); + const inputContainer = getInputContainer(params.input); + if (!inputContainer) { + return; + } + const input = renderInputType[params.input](inputContainer, params); show(inputContainer); // input autofocus if (params.inputAutoFocus) { - setTimeout(function () { + setTimeout(() => { focusInput(input); }); } @@ -1366,9 +1161,9 @@ /** * @param {HTMLInputElement} input */ - var removeAttributes = function removeAttributes(input) { - for (var i = 0; i < input.attributes.length; i++) { - var attrName = input.attributes[i].name; + const removeAttributes = input => { + for (let i = 0; i < input.attributes.length; i++) { + const attrName = input.attributes[i].name; if (!['id', 'type', 'value', 'style'].includes(attrName)) { input.removeAttribute(attrName); } @@ -1379,13 +1174,17 @@ * @param {InputClass} inputClass * @param {SweetAlertOptions['inputAttributes']} inputAttributes */ - var setAttributes = function setAttributes(inputClass, inputAttributes) { - var input = getInput$1(getPopup(), inputClass); + const setAttributes = (inputClass, inputAttributes) => { + const popup = getPopup(); + if (!popup) { + return; + } + const input = getInput$1(popup, inputClass); if (!input) { return; } removeAttributes(input); - for (var attr in inputAttributes) { + for (const attr in inputAttributes) { input.setAttribute(attr, inputAttributes[attr]); } }; @@ -1393,10 +1192,13 @@ /** * @param {SweetAlertOptions} params */ - var setCustomClass = function setCustomClass(params) { - var inputContainer = getInputContainer(params.input); - if (_typeof(params.customClass) === 'object') { - addClass(inputContainer, params.customClass.input); + const setCustomClass = params => { + if (!params.input) { + return; + } + const inputContainer = getInputContainer(params.input); + if (inputContainer) { + applyCustomClass(inputContainer, params, 'input'); } }; @@ -1404,8 +1206,8 @@ * @param {HTMLInputElement | HTMLTextAreaElement} input * @param {SweetAlertOptions} params */ - var setInputPlaceholder = function setInputPlaceholder(input, params) { - if (!input.placeholder || params.inputPlaceholder) { + const setInputPlaceholder = (input, params) => { + if (!input.placeholder && params.inputPlaceholder) { input.placeholder = params.inputPlaceholder; } }; @@ -1415,13 +1217,13 @@ * @param {Input} prependTo * @param {SweetAlertOptions} params */ - var setInputLabel = function setInputLabel(input, prependTo, params) { + const setInputLabel = (input, prependTo, params) => { if (params.inputLabel) { - var label = document.createElement('label'); - var labelClass = swalClasses['input-label']; + const label = document.createElement('label'); + const labelClass = swalClasses['input-label']; label.setAttribute('for', input.id); label.className = labelClass; - if (_typeof(params.customClass) === 'object') { + if (typeof params.customClass === 'object') { addClass(label, params.customClass.inputLabel); } label.innerText = params.inputLabel; @@ -1430,34 +1232,39 @@ }; /** - * @param {SweetAlertOptions['input']} inputType - * @returns {HTMLElement} + * @param {SweetAlertInput} inputType + * @returns {HTMLElement | undefined} */ - var getInputContainer = function getInputContainer(inputType) { - return getDirectChildByClass(getPopup(), swalClasses[inputType] || swalClasses.input); + const getInputContainer = inputType => { + const popup = getPopup(); + if (!popup) { + return; + } + return getDirectChildByClass(popup, swalClasses[(/** @type {SwalClass} */inputType)] || swalClasses.input); }; /** * @param {HTMLInputElement | HTMLOutputElement | HTMLTextAreaElement} input * @param {SweetAlertOptions['inputValue']} inputValue */ - var checkAndSetInputValue = function checkAndSetInputValue(input, inputValue) { - if (['string', 'number'].includes(_typeof(inputValue))) { - input.value = "".concat(inputValue); + const checkAndSetInputValue = (input, inputValue) => { + if (['string', 'number'].includes(typeof inputValue)) { + input.value = `${inputValue}`; } else if (!isPromise(inputValue)) { - warn("Unexpected type of inputValue! Expected \"string\", \"number\" or \"Promise\", got \"".concat(_typeof(inputValue), "\"")); + warn(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof inputValue}"`); } }; /** @type {Record Input>} */ - var renderInputType = {}; + const renderInputType = {}; /** * @param {HTMLInputElement} input * @param {SweetAlertOptions} params * @returns {HTMLInputElement} */ - renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = renderInputType.search = renderInputType.date = renderInputType['datetime-local'] = renderInputType.time = renderInputType.week = renderInputType.month = function (input, params) { + renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = renderInputType.search = renderInputType.date = renderInputType['datetime-local'] = renderInputType.time = renderInputType.week = renderInputType.month = /** @type {(input: Input | HTMLElement, params: SweetAlertOptions) => Input} */ + (input, params) => { checkAndSetInputValue(input, params.inputValue); setInputLabel(input, input, params); setInputPlaceholder(input, params); @@ -1470,7 +1277,7 @@ * @param {SweetAlertOptions} params * @returns {HTMLInputElement} */ - renderInputType.file = function (input, params) { + renderInputType.file = (input, params) => { setInputLabel(input, input, params); setInputPlaceholder(input, params); return input; @@ -1481,9 +1288,9 @@ * @param {SweetAlertOptions} params * @returns {HTMLInputElement} */ - renderInputType.range = function (range, params) { - var rangeInput = range.querySelector('input'); - var rangeOutput = range.querySelector('output'); + renderInputType.range = (range, params) => { + const rangeInput = range.querySelector('input'); + const rangeOutput = range.querySelector('output'); checkAndSetInputValue(rangeInput, params.inputValue); rangeInput.type = params.input; checkAndSetInputValue(rangeOutput, params.inputValue); @@ -1496,10 +1303,10 @@ * @param {SweetAlertOptions} params * @returns {HTMLSelectElement} */ - renderInputType.select = function (select, params) { + renderInputType.select = (select, params) => { select.textContent = ''; if (params.inputPlaceholder) { - var placeholder = document.createElement('option'); + const placeholder = document.createElement('option'); setInnerHtml(placeholder, params.inputPlaceholder); placeholder.value = ''; placeholder.disabled = true; @@ -1514,7 +1321,7 @@ * @param {HTMLInputElement} radio * @returns {HTMLInputElement} */ - renderInputType.radio = function (radio) { + renderInputType.radio = radio => { radio.textContent = ''; return radio; }; @@ -1524,11 +1331,11 @@ * @param {SweetAlertOptions} params * @returns {HTMLInputElement} */ - renderInputType.checkbox = function (checkboxContainer, params) { - var checkbox = getInput$1(getPopup(), 'checkbox'); + renderInputType.checkbox = (checkboxContainer, params) => { + const checkbox = getInput$1(getPopup(), 'checkbox'); checkbox.value = '1'; checkbox.checked = Boolean(params.inputValue); - var label = checkboxContainer.querySelector('span'); + const label = checkboxContainer.querySelector('span'); setInnerHtml(label, params.inputPlaceholder); return checkbox; }; @@ -1538,7 +1345,7 @@ * @param {SweetAlertOptions} params * @returns {HTMLTextAreaElement} */ - renderInputType.textarea = function (textarea, params) { + renderInputType.textarea = (textarea, params) => { checkAndSetInputValue(textarea, params.inputValue); setInputPlaceholder(textarea, params); setInputLabel(textarea, textarea, params); @@ -1547,23 +1354,21 @@ * @param {HTMLElement} el * @returns {number} */ - var getMargin = function getMargin(el) { - return parseInt(window.getComputedStyle(el).marginLeft) + parseInt(window.getComputedStyle(el).marginRight); - }; + const getMargin = el => parseInt(window.getComputedStyle(el).marginLeft) + parseInt(window.getComputedStyle(el).marginRight); // https://github.com/sweetalert2/sweetalert2/issues/2291 - setTimeout(function () { + setTimeout(() => { // https://github.com/sweetalert2/sweetalert2/issues/1699 if ('MutationObserver' in window) { - var initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width); - var textareaResizeHandler = function textareaResizeHandler() { + const initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width); + const textareaResizeHandler = () => { // check if texarea is still in document (i.e. popup wasn't closed in the meantime) if (!document.body.contains(textarea)) { return; } - var textareaWidth = textarea.offsetWidth + getMargin(textarea); + const textareaWidth = textarea.offsetWidth + getMargin(textarea); if (textareaWidth > initialPopupWidth) { - getPopup().style.width = "".concat(textareaWidth, "px"); + getPopup().style.width = `${textareaWidth}px`; } else { applyNumericalStyle(getPopup(), 'width', params.width); } @@ -1581,8 +1386,8 @@ * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ - var renderContent = function renderContent(instance, params) { - var htmlContainer = getHtmlContainer(); + const renderContent = (instance, params) => { + const htmlContainer = getHtmlContainer(); if (!htmlContainer) { return; } @@ -1612,8 +1417,8 @@ * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ - var renderFooter = function renderFooter(instance, params) { - var footer = getFooter(); + const renderFooter = (instance, params) => { + const footer = getFooter(); if (!footer) { return; } @@ -1631,9 +1436,9 @@ * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ - var renderIcon = function renderIcon(instance, params) { - var innerParams = privateProps.innerParams.get(instance); - var icon = getIcon(); + const renderIcon = (instance, params) => { + const innerParams = privateProps.innerParams.get(instance); + const icon = getIcon(); if (!icon) { return; } @@ -1650,7 +1455,7 @@ return; } if (params.icon && Object.keys(iconTypes).indexOf(params.icon) === -1) { - error("Unknown icon! Expected \"success\", \"error\", \"warning\", \"info\" or \"question\", got \"".concat(params.icon, "\"")); + error(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${params.icon}"`); hide(icon); return; } @@ -1668,11 +1473,8 @@ * @param {HTMLElement} icon * @param {SweetAlertOptions} params */ - var applyStyles = function applyStyles(icon, params) { - for (var _i = 0, _Object$entries = Object.entries(iconTypes); _i < _Object$entries.length; _i++) { - var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2), - iconType = _Object$entries$_i[0], - iconClassName = _Object$entries$_i[1]; + const applyStyles = (icon, params) => { + for (const [iconType, iconClassName] of Object.entries(iconTypes)) { if (params.icon !== iconType) { removeClass(icon, iconClassName); } @@ -1690,31 +1492,41 @@ }; // Adjust success icon background color to match the popup background color - var adjustSuccessIconBackgroundColor = function adjustSuccessIconBackgroundColor() { - var popup = getPopup(); + const adjustSuccessIconBackgroundColor = () => { + const popup = getPopup(); if (!popup) { return; } - var popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color'); + const popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color'); /** @type {NodeListOf} */ - var successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix'); - for (var i = 0; i < successIconParts.length; i++) { + const successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix'); + for (let i = 0; i < successIconParts.length; i++) { successIconParts[i].style.backgroundColor = popupBackgroundColor; } }; - var successIconHtml = "\n
      \n \n
      \n
      \n"; - var errorIconHtml = "\n \n \n \n \n"; + const successIconHtml = ` +
      + +
      +
      +`; + const errorIconHtml = ` + + + + +`; /** * @param {HTMLElement} icon * @param {SweetAlertOptions} params */ - var setContent = function setContent(icon, params) { + const setContent = (icon, params) => { if (!params.icon && !params.iconHtml) { return; } - var oldContent = icon.innerHTML; - var newContent = ''; + let oldContent = icon.innerHTML; + let newContent = ''; if (params.iconHtml) { newContent = iconContent(params.iconHtml); } else if (params.icon === 'success') { @@ -1723,7 +1535,7 @@ } else if (params.icon === 'error') { newContent = errorIconHtml; } else if (params.icon) { - var defaultIconHtml = { + const defaultIconHtml = { question: '?', warning: '!', info: 'i' @@ -1739,14 +1551,13 @@ * @param {HTMLElement} icon * @param {SweetAlertOptions} params */ - var setColor = function setColor(icon, params) { + const setColor = (icon, params) => { if (!params.iconColor) { return; } icon.style.color = params.iconColor; icon.style.borderColor = params.iconColor; - for (var _i2 = 0, _arr = ['.swal2-success-line-tip', '.swal2-success-line-long', '.swal2-x-mark-line-left', '.swal2-x-mark-line-right']; _i2 < _arr.length; _i2++) { - var sel = _arr[_i2]; + for (const sel of ['.swal2-success-line-tip', '.swal2-success-line-long', '.swal2-x-mark-line-left', '.swal2-x-mark-line-right']) { setStyle(icon, sel, 'background-color', params.iconColor); } setStyle(icon, '.swal2-success-ring', 'border-color', params.iconColor); @@ -1756,16 +1567,14 @@ * @param {string} content * @returns {string} */ - var iconContent = function iconContent(content) { - return "
      ").concat(content, "
      "); - }; + const iconContent = content => `
      ${content}
      `; /** * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ - var renderImage = function renderImage(instance, params) { - var image = getImage(); + const renderImage = (instance, params) => { + const image = getImage(); if (!image) { return; } @@ -1792,9 +1601,9 @@ * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ - var renderPopup = function renderPopup(instance, params) { - var container = getContainer(); - var popup = getPopup(); + const renderPopup = (instance, params) => { + const container = getContainer(); + const popup = getPopup(); if (!container || !popup) { return; } @@ -1804,8 +1613,10 @@ if (params.toast) { applyNumericalStyle(container, 'width', params.width); popup.style.width = '100%'; - var loader = getLoader(); - loader && popup.insertBefore(loader, getIcon()); + const loader = getLoader(); + if (loader) { + popup.insertBefore(loader, getIcon()); + } } else { applyNumericalStyle(popup, 'width', params.width); } @@ -1832,10 +1643,10 @@ * @param {HTMLElement} popup * @param {SweetAlertOptions} params */ - var addClasses$1 = function addClasses(popup, params) { - var showClass = params.showClass || {}; + const addClasses$1 = (popup, params) => { + const showClass = params.showClass || {}; // Default Class + showClass when updating Swal.update({}) - popup.className = "".concat(swalClasses.popup, " ").concat(isVisible$1(popup) ? showClass.popup : ''); + popup.className = `${swalClasses.popup} ${isVisible$1(popup) ? showClass.popup : ''}`; if (params.toast) { addClass([document.documentElement, document.body], swalClasses['toast-shown']); addClass(popup, swalClasses.toast); @@ -1845,13 +1656,14 @@ // Custom class applyCustomClass(popup, params, 'popup'); + // TODO: remove in the next major if (typeof params.customClass === 'string') { addClass(popup, params.customClass); } // Icon class (#1842) if (params.icon) { - addClass(popup, swalClasses["icon-".concat(params.icon)]); + addClass(popup, swalClasses[`icon-${params.icon}`]); } }; @@ -1859,13 +1671,15 @@ * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ - var renderProgressSteps = function renderProgressSteps(instance, params) { - var progressStepsContainer = getProgressSteps(); + const renderProgressSteps = (instance, params) => { + const progressStepsContainer = getProgressSteps(); if (!progressStepsContainer) { return; } - var progressSteps = params.progressSteps, - currentProgressStep = params.currentProgressStep; + const { + progressSteps, + currentProgressStep + } = params; if (!progressSteps || progressSteps.length === 0 || currentProgressStep === undefined) { hide(progressStepsContainer); return; @@ -1875,14 +1689,14 @@ if (currentProgressStep >= progressSteps.length) { warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)'); } - progressSteps.forEach(function (step, index) { - var stepEl = createStepElement(step); + progressSteps.forEach((step, index) => { + const stepEl = createStepElement(step); progressStepsContainer.appendChild(stepEl); if (index === currentProgressStep) { addClass(stepEl, swalClasses['active-progress-step']); } if (index !== progressSteps.length - 1) { - var lineEl = createLineElement(params); + const lineEl = createLineElement(params); progressStepsContainer.appendChild(lineEl); } }); @@ -1892,8 +1706,8 @@ * @param {string} step * @returns {HTMLLIElement} */ - var createStepElement = function createStepElement(step) { - var stepEl = document.createElement('li'); + const createStepElement = step => { + const stepEl = document.createElement('li'); addClass(stepEl, swalClasses['progress-step']); setInnerHtml(stepEl, step); return stepEl; @@ -1903,8 +1717,8 @@ * @param {SweetAlertOptions} params * @returns {HTMLLIElement} */ - var createLineElement = function createLineElement(params) { - var lineEl = document.createElement('li'); + const createLineElement = params => { + const lineEl = document.createElement('li'); addClass(lineEl, swalClasses['progress-step-line']); if (params.progressStepsDistance) { applyNumericalStyle(lineEl, 'width', params.progressStepsDistance); @@ -1916,8 +1730,8 @@ * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ - var renderTitle = function renderTitle(instance, params) { - var title = getTitle(); + const renderTitle = (instance, params) => { + const title = getTitle(); if (!title) { return; } @@ -1938,7 +1752,7 @@ * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ - var render = function render(instance, params) { + const render = (instance, params) => { renderPopup(instance, params); renderContainer(instance, params); renderProgressSteps(instance, params); @@ -1949,7 +1763,7 @@ renderContent(instance, params); renderActions(instance, params); renderFooter(instance, params); - var popup = getPopup(); + const popup = getPopup(); if (typeof params.didRender === 'function' && popup) { params.didRender(popup); } @@ -1958,14 +1772,14 @@ /* * Global function to determine if SweetAlert2 popup is shown */ - var isVisible = function isVisible() { + const isVisible = () => { return isVisible$1(getPopup()); }; /* * Global function to click 'Confirm' button */ - var clickConfirm = function clickConfirm() { + const clickConfirm = () => { var _dom$getConfirmButton; return (_dom$getConfirmButton = getConfirmButton()) === null || _dom$getConfirmButton === void 0 ? void 0 : _dom$getConfirmButton.click(); }; @@ -1973,7 +1787,7 @@ /* * Global function to click 'Deny' button */ - var clickDeny = function clickDeny() { + const clickDeny = () => { var _dom$getDenyButton; return (_dom$getDenyButton = getDenyButton()) === null || _dom$getDenyButton === void 0 ? void 0 : _dom$getDenyButton.click(); }; @@ -1981,7 +1795,7 @@ /* * Global function to click 'Cancel' button */ - var clickCancel = function clickCancel() { + const clickCancel = () => { var _dom$getCancelButton; return (_dom$getCancelButton = getCancelButton()) === null || _dom$getCancelButton === void 0 ? void 0 : _dom$getCancelButton.click(); }; @@ -1989,7 +1803,7 @@ /** @typedef {'cancel' | 'backdrop' | 'close' | 'esc' | 'timer'} DismissReason */ /** @type {Record} */ - var DismissReason = Object.freeze({ + const DismissReason = Object.freeze({ cancel: 'cancel', backdrop: 'backdrop', close: 'close', @@ -2000,7 +1814,7 @@ /** * @param {GlobalState} globalState */ - var removeKeydownHandler = function removeKeydownHandler(globalState) { + const removeKeydownHandler = globalState => { if (globalState.keydownTarget && globalState.keydownHandlerAdded) { globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { capture: globalState.keydownListenerCapture @@ -2014,12 +1828,10 @@ * @param {SweetAlertOptions} innerParams * @param {*} dismissWith */ - var addKeydownHandler = function addKeydownHandler(globalState, innerParams, dismissWith) { + const addKeydownHandler = (globalState, innerParams, dismissWith) => { removeKeydownHandler(globalState); if (!innerParams.toast) { - globalState.keydownHandler = function (e) { - return keydownHandler(innerParams, e, dismissWith); - }; + globalState.keydownHandler = e => keydownHandler(innerParams, e, dismissWith); globalState.keydownTarget = innerParams.keydownListenerCapture ? window : getPopup(); globalState.keydownListenerCapture = innerParams.keydownListenerCapture; globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, { @@ -2033,9 +1845,9 @@ * @param {number} index * @param {number} increment */ - var setFocus = function setFocus(index, increment) { + const setFocus = (index, increment) => { var _dom$getPopup; - var focusableElements = getFocusableElements(); + const focusableElements = getFocusableElements(); // search for visible elements and select the next possible match if (focusableElements.length) { index = index + increment; @@ -2054,15 +1866,15 @@ // no visible focusable elements, focus the popup (_dom$getPopup = getPopup()) === null || _dom$getPopup === void 0 || _dom$getPopup.focus(); }; - var arrowKeysNextButton = ['ArrowRight', 'ArrowDown']; - var arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp']; + const arrowKeysNextButton = ['ArrowRight', 'ArrowDown']; + const arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp']; /** * @param {SweetAlertOptions} innerParams * @param {KeyboardEvent} event * @param {Function} dismissWith */ - var keydownHandler = function keydownHandler(innerParams, event, dismissWith) { + const keydownHandler = (innerParams, event, dismissWith) => { if (!innerParams) { return; // This instance has already been destroyed } @@ -2089,7 +1901,7 @@ } // ARROWS - switch focus between buttons - else if ([].concat(arrowKeysNextButton, arrowKeysPreviousButton).includes(event.key)) { + else if ([...arrowKeysNextButton, ...arrowKeysPreviousButton].includes(event.key)) { handleArrows(event.key); } @@ -2103,12 +1915,12 @@ * @param {KeyboardEvent} event * @param {SweetAlertOptions} innerParams */ - var handleEnter = function handleEnter(event, innerParams) { + const handleEnter = (event, innerParams) => { // https://github.com/sweetalert2/sweetalert2/issues/2386 if (!callIfFunction(innerParams.allowEnterKey)) { return; } - var input = getInput$1(getPopup(), innerParams.input); + const input = getInput$1(getPopup(), innerParams.input); if (event.target && input && event.target instanceof HTMLElement && event.target.outerHTML === input.outerHTML) { if (['textarea', 'file'].includes(innerParams.input)) { return; // do not submit @@ -2121,11 +1933,11 @@ /** * @param {KeyboardEvent} event */ - var handleTab = function handleTab(event) { - var targetElement = event.target; - var focusableElements = getFocusableElements(); - var btnIndex = -1; - for (var i = 0; i < focusableElements.length; i++) { + const handleTab = event => { + const targetElement = event.target; + const focusableElements = getFocusableElements(); + let btnIndex = -1; + for (let i = 0; i < focusableElements.length; i++) { if (targetElement === focusableElements[i]) { btnIndex = i; break; @@ -2148,25 +1960,25 @@ /** * @param {string} key */ - var handleArrows = function handleArrows(key) { - var actions = getActions(); - var confirmButton = getConfirmButton(); - var denyButton = getDenyButton(); - var cancelButton = getCancelButton(); + const handleArrows = key => { + const actions = getActions(); + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); if (!actions || !confirmButton || !denyButton || !cancelButton) { return; } /** @type HTMLElement[] */ - var buttons = [confirmButton, denyButton, cancelButton]; + const buttons = [confirmButton, denyButton, cancelButton]; if (document.activeElement instanceof HTMLElement && !buttons.includes(document.activeElement)) { return; } - var sibling = arrowKeysNextButton.includes(key) ? 'nextElementSibling' : 'previousElementSibling'; - var buttonToFocus = document.activeElement; + const sibling = arrowKeysNextButton.includes(key) ? 'nextElementSibling' : 'previousElementSibling'; + let buttonToFocus = document.activeElement; if (!buttonToFocus) { return; } - for (var i = 0; i < actions.children.length; i++) { + for (let i = 0; i < actions.children.length; i++) { buttonToFocus = buttonToFocus[sibling]; if (!buttonToFocus) { return; @@ -2185,7 +1997,7 @@ * @param {SweetAlertOptions} innerParams * @param {Function} dismissWith */ - var handleEsc = function handleEsc(event, innerParams, dismissWith) { + const handleEsc = (event, innerParams, dismissWith) => { if (callIfFunction(innerParams.allowEscapeKey)) { event.preventDefault(); dismissWith(DismissReason.esc); @@ -2212,10 +2024,10 @@ // elements not within the active modal dialog will not be surfaced if a user opens a screen // reader’s list of elements (headings, form controls, landmarks, etc.) in the document. - var setAriaHidden = function setAriaHidden() { - var container = getContainer(); - var bodyChildren = Array.from(document.body.children); - bodyChildren.forEach(function (el) { + const setAriaHidden = () => { + const container = getContainer(); + const bodyChildren = Array.from(document.body.children); + bodyChildren.forEach(el => { if (el.contains(container)) { return; } @@ -2225,9 +2037,9 @@ el.setAttribute('aria-hidden', 'true'); }); }; - var unsetAriaHidden = function unsetAriaHidden() { - var bodyChildren = Array.from(document.body.children); - bodyChildren.forEach(function (el) { + const unsetAriaHidden = () => { + const bodyChildren = Array.from(document.body.children); + bodyChildren.forEach(el => { if (el.hasAttribute('data-previous-aria-hidden')) { el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden') || ''); el.removeAttribute('data-previous-aria-hidden'); @@ -2238,16 +2050,16 @@ }; // @ts-ignore - var isSafariOrIOS = typeof window !== 'undefined' && !!window.GestureEvent; // true for Safari desktop + all iOS browsers https://stackoverflow.com/a/70585394 + const isSafariOrIOS = typeof window !== 'undefined' && !!window.GestureEvent; // true for Safari desktop + all iOS browsers https://stackoverflow.com/a/70585394 /** * Fix iOS scrolling * http://stackoverflow.com/q/39626302 */ - var iOSfix = function iOSfix() { + const iOSfix = () => { if (isSafariOrIOS && !hasClass(document.body, swalClasses.iosfix)) { - var offset = document.body.scrollTop; - document.body.style.top = "".concat(offset * -1, "px"); + const offset = document.body.scrollTop; + document.body.style.top = `${offset * -1}px`; addClass(document.body, swalClasses.iosfix); lockBodyScroll(); } @@ -2256,23 +2068,23 @@ /** * https://github.com/sweetalert2/sweetalert2/issues/1246 */ - var lockBodyScroll = function lockBodyScroll() { - var container = getContainer(); + const lockBodyScroll = () => { + const container = getContainer(); if (!container) { return; } /** @type {boolean} */ - var preventTouchMove; + let preventTouchMove; /** * @param {TouchEvent} event */ - container.ontouchstart = function (event) { + container.ontouchstart = event => { preventTouchMove = shouldPreventTouchMove(event); }; /** * @param {TouchEvent} event */ - container.ontouchmove = function (event) { + container.ontouchmove = event => { if (preventTouchMove) { event.preventDefault(); event.stopPropagation(); @@ -2284,10 +2096,10 @@ * @param {TouchEvent} event * @returns {boolean} */ - var shouldPreventTouchMove = function shouldPreventTouchMove(event) { - var target = event.target; - var container = getContainer(); - var htmlContainer = getHtmlContainer(); + const shouldPreventTouchMove = event => { + const target = event.target; + const container = getContainer(); + const htmlContainer = getHtmlContainer(); if (!container || !htmlContainer) { return false; } @@ -2315,7 +2127,7 @@ * @param {*} event * @returns {boolean} */ - var isStylus = function isStylus(event) { + const isStylus = event => { return event.touches && event.touches.length && event.touches[0].touchType === 'stylus'; }; @@ -2325,12 +2137,12 @@ * @param {TouchEvent} event * @returns {boolean} */ - var isZoom = function isZoom(event) { + const isZoom = event => { return event.touches && event.touches.length > 1; }; - var undoIOSfix = function undoIOSfix() { + const undoIOSfix = () => { if (hasClass(document.body, swalClasses.iosfix)) { - var offset = parseInt(document.body.style.top, 10); + const offset = parseInt(document.body.style.top, 10); removeClass(document.body, swalClasses.iosfix); document.body.style.top = ''; document.body.scrollTop = offset * -1; @@ -2343,11 +2155,11 @@ * * @returns {number} */ - var measureScrollbar = function measureScrollbar() { - var scrollDiv = document.createElement('div'); + const measureScrollbar = () => { + const scrollDiv = document.createElement('div'); scrollDiv.className = swalClasses['scrollbar-measure']; document.body.appendChild(scrollDiv); - var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; + const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; document.body.removeChild(scrollDiv); return scrollbarWidth; }; @@ -2356,12 +2168,12 @@ * Remember state in cases where opening and handling a modal will fiddle with it. * @type {number | null} */ - var previousBodyPadding = null; + let previousBodyPadding = null; /** * @param {string} initialBodyOverflow */ - var replaceScrollbarWithPadding = function replaceScrollbarWithPadding(initialBodyOverflow) { + const replaceScrollbarWithPadding = initialBodyOverflow => { // for queues, do not do this more than once if (previousBodyPadding !== null) { return; @@ -2371,12 +2183,12 @@ ) { // add padding so the content doesn't shift after removal of scrollbar previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right')); - document.body.style.paddingRight = "".concat(previousBodyPadding + measureScrollbar(), "px"); + document.body.style.paddingRight = `${previousBodyPadding + measureScrollbar()}px`; } }; - var undoReplaceScrollbarWithPadding = function undoReplaceScrollbarWithPadding() { + const undoReplaceScrollbarWithPadding = () => { if (previousBodyPadding !== null) { - document.body.style.paddingRight = "".concat(previousBodyPadding, "px"); + document.body.style.paddingRight = `${previousBodyPadding}px`; previousBodyPadding = null; } }; @@ -2391,9 +2203,7 @@ if (isToast()) { triggerDidCloseAndDispose(instance, didClose); } else { - restoreActiveElement(returnFocus).then(function () { - return triggerDidCloseAndDispose(instance, didClose); - }); + restoreActiveElement(returnFocus).then(() => triggerDidCloseAndDispose(instance, didClose)); removeKeydownHandler(globalState); } @@ -2428,8 +2238,8 @@ */ function close(resolveValue) { resolveValue = prepareResolveValue(resolveValue); - var swalPromiseResolve = privateMethods.swalPromiseResolve.get(this); - var didClose = triggerClosePopup(this); + const swalPromiseResolve = privateMethods.swalPromiseResolve.get(this); + const didClose = triggerClosePopup(this); if (this.isAwaitingPromise) { // A swal awaiting for a promise (after a click on Confirm or Deny) cannot be dismissed anymore #2335 if (!resolveValue.isDismissed) { @@ -2441,18 +2251,18 @@ swalPromiseResolve(resolveValue); } } - var triggerClosePopup = function triggerClosePopup(instance) { - var popup = getPopup(); + const triggerClosePopup = instance => { + const popup = getPopup(); if (!popup) { return false; } - var innerParams = privateProps.innerParams.get(instance); + const innerParams = privateProps.innerParams.get(instance); if (!innerParams || hasClass(popup, innerParams.hideClass.popup)) { return false; } removeClass(popup, innerParams.showClass.popup); addClass(popup, innerParams.hideClass.popup); - var backdrop = getContainer(); + const backdrop = getContainer(); removeClass(backdrop, innerParams.showClass.backdrop); addClass(backdrop, innerParams.hideClass.backdrop); handlePopupAnimation(instance, popup, innerParams); @@ -2463,7 +2273,7 @@ * @param {any} error */ function rejectPromise(error) { - var rejectPromise = privateMethods.swalPromiseReject.get(this); + const rejectPromise = privateMethods.swalPromiseReject.get(this); handleAwaitingPromise(this); if (rejectPromise) { // Reject Swal promise @@ -2474,7 +2284,7 @@ /** * @param {SweetAlert} instance */ - var handleAwaitingPromise = function handleAwaitingPromise(instance) { + const handleAwaitingPromise = instance => { if (instance.isAwaitingPromise) { delete instance.isAwaitingPromise; // The instance might have been previously partly destroyed, we must resume the destroy process in this case #2335 @@ -2488,7 +2298,7 @@ * @param {any} resolveValue * @returns {SweetAlertResult} */ - var prepareResolveValue = function prepareResolveValue(resolveValue) { + const prepareResolveValue = resolveValue => { // When user calls Swal.close() if (typeof resolveValue === 'undefined') { return { @@ -2509,10 +2319,10 @@ * @param {HTMLElement} popup * @param {SweetAlertOptions} innerParams */ - var handlePopupAnimation = function handlePopupAnimation(instance, popup, innerParams) { - var container = getContainer(); + const handlePopupAnimation = (instance, popup, innerParams) => { + const container = getContainer(); // If animation is supported, animate - var animationIsSupported = animationEndEvent && hasCssAnimation(popup); + const animationIsSupported = animationEndEvent && hasCssAnimation(popup); if (typeof innerParams.willClose === 'function') { innerParams.willClose(popup); } @@ -2531,7 +2341,7 @@ * @param {boolean} returnFocus * @param {Function} didClose */ - var animatePopup = function animatePopup(instance, popup, container, returnFocus, didClose) { + const animatePopup = (instance, popup, container, returnFocus, didClose) => { if (!animationEndEvent) { return; } @@ -2548,8 +2358,8 @@ * @param {SweetAlert} instance * @param {Function} didClose */ - var triggerDidCloseAndDispose = function triggerDidCloseAndDispose(instance, didClose) { - setTimeout(function () { + const triggerDidCloseAndDispose = (instance, didClose) => { + setTimeout(() => { if (typeof didClose === 'function') { didClose.bind(instance.params)(); } @@ -2566,16 +2376,16 @@ * * @param {HTMLButtonElement | null} [buttonToReplace] */ - var showLoading = function showLoading(buttonToReplace) { - var popup = getPopup(); + const showLoading = buttonToReplace => { + let popup = getPopup(); if (!popup) { - new Swal(); // eslint-disable-line no-new + new Swal(); } popup = getPopup(); if (!popup) { return; } - var loader = getLoader(); + const loader = getLoader(); if (isToast()) { hide(getIcon()); } else { @@ -2591,9 +2401,9 @@ * @param {HTMLElement} popup * @param {HTMLButtonElement | null} [buttonToReplace] */ - var replaceButton = function replaceButton(popup, buttonToReplace) { - var actions = getActions(); - var loader = getLoader(); + const replaceButton = (popup, buttonToReplace) => { + const actions = getActions(); + const loader = getLoader(); if (!actions || !loader) { return; } @@ -2613,12 +2423,10 @@ * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ - var handleInputOptionsAndValue = function handleInputOptionsAndValue(instance, params) { + const handleInputOptionsAndValue = (instance, params) => { if (params.input === 'select' || params.input === 'radio') { handleInputOptions(instance, params); - } else if (['text', 'email', 'number', 'tel', 'textarea'].some(function (i) { - return i === params.input; - }) && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) { + } else if (['text', 'email', 'number', 'tel', 'textarea'].some(i => i === params.input) && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) { showLoading(getConfirmButton()); handleInputValue(instance, params); } @@ -2629,8 +2437,8 @@ * @param {SweetAlertOptions} innerParams * @returns {SweetAlertInputValue} */ - var getInputValue = function getInputValue(instance, innerParams) { - var input = instance.getInput(); + const getInputValue = (instance, innerParams) => { + const input = instance.getInput(); if (!input) { return null; } @@ -2650,39 +2458,33 @@ * @param {HTMLInputElement} input * @returns {number} */ - var getCheckboxValue = function getCheckboxValue(input) { - return input.checked ? 1 : 0; - }; + const getCheckboxValue = input => input.checked ? 1 : 0; /** * @param {HTMLInputElement} input * @returns {string | null} */ - var getRadioValue = function getRadioValue(input) { - return input.checked ? input.value : null; - }; + const getRadioValue = input => input.checked ? input.value : null; /** * @param {HTMLInputElement} input * @returns {FileList | File | null} */ - var getFileValue = function getFileValue(input) { - return input.files && input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null; - }; + const getFileValue = input => input.files && input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null; /** * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ - var handleInputOptions = function handleInputOptions(instance, params) { - var popup = getPopup(); + const handleInputOptions = (instance, params) => { + const popup = getPopup(); if (!popup) { return; } /** * @param {Record} inputOptions */ - var processInputOptions = function processInputOptions(inputOptions) { + const processInputOptions = inputOptions => { if (params.input === 'select') { populateSelectOptions(popup, formatInputOptions(inputOptions), params); } else if (params.input === 'radio') { @@ -2691,14 +2493,14 @@ }; if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) { showLoading(getConfirmButton()); - asPromise(params.inputOptions).then(function (inputOptions) { + asPromise(params.inputOptions).then(inputOptions => { instance.hideLoading(); processInputOptions(inputOptions); }); - } else if (_typeof(params.inputOptions) === 'object') { + } else if (typeof params.inputOptions === 'object') { processInputOptions(params.inputOptions); } else { - error("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(_typeof(params.inputOptions))); + error(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof params.inputOptions}`); } }; @@ -2706,19 +2508,19 @@ * @param {SweetAlert} instance * @param {SweetAlertOptions} params */ - var handleInputValue = function handleInputValue(instance, params) { - var input = instance.getInput(); + const handleInputValue = (instance, params) => { + const input = instance.getInput(); if (!input) { return; } hide(input); - asPromise(params.inputValue).then(function (inputValue) { - input.value = params.input === 'number' ? "".concat(parseFloat(inputValue) || 0) : "".concat(inputValue); + asPromise(params.inputValue).then(inputValue => { + input.value = params.input === 'number' ? `${parseFloat(inputValue) || 0}` : `${inputValue}`; show(input); input.focus(); instance.hideLoading(); - })["catch"](function (err) { - error("Error in inputValue promise: ".concat(err)); + }).catch(err => { + error(`Error in inputValue promise: ${err}`); input.value = ''; show(input); input.focus(); @@ -2732,7 +2534,7 @@ * @param {SweetAlertOptions} params */ function populateSelectOptions(popup, inputOptions, params) { - var select = getDirectChildByClass(popup, swalClasses.select); + const select = getDirectChildByClass(popup, swalClasses.select); if (!select) { return; } @@ -2741,29 +2543,27 @@ * @param {string} optionLabel * @param {string} optionValue */ - var renderOption = function renderOption(parent, optionLabel, optionValue) { - var option = document.createElement('option'); + const renderOption = (parent, optionLabel, optionValue) => { + const option = document.createElement('option'); option.value = optionValue; setInnerHtml(option, optionLabel); option.selected = isSelected(optionValue, params.inputValue); parent.appendChild(option); }; - inputOptions.forEach(function (inputOption) { - var optionValue = inputOption[0]; - var optionLabel = inputOption[1]; + inputOptions.forEach(inputOption => { + const optionValue = inputOption[0]; + const optionLabel = inputOption[1]; // spec: // https://www.w3.org/TR/html401/interact/forms.html#h-17.6 // "...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)..." // check whether this is a if (Array.isArray(optionLabel)) { // if it is an array, then it is an - var optgroup = document.createElement('optgroup'); + const optgroup = document.createElement('optgroup'); optgroup.label = optionValue; optgroup.disabled = false; // not configurable for now select.appendChild(optgroup); - optionLabel.forEach(function (o) { - return renderOption(optgroup, o[1], o[0]); - }); + optionLabel.forEach(o => renderOption(optgroup, o[1], o[0])); } else { // case of valueFormatted = formatInputOptions(valueFormatted); } result.push([key, valueFormatted]); }); } else { - Object.keys(inputOptions).forEach(function (key) { - var valueFormatted = inputOptions[key]; - if (_typeof(valueFormatted) === 'object') { + Object.keys(inputOptions).forEach(key => { + let valueFormatted = inputOptions[key]; + if (typeof valueFormatted === 'object') { // case of valueFormatted = formatInputOptions(valueFormatted); } @@ -2843,17 +2643,15 @@ * @param {SweetAlertInputValue} inputValue * @returns {boolean} */ - var isSelected = function isSelected(optionValue, inputValue) { + const isSelected = (optionValue, inputValue) => { return !!inputValue && inputValue.toString() === optionValue.toString(); }; - var _this = undefined; - /** * @param {SweetAlert} instance */ - var handleConfirmButtonClick = function handleConfirmButtonClick(instance) { - var innerParams = privateProps.innerParams.get(instance); + const handleConfirmButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); instance.disableButtons(); if (innerParams.input) { handleConfirmOrDenyWithInput(instance, 'confirm'); @@ -2865,8 +2663,8 @@ /** * @param {SweetAlert} instance */ - var handleDenyButtonClick = function handleDenyButtonClick(instance) { - var innerParams = privateProps.innerParams.get(instance); + const handleDenyButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); instance.disableButtons(); if (innerParams.returnInputValueOnDeny) { handleConfirmOrDenyWithInput(instance, 'deny'); @@ -2879,7 +2677,7 @@ * @param {SweetAlert} instance * @param {Function} dismissWith */ - var handleCancelButtonClick = function handleCancelButtonClick(instance, dismissWith) { + const handleCancelButtonClick = (instance, dismissWith) => { instance.disableButtons(); dismissWith(DismissReason.cancel); }; @@ -2888,14 +2686,14 @@ * @param {SweetAlert} instance * @param {'confirm' | 'deny'} type */ - var handleConfirmOrDenyWithInput = function handleConfirmOrDenyWithInput(instance, type) { - var innerParams = privateProps.innerParams.get(instance); + const handleConfirmOrDenyWithInput = (instance, type) => { + const innerParams = privateProps.innerParams.get(instance); if (!innerParams.input) { - error("The \"input\" parameter is needed to be set when using returnInputValueOn".concat(capitalizeFirstLetter(type))); + error(`The "input" parameter is needed to be set when using returnInputValueOn${capitalizeFirstLetter(type)}`); return; } - var input = instance.getInput(); - var inputValue = getInputValue(instance, innerParams); + const input = instance.getInput(); + const inputValue = getInputValue(instance, innerParams); if (innerParams.inputValidator) { handleInputValidator(instance, inputValue, type); } else if (input && !input.checkValidity()) { @@ -2913,13 +2711,11 @@ * @param {SweetAlertInputValue} inputValue * @param {'confirm' | 'deny'} type */ - var handleInputValidator = function handleInputValidator(instance, inputValue, type) { - var innerParams = privateProps.innerParams.get(instance); + const handleInputValidator = (instance, inputValue, type) => { + const innerParams = privateProps.innerParams.get(instance); instance.disableInput(); - var validationPromise = Promise.resolve().then(function () { - return asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage)); - }); - validationPromise.then(function (validationMessage) { + const validationPromise = Promise.resolve().then(() => asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage))); + validationPromise.then(validationMessage => { instance.enableButtons(); instance.enableInput(); if (validationMessage) { @@ -2936,17 +2732,15 @@ * @param {SweetAlert} instance * @param {any} value */ - var deny = function deny(instance, value) { - var innerParams = privateProps.innerParams.get(instance || _this); + const deny = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); if (innerParams.showLoaderOnDeny) { showLoading(getDenyButton()); } if (innerParams.preDeny) { instance.isAwaitingPromise = true; // Flagging the instance as awaiting a promise so it's own promise's reject/resolve methods doesn't get destroyed until the result from this preDeny's promise is received - var preDenyPromise = Promise.resolve().then(function () { - return asPromise(innerParams.preDeny(value, innerParams.validationMessage)); - }); - preDenyPromise.then(function (preDenyValue) { + const preDenyPromise = Promise.resolve().then(() => asPromise(innerParams.preDeny(value, innerParams.validationMessage))); + preDenyPromise.then(preDenyValue => { if (preDenyValue === false) { instance.hideLoading(); handleAwaitingPromise(instance); @@ -2956,13 +2750,11 @@ value: typeof preDenyValue === 'undefined' ? value : preDenyValue }); } - })["catch"](function (error) { - return rejectWith(instance || _this, error); - }); + }).catch(error => rejectWith(instance || undefined, error)); } else { instance.close({ isDenied: true, - value: value + value }); } }; @@ -2971,10 +2763,10 @@ * @param {SweetAlert} instance * @param {any} value */ - var succeedWith = function succeedWith(instance, value) { + const succeedWith = (instance, value) => { instance.close({ isConfirmed: true, - value: value + value }); }; @@ -2983,7 +2775,7 @@ * @param {SweetAlert} instance * @param {string} error */ - var rejectWith = function rejectWith(instance, error) { + const rejectWith = (instance, error) => { instance.rejectPromise(error); }; @@ -2992,27 +2784,23 @@ * @param {SweetAlert} instance * @param {any} value */ - var confirm = function confirm(instance, value) { - var innerParams = privateProps.innerParams.get(instance || _this); + const confirm = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); if (innerParams.showLoaderOnConfirm) { showLoading(); } if (innerParams.preConfirm) { instance.resetValidationMessage(); instance.isAwaitingPromise = true; // Flagging the instance as awaiting a promise so it's own promise's reject/resolve methods doesn't get destroyed until the result from this preConfirm's promise is received - var preConfirmPromise = Promise.resolve().then(function () { - return asPromise(innerParams.preConfirm(value, innerParams.validationMessage)); - }); - preConfirmPromise.then(function (preConfirmValue) { + const preConfirmPromise = Promise.resolve().then(() => asPromise(innerParams.preConfirm(value, innerParams.validationMessage))); + preConfirmPromise.then(preConfirmValue => { if (isVisible$1(getValidationMessage()) || preConfirmValue === false) { instance.hideLoading(); handleAwaitingPromise(instance); } else { succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue); } - })["catch"](function (error) { - return rejectWith(instance || _this, error); - }); + }).catch(error => rejectWith(instance || undefined, error)); } else { succeedWith(instance, value); } @@ -3023,11 +2811,11 @@ */ function hideLoading() { // do nothing if popup is closed - var innerParams = privateProps.innerParams.get(this); + const innerParams = privateProps.innerParams.get(this); if (!innerParams) { return; } - var domCache = privateProps.domCache.get(this); + const domCache = privateProps.domCache.get(this); hide(domCache.loader); if (isToast()) { if (innerParams.icon) { @@ -3043,8 +2831,8 @@ domCache.denyButton.disabled = false; domCache.cancelButton.disabled = false; } - var showRelatedButton = function showRelatedButton(domCache) { - var buttonToReplace = domCache.popup.getElementsByClassName(domCache.loader.getAttribute('data-button-to-replace')); + const showRelatedButton = domCache => { + const buttonToReplace = domCache.popup.getElementsByClassName(domCache.loader.getAttribute('data-button-to-replace')); if (buttonToReplace.length) { show(buttonToReplace[0], 'inline-block'); } else if (allButtonsAreHidden()) { @@ -3058,8 +2846,8 @@ * @returns {HTMLInputElement | null} */ function getInput() { - var innerParams = privateProps.innerParams.get(this); - var domCache = privateProps.domCache.get(this); + const innerParams = privateProps.innerParams.get(this); + const domCache = privateProps.domCache.get(this); if (!domCache) { return null; } @@ -3072,8 +2860,8 @@ * @param {boolean} disabled */ function setButtonsDisabled(instance, buttons, disabled) { - var domCache = privateProps.domCache.get(instance); - buttons.forEach(function (button) { + const domCache = privateProps.domCache.get(instance); + buttons.forEach(button => { domCache[button].disabled = disabled; }); } @@ -3083,14 +2871,14 @@ * @param {boolean} disabled */ function setInputDisabled(input, disabled) { - var popup = getPopup(); + const popup = getPopup(); if (!popup || !input) { return; } if (input.type === 'radio') { /** @type {NodeListOf} */ - var radios = popup.querySelectorAll("[name=\"".concat(swalClasses.radio, "\"]")); - for (var i = 0; i < radios.length; i++) { + const radios = popup.querySelectorAll(`[name="${swalClasses.radio}"]`); + for (let i = 0; i < radios.length; i++) { radios[i].disabled = disabled; } } else { @@ -3137,15 +2925,15 @@ * @this {SweetAlert} */ function showValidationMessage(error) { - var domCache = privateProps.domCache.get(this); - var params = privateProps.innerParams.get(this); + const domCache = privateProps.domCache.get(this); + const params = privateProps.innerParams.get(this); setInnerHtml(domCache.validationMessage, error); domCache.validationMessage.className = swalClasses['validation-message']; if (params.customClass && params.customClass.validationMessage) { addClass(domCache.validationMessage, params.customClass.validationMessage); } show(domCache.validationMessage); - var input = this.getInput(); + const input = this.getInput(); if (input) { input.setAttribute('aria-invalid', 'true'); input.setAttribute('aria-describedby', swalClasses['validation-message']); @@ -3160,11 +2948,11 @@ * @this {SweetAlert} */ function resetValidationMessage() { - var domCache = privateProps.domCache.get(this); + const domCache = privateProps.domCache.get(this); if (domCache.validationMessage) { hide(domCache.validationMessage); } - var input = this.getInput(); + const input = this.getInput(); if (input) { input.removeAttribute('aria-invalid'); input.removeAttribute('aria-describedby'); @@ -3172,7 +2960,7 @@ } } - var defaultParams = { + const defaultParams = { title: '', titleText: '', text: '', @@ -3263,11 +3051,13 @@ didDestroy: undefined, scrollbarPadding: true }; - var updatableParams = ['allowEscapeKey', 'allowOutsideClick', 'background', 'buttonsStyling', 'cancelButtonAriaLabel', 'cancelButtonColor', 'cancelButtonText', 'closeButtonAriaLabel', 'closeButtonHtml', 'color', 'confirmButtonAriaLabel', 'confirmButtonColor', 'confirmButtonText', 'currentProgressStep', 'customClass', 'denyButtonAriaLabel', 'denyButtonColor', 'denyButtonText', 'didClose', 'didDestroy', 'footer', 'hideClass', 'html', 'icon', 'iconColor', 'iconHtml', 'imageAlt', 'imageHeight', 'imageUrl', 'imageWidth', 'preConfirm', 'preDeny', 'progressSteps', 'returnFocus', 'reverseButtons', 'showCancelButton', 'showCloseButton', 'showConfirmButton', 'showDenyButton', 'text', 'title', 'titleText', 'willClose']; + const updatableParams = ['allowEscapeKey', 'allowOutsideClick', 'background', 'buttonsStyling', 'cancelButtonAriaLabel', 'cancelButtonColor', 'cancelButtonText', 'closeButtonAriaLabel', 'closeButtonHtml', 'color', 'confirmButtonAriaLabel', 'confirmButtonColor', 'confirmButtonText', 'currentProgressStep', 'customClass', 'denyButtonAriaLabel', 'denyButtonColor', 'denyButtonText', 'didClose', 'didDestroy', 'footer', 'hideClass', 'html', 'icon', 'iconColor', 'iconHtml', 'imageAlt', 'imageHeight', 'imageUrl', 'imageWidth', 'preConfirm', 'preDeny', 'progressSteps', 'returnFocus', 'reverseButtons', 'showCancelButton', 'showCloseButton', 'showConfirmButton', 'showDenyButton', 'text', 'title', 'titleText', 'willClose']; - /** @type {Record} */ - var deprecatedParams = {}; - var toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusDeny', 'focusCancel', 'returnFocus', 'heightAuto', 'keydownListenerCapture']; + /** @type {Record} */ + const deprecatedParams = { + allowEnterKey: undefined + }; + const toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusDeny', 'focusCancel', 'returnFocus', 'heightAuto', 'keydownListenerCapture']; /** * Is valid parameter @@ -3275,7 +3065,7 @@ * @param {string} paramName * @returns {boolean} */ - var isValidParameter = function isValidParameter(paramName) { + const isValidParameter = paramName => { return Object.prototype.hasOwnProperty.call(defaultParams, paramName); }; @@ -3285,7 +3075,7 @@ * @param {string} paramName * @returns {boolean} */ - var isUpdatableParameter = function isUpdatableParameter(paramName) { + const isUpdatableParameter = paramName => { return updatableParams.indexOf(paramName) !== -1; }; @@ -3295,33 +3085,33 @@ * @param {string} paramName * @returns {string | undefined} */ - var isDeprecatedParameter = function isDeprecatedParameter(paramName) { + const isDeprecatedParameter = paramName => { return deprecatedParams[paramName]; }; /** * @param {string} param */ - var checkIfParamIsValid = function checkIfParamIsValid(param) { + const checkIfParamIsValid = param => { if (!isValidParameter(param)) { - warn("Unknown parameter \"".concat(param, "\"")); + warn(`Unknown parameter "${param}"`); } }; /** * @param {string} param */ - var checkIfToastParamIsValid = function checkIfToastParamIsValid(param) { + const checkIfToastParamIsValid = param => { if (toastIncompatibleParams.includes(param)) { - warn("The parameter \"".concat(param, "\" is incompatible with toasts")); + warn(`The parameter "${param}" is incompatible with toasts`); } }; /** * @param {string} param */ - var checkIfParamIsDeprecated = function checkIfParamIsDeprecated(param) { - var isDeprecated = isDeprecatedParameter(param); + const checkIfParamIsDeprecated = param => { + const isDeprecated = isDeprecatedParameter(param); if (isDeprecated) { warnAboutDeprecation(param, isDeprecated); } @@ -3332,11 +3122,11 @@ * * @param {SweetAlertOptions} params */ - var showWarningsForParams = function showWarningsForParams(params) { + const showWarningsForParams = params => { if (params.backdrop === false && params.allowOutsideClick) { warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'); } - for (var param in params) { + for (const param in params) { checkIfParamIsValid(param); if (params.toast) { checkIfToastParamIsValid(param); @@ -3351,14 +3141,14 @@ * @param {SweetAlertOptions} params */ function update(params) { - var popup = getPopup(); - var innerParams = privateProps.innerParams.get(this); + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(this); if (!popup || hasClass(popup, innerParams.hideClass.popup)) { - warn("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup."); + warn(`You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.`); return; } - var validUpdatableParams = filterValidParams(params); - var updatedParams = Object.assign({}, innerParams, validUpdatableParams); + const validUpdatableParams = filterValidParams(params); + const updatedParams = Object.assign({}, innerParams, validUpdatableParams); render(this, updatedParams); privateProps.innerParams.set(this, updatedParams); Object.defineProperties(this, { @@ -3374,13 +3164,13 @@ * @param {SweetAlertOptions} params * @returns {SweetAlertOptions} */ - var filterValidParams = function filterValidParams(params) { - var validUpdatableParams = {}; - Object.keys(params).forEach(function (param) { + const filterValidParams = params => { + const validUpdatableParams = {}; + Object.keys(params).forEach(param => { if (isUpdatableParameter(param)) { validUpdatableParams[param] = params[param]; } else { - warn("Invalid parameter to update: ".concat(param)); + warn(`Invalid parameter to update: ${param}`); } }); return validUpdatableParams; @@ -3390,8 +3180,8 @@ * Dispose the current SweetAlert2 instance */ function _destroy() { - var domCache = privateProps.domCache.get(this); - var innerParams = privateProps.innerParams.get(this); + const domCache = privateProps.domCache.get(this); + const innerParams = privateProps.innerParams.get(this); if (!innerParams) { disposeWeakMaps(this); // The WeakMaps might have been partly destroyed, we must recall it to dispose any remaining WeakMaps #2335 return; // This instance has already been destroyed @@ -3411,7 +3201,7 @@ /** * @param {SweetAlert} instance */ - var disposeSwal = function disposeSwal(instance) { + const disposeSwal = instance => { disposeWeakMaps(instance); // Unset this.params so GC will dispose it (#1569) delete instance.params; @@ -3425,7 +3215,7 @@ /** * @param {SweetAlert} instance */ - var disposeWeakMaps = function disposeWeakMaps(instance) { + const disposeWeakMaps = instance => { // If the current instance is awaiting a promise result, we keep the privateMethods to call them once the promise result is retrieved #2335 if (instance.isAwaitingPromise) { unsetWeakMaps(privateProps, instance); @@ -3458,9 +3248,9 @@ * @param {object} obj * @param {SweetAlert} instance */ - var unsetWeakMaps = function unsetWeakMaps(obj, instance) { - for (var i in obj) { - obj[i]["delete"](instance); + const unsetWeakMaps = (obj, instance) => { + for (const i in obj) { + obj[i].delete(instance); } }; @@ -3490,7 +3280,7 @@ * @param {DomCache} domCache * @param {Function} dismissWith */ - var handlePopupClick = function handlePopupClick(innerParams, domCache, dismissWith) { + const handlePopupClick = (innerParams, domCache, dismissWith) => { if (innerParams.toast) { handleToastClick(innerParams, domCache, dismissWith); } else { @@ -3509,9 +3299,9 @@ * @param {DomCache} domCache * @param {Function} dismissWith */ - var handleToastClick = function handleToastClick(innerParams, domCache, dismissWith) { + const handleToastClick = (innerParams, domCache, dismissWith) => { // Closing toast by internal click - domCache.popup.onclick = function () { + domCache.popup.onclick = () => { if (innerParams && (isAnyButtonShown(innerParams) || innerParams.timer || innerParams.input)) { return; } @@ -3523,18 +3313,18 @@ * @param {SweetAlertOptions} innerParams * @returns {boolean} */ - var isAnyButtonShown = function isAnyButtonShown(innerParams) { + const isAnyButtonShown = innerParams => { return !!(innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton); }; - var ignoreOutsideClick = false; + let ignoreOutsideClick = false; /** * @param {DomCache} domCache */ - var handleModalMousedown = function handleModalMousedown(domCache) { - domCache.popup.onmousedown = function () { + const handleModalMousedown = domCache => { + domCache.popup.onmousedown = () => { domCache.container.onmouseup = function (e) { - domCache.container.onmouseup = function () {}; + domCache.container.onmouseup = () => {}; // We only check if the mouseup target is the container because usually it doesn't // have any other direct children aside of the popup if (e.target === domCache.container) { @@ -3547,14 +3337,14 @@ /** * @param {DomCache} domCache */ - var handleContainerMousedown = function handleContainerMousedown(domCache) { - domCache.container.onmousedown = function (e) { + const handleContainerMousedown = domCache => { + domCache.container.onmousedown = e => { // prevent the modal text from being selected on double click on the container (allowOutsideClick: false) if (e.target === domCache.container) { e.preventDefault(); } domCache.popup.onmouseup = function (e) { - domCache.popup.onmouseup = function () {}; + domCache.popup.onmouseup = () => {}; // We also need to check if the mouseup target is a child of the popup if (e.target === domCache.popup || e.target instanceof HTMLElement && domCache.popup.contains(e.target)) { ignoreOutsideClick = true; @@ -3568,8 +3358,8 @@ * @param {DomCache} domCache * @param {Function} dismissWith */ - var handleModalClick = function handleModalClick(innerParams, domCache, dismissWith) { - domCache.container.onclick = function (e) { + const handleModalClick = (innerParams, domCache, dismissWith) => { + domCache.container.onclick = e => { if (ignoreOutsideClick) { ignoreOutsideClick = false; return; @@ -3580,23 +3370,19 @@ }; }; - var isJqueryElement = function isJqueryElement(elem) { - return _typeof(elem) === 'object' && elem.jquery; - }; - var isElement = function isElement(elem) { - return elem instanceof Element || isJqueryElement(elem); - }; - var argsToParams = function argsToParams(args) { - var params = {}; - if (_typeof(args[0]) === 'object' && !isElement(args[0])) { + const isJqueryElement = elem => typeof elem === 'object' && elem.jquery; + const isElement = elem => elem instanceof Element || isJqueryElement(elem); + const argsToParams = args => { + const params = {}; + if (typeof args[0] === 'object' && !isElement(args[0])) { Object.assign(params, args[0]); } else { - ['title', 'html', 'icon'].forEach(function (name, index) { - var arg = args[index]; + ['title', 'html', 'icon'].forEach((name, index) => { + const arg = args[index]; if (typeof arg === 'string' || isElement(arg)) { params[name] = arg; } else if (arg !== undefined) { - error("Unexpected type of ".concat(name, "! Expected \"string\" or \"Element\", got ").concat(_typeof(arg))); + error(`Unexpected type of ${name}! Expected "string" or "Element", got ${typeof arg}`); } }); } @@ -3610,11 +3396,10 @@ * @returns {Promise} */ function fire() { - var Swal = this; // eslint-disable-line @typescript-eslint/no-this-alias for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - return _construct(Swal, args); + return new this(...args); } /** @@ -3637,19 +3422,12 @@ * @returns {SweetAlert} */ function mixin(mixinParams) { - var MixinSwal = /*#__PURE__*/function (_this) { - function MixinSwal() { - _classCallCheck(this, MixinSwal); - return _callSuper(this, MixinSwal, arguments); + class MixinSwal extends this { + _main(params, priorityMixinParams) { + return super._main(params, Object.assign({}, mixinParams, priorityMixinParams)); } - _inherits(MixinSwal, _this); - return _createClass(MixinSwal, [{ - key: "_main", - value: function _main(params, priorityMixinParams) { - return _get(_getPrototypeOf(MixinSwal.prototype), "_main", this).call(this, params, Object.assign({}, mixinParams, priorityMixinParams)); - } - }]); - }(this); // @ts-ignore + } + // @ts-ignore return MixinSwal; } @@ -3659,7 +3437,7 @@ * * @returns {number | undefined} */ - var getTimerLeft = function getTimerLeft() { + const getTimerLeft = () => { return globalState.timeout && globalState.timeout.getTimerLeft(); }; @@ -3669,7 +3447,7 @@ * * @returns {number | undefined} */ - var stopTimer = function stopTimer() { + const stopTimer = () => { if (globalState.timeout) { stopTimerProgressBar(); return globalState.timeout.stop(); @@ -3682,9 +3460,9 @@ * * @returns {number | undefined} */ - var resumeTimer = function resumeTimer() { + const resumeTimer = () => { if (globalState.timeout) { - var remaining = globalState.timeout.start(); + const remaining = globalState.timeout.start(); animateTimerProgressBar(remaining); return remaining; } @@ -3696,8 +3474,8 @@ * * @returns {number | undefined} */ - var toggleTimer = function toggleTimer() { - var timer = globalState.timeout; + const toggleTimer = () => { + const timer = globalState.timeout; return timer && (timer.running ? stopTimer() : resumeTimer()); }; @@ -3708,9 +3486,9 @@ * @param {number} ms * @returns {number | undefined} */ - var increaseTimer = function increaseTimer(ms) { + const increaseTimer = ms => { if (globalState.timeout) { - var remaining = globalState.timeout.increase(ms); + const remaining = globalState.timeout.increase(ms); animateTimerProgressBar(remaining, true); return remaining; } @@ -3723,31 +3501,31 @@ * * @returns {boolean} */ - var isTimerRunning = function isTimerRunning() { + const isTimerRunning = () => { return !!(globalState.timeout && globalState.timeout.isRunning()); }; - var bodyClickListenerAdded = false; - var clickHandlers = {}; + let bodyClickListenerAdded = false; + const clickHandlers = {}; /** * @param {string} attr */ function bindClickHandler() { - var attr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'data-swal-template'; + let attr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'data-swal-template'; clickHandlers[attr] = this; if (!bodyClickListenerAdded) { document.body.addEventListener('click', bodyClickListener); bodyClickListenerAdded = true; } } - var bodyClickListener = function bodyClickListener(event) { - for (var el = event.target; el && el !== document; el = el.parentNode) { - for (var attr in clickHandlers) { - var template = el.getAttribute(attr); + const bodyClickListener = event => { + for (let el = event.target; el && el !== document; el = el.parentNode) { + for (const attr in clickHandlers) { + const template = el.getAttribute(attr); if (template) { clickHandlers[attr].fire({ - template: template + template }); return; } @@ -3798,13 +3576,12 @@ toggleTimer: toggleTimer }); - var Timer = /*#__PURE__*/function () { + class Timer { /** * @param {Function} callback * @param {number} delay */ - function Timer(callback, delay) { - _classCallCheck(this, Timer); + constructor(callback, delay) { this.callback = callback; this.remaining = delay; this.running = false; @@ -3814,107 +3591,99 @@ /** * @returns {number} */ - return _createClass(Timer, [{ - key: "start", - value: function start() { - if (!this.running) { - this.running = true; - this.started = new Date(); - this.id = setTimeout(this.callback, this.remaining); - } - return this.remaining; + start() { + if (!this.running) { + this.running = true; + this.started = new Date(); + this.id = setTimeout(this.callback, this.remaining); } + return this.remaining; + } - /** - * @returns {number} - */ - }, { - key: "stop", - value: function stop() { - if (this.started && this.running) { - this.running = false; - clearTimeout(this.id); - this.remaining -= new Date().getTime() - this.started.getTime(); - } - return this.remaining; + /** + * @returns {number} + */ + stop() { + if (this.started && this.running) { + this.running = false; + clearTimeout(this.id); + this.remaining -= new Date().getTime() - this.started.getTime(); } + return this.remaining; + } - /** - * @param {number} n - * @returns {number} - */ - }, { - key: "increase", - value: function increase(n) { - var running = this.running; - if (running) { - this.stop(); - } - this.remaining += n; - if (running) { - this.start(); - } - return this.remaining; + /** + * @param {number} n + * @returns {number} + */ + increase(n) { + const running = this.running; + if (running) { + this.stop(); } - - /** - * @returns {number} - */ - }, { - key: "getTimerLeft", - value: function getTimerLeft() { - if (this.running) { - this.stop(); - this.start(); - } - return this.remaining; + this.remaining += n; + if (running) { + this.start(); } + return this.remaining; + } - /** - * @returns {boolean} - */ - }, { - key: "isRunning", - value: function isRunning() { - return this.running; + /** + * @returns {number} + */ + getTimerLeft() { + if (this.running) { + this.stop(); + this.start(); } - }]); - }(); + return this.remaining; + } - var swalStringParams = ['swal-title', 'swal-html', 'swal-footer']; + /** + * @returns {boolean} + */ + isRunning() { + return this.running; + } + } + + const swalStringParams = ['swal-title', 'swal-html', 'swal-footer']; /** * @param {SweetAlertOptions} params * @returns {SweetAlertOptions} */ - var getTemplateParams = function getTemplateParams(params) { - /** @type {HTMLTemplateElement} */ - var template = typeof params.template === 'string' ? document.querySelector(params.template) : params.template; + const getTemplateParams = params => { + const template = typeof params.template === 'string' ? (/** @type {HTMLTemplateElement} */document.querySelector(params.template)) : params.template; if (!template) { return {}; } /** @type {DocumentFragment} */ - var templateContent = template.content; + const templateContent = template.content; showWarningsForElements(templateContent); - var result = Object.assign(getSwalParams(templateContent), getSwalFunctionParams(templateContent), getSwalButtons(templateContent), getSwalImage(templateContent), getSwalIcon(templateContent), getSwalInput(templateContent), getSwalStringParams(templateContent, swalStringParams)); + const result = Object.assign(getSwalParams(templateContent), getSwalFunctionParams(templateContent), getSwalButtons(templateContent), getSwalImage(templateContent), getSwalIcon(templateContent), getSwalInput(templateContent), getSwalStringParams(templateContent, swalStringParams)); return result; }; /** * @param {DocumentFragment} templateContent - * @returns {SweetAlertOptions} + * @returns {Record} */ - var getSwalParams = function getSwalParams(templateContent) { - var result = {}; + const getSwalParams = templateContent => { + /** @type {Record} */ + const result = {}; /** @type {HTMLElement[]} */ - var swalParams = Array.from(templateContent.querySelectorAll('swal-param')); - swalParams.forEach(function (param) { + const swalParams = Array.from(templateContent.querySelectorAll('swal-param')); + swalParams.forEach(param => { showWarningsForAttributes(param, ['name', 'value']); - var paramName = param.getAttribute('name'); - var value = param.getAttribute('value'); + const paramName = /** @type {keyof SweetAlertOptions} */param.getAttribute('name'); + const value = param.getAttribute('value'); + if (!paramName || !value) { + return; + } if (typeof defaultParams[paramName] === 'boolean') { result[paramName] = value !== 'false'; - } else if (_typeof(defaultParams[paramName]) === 'object') { + } else if (typeof defaultParams[paramName] === 'object') { result[paramName] = JSON.parse(value); } else { result[paramName] = value; @@ -3925,38 +3694,46 @@ /** * @param {DocumentFragment} templateContent - * @returns {SweetAlertOptions} + * @returns {Record} */ - var getSwalFunctionParams = function getSwalFunctionParams(templateContent) { - var result = {}; + const getSwalFunctionParams = templateContent => { + /** @type {Record} */ + const result = {}; /** @type {HTMLElement[]} */ - var swalFunctions = Array.from(templateContent.querySelectorAll('swal-function-param')); - swalFunctions.forEach(function (param) { - var paramName = param.getAttribute('name'); - var value = param.getAttribute('value'); - result[paramName] = new Function("return ".concat(value))(); + const swalFunctions = Array.from(templateContent.querySelectorAll('swal-function-param')); + swalFunctions.forEach(param => { + const paramName = /** @type {keyof SweetAlertOptions} */param.getAttribute('name'); + const value = param.getAttribute('value'); + if (!paramName || !value) { + return; + } + result[paramName] = new Function(`return ${value}`)(); }); return result; }; /** * @param {DocumentFragment} templateContent - * @returns {SweetAlertOptions} + * @returns {Record} */ - var getSwalButtons = function getSwalButtons(templateContent) { - var result = {}; + const getSwalButtons = templateContent => { + /** @type {Record} */ + const result = {}; /** @type {HTMLElement[]} */ - var swalButtons = Array.from(templateContent.querySelectorAll('swal-button')); - swalButtons.forEach(function (button) { + const swalButtons = Array.from(templateContent.querySelectorAll('swal-button')); + swalButtons.forEach(button => { showWarningsForAttributes(button, ['type', 'color', 'aria-label']); - var type = button.getAttribute('type'); - result["".concat(type, "ButtonText")] = button.innerHTML; - result["show".concat(capitalizeFirstLetter(type), "Button")] = true; + const type = button.getAttribute('type'); + if (!type || !['confirm', 'cancel', 'deny'].includes(type)) { + return; + } + result[`${type}ButtonText`] = button.innerHTML; + result[`show${capitalizeFirstLetter(type)}Button`] = true; if (button.hasAttribute('color')) { - result["".concat(type, "ButtonColor")] = button.getAttribute('color'); + result[`${type}ButtonColor`] = button.getAttribute('color'); } if (button.hasAttribute('aria-label')) { - result["".concat(type, "ButtonAriaLabel")] = button.getAttribute('aria-label'); + result[`${type}ButtonAriaLabel`] = button.getAttribute('aria-label'); } }); return result; @@ -3966,10 +3743,10 @@ * @param {DocumentFragment} templateContent * @returns {Pick} */ - var getSwalImage = function getSwalImage(templateContent) { - var result = {}; + const getSwalImage = templateContent => { + const result = {}; /** @type {HTMLElement | null} */ - var image = templateContent.querySelector('swal-image'); + const image = templateContent.querySelector('swal-image'); if (image) { showWarningsForAttributes(image, ['src', 'width', 'height', 'alt']); if (image.hasAttribute('src')) { @@ -3990,17 +3767,15 @@ /** * @param {DocumentFragment} templateContent - * @returns {SweetAlertOptions} + * @returns {Record} */ - var getSwalIcon = function getSwalIcon(templateContent) { - var result = {}; - /** @type {HTMLElement} */ - var icon = templateContent.querySelector('swal-icon'); + const getSwalIcon = templateContent => { + const result = {}; + /** @type {HTMLElement | null} */ + const icon = templateContent.querySelector('swal-icon'); if (icon) { showWarningsForAttributes(icon, ['type', 'color']); if (icon.hasAttribute('type')) { - /** @type {SweetAlertIcon} */ - // @ts-ignore result.icon = icon.getAttribute('type'); } if (icon.hasAttribute('color')) { @@ -4013,16 +3788,15 @@ /** * @param {DocumentFragment} templateContent - * @returns {SweetAlertOptions} + * @returns {Record} */ - var getSwalInput = function getSwalInput(templateContent) { - var result = {}; - /** @type {HTMLElement} */ - var input = templateContent.querySelector('swal-input'); + const getSwalInput = templateContent => { + /** @type {Record} */ + const result = {}; + /** @type {HTMLElement | null} */ + const input = templateContent.querySelector('swal-input'); if (input) { showWarningsForAttributes(input, ['type', 'label', 'placeholder', 'value']); - /** @type {SweetAlertInput} */ - // @ts-ignore result.input = input.getAttribute('type') || 'text'; if (input.hasAttribute('label')) { result.inputLabel = input.getAttribute('label'); @@ -4035,13 +3809,16 @@ } } /** @type {HTMLElement[]} */ - var inputOptions = Array.from(templateContent.querySelectorAll('swal-input-option')); + const inputOptions = Array.from(templateContent.querySelectorAll('swal-input-option')); if (inputOptions.length) { result.inputOptions = {}; - inputOptions.forEach(function (option) { + inputOptions.forEach(option => { showWarningsForAttributes(option, ['value']); - var optionValue = option.getAttribute('value'); - var optionName = option.innerHTML; + const optionValue = option.getAttribute('value'); + if (!optionValue) { + return; + } + const optionName = option.innerHTML; result.inputOptions[optionValue] = optionName; }); } @@ -4051,14 +3828,15 @@ /** * @param {DocumentFragment} templateContent * @param {string[]} paramNames - * @returns {SweetAlertOptions} - */ - var getSwalStringParams = function getSwalStringParams(templateContent, paramNames) { - var result = {}; - for (var i in paramNames) { - var paramName = paramNames[i]; - /** @type {HTMLElement} */ - var tag = templateContent.querySelector(paramName); + * @returns {Record} + */ + const getSwalStringParams = (templateContent, paramNames) => { + /** @type {Record} */ + const result = {}; + for (const i in paramNames) { + const paramName = paramNames[i]; + /** @type {HTMLElement | null} */ + const tag = templateContent.querySelector(paramName); if (tag) { showWarningsForAttributes(tag, []); result[paramName.replace(/^swal-/, '')] = tag.innerHTML.trim(); @@ -4070,12 +3848,12 @@ /** * @param {DocumentFragment} templateContent */ - var showWarningsForElements = function showWarningsForElements(templateContent) { - var allowedElements = swalStringParams.concat(['swal-param', 'swal-function-param', 'swal-button', 'swal-image', 'swal-icon', 'swal-input', 'swal-input-option']); - Array.from(templateContent.children).forEach(function (el) { - var tagName = el.tagName.toLowerCase(); + const showWarningsForElements = templateContent => { + const allowedElements = swalStringParams.concat(['swal-param', 'swal-function-param', 'swal-button', 'swal-image', 'swal-icon', 'swal-input', 'swal-input-option']); + Array.from(templateContent.children).forEach(el => { + const tagName = el.tagName.toLowerCase(); if (!allowedElements.includes(tagName)) { - warn("Unrecognized element <".concat(tagName, ">")); + warn(`Unrecognized element <${tagName}>`); } }); }; @@ -4084,33 +3862,33 @@ * @param {HTMLElement} el * @param {string[]} allowedAttributes */ - var showWarningsForAttributes = function showWarningsForAttributes(el, allowedAttributes) { - Array.from(el.attributes).forEach(function (attribute) { + const showWarningsForAttributes = (el, allowedAttributes) => { + Array.from(el.attributes).forEach(attribute => { if (allowedAttributes.indexOf(attribute.name) === -1) { - warn(["Unrecognized attribute \"".concat(attribute.name, "\" on <").concat(el.tagName.toLowerCase(), ">."), "".concat(allowedAttributes.length ? "Allowed attributes are: ".concat(allowedAttributes.join(', ')) : 'To set the value, use HTML within the element.')]); + warn([`Unrecognized attribute "${attribute.name}" on <${el.tagName.toLowerCase()}>.`, `${allowedAttributes.length ? `Allowed attributes are: ${allowedAttributes.join(', ')}` : 'To set the value, use HTML within the element.'}`]); } }); }; - var SHOW_CLASS_TIMEOUT = 10; + const SHOW_CLASS_TIMEOUT = 10; /** * Open popup, add necessary classes and styles, fix scrollbar * * @param {SweetAlertOptions} params */ - var openPopup = function openPopup(params) { - var container = getContainer(); - var popup = getPopup(); + const openPopup = params => { + const container = getContainer(); + const popup = getPopup(); if (typeof params.willOpen === 'function') { params.willOpen(popup); } - var bodyStyles = window.getComputedStyle(document.body); - var initialBodyOverflow = bodyStyles.overflowY; + const bodyStyles = window.getComputedStyle(document.body); + const initialBodyOverflow = bodyStyles.overflowY; addClasses(container, popup, params); // scrolling is 'hidden' until animation is done, after that 'auto' - setTimeout(function () { + setTimeout(() => { setScrollingVisibility(container, popup); }, SHOW_CLASS_TIMEOUT); if (isModal()) { @@ -4121,9 +3899,7 @@ globalState.previousActiveElement = document.activeElement; } if (typeof params.didOpen === 'function') { - setTimeout(function () { - return params.didOpen(popup); - }); + setTimeout(() => params.didOpen(popup)); } removeClass(container, swalClasses['no-transition']); }; @@ -4131,12 +3907,12 @@ /** * @param {AnimationEvent} event */ - var swalOpenAnimationFinished = function swalOpenAnimationFinished(event) { - var popup = getPopup(); + const swalOpenAnimationFinished = event => { + const popup = getPopup(); if (event.target !== popup || !animationEndEvent) { return; } - var container = getContainer(); + const container = getContainer(); popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished); container.style.overflowY = 'auto'; }; @@ -4145,7 +3921,7 @@ * @param {HTMLElement} container * @param {HTMLElement} popup */ - var setScrollingVisibility = function setScrollingVisibility(container, popup) { + const setScrollingVisibility = (container, popup) => { if (animationEndEvent && hasCssAnimation(popup)) { container.style.overflowY = 'hidden'; popup.addEventListener(animationEndEvent, swalOpenAnimationFinished); @@ -4159,14 +3935,14 @@ * @param {boolean} scrollbarPadding * @param {string} initialBodyOverflow */ - var fixScrollContainer = function fixScrollContainer(container, scrollbarPadding, initialBodyOverflow) { + const fixScrollContainer = (container, scrollbarPadding, initialBodyOverflow) => { iOSfix(); if (scrollbarPadding && initialBodyOverflow !== 'hidden') { replaceScrollbarWithPadding(initialBodyOverflow); } // sweetalert2/issues/1247 - setTimeout(function () { + setTimeout(() => { container.scrollTop = 0; }); }; @@ -4176,13 +3952,13 @@ * @param {HTMLElement} popup * @param {SweetAlertOptions} params */ - var addClasses = function addClasses(container, popup, params) { + const addClasses = (container, popup, params) => { addClass(container, params.showClass.backdrop); if (params.animation) { // this workaround with opacity is needed for https://github.com/sweetalert2/sweetalert2/issues/2059 popup.style.setProperty('opacity', '0', 'important'); show(popup, 'grid'); - setTimeout(function () { + setTimeout(() => { // Animate popup right after showing it addClass(popup, params.showClass.popup); // and remove the opacity workaround @@ -4203,7 +3979,7 @@ * @param {string} [validationMessage] * @returns {Promise} */ - email: function email(string, validationMessage) { + email: (string, validationMessage) => { return /^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid email address'); }, /** @@ -4211,7 +3987,7 @@ * @param {string} [validationMessage] * @returns {Promise} */ - url: function url(string, validationMessage) { + url: (string, validationMessage) => { // taken from https://stackoverflow.com/a/3809435 with a small change from #1306 and #2013 return /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid URL'); } @@ -4266,15 +4042,14 @@ } /** @type {SweetAlert} */ - var currentInstance; + let currentInstance; var _promise = /*#__PURE__*/new WeakMap(); - var SweetAlert = /*#__PURE__*/function () { + class SweetAlert { /** * @param {...any} args * @this {SweetAlert} */ - function SweetAlert() { - _classCallCheck(this, SweetAlert); + constructor() { /** * @type {Promise} */ @@ -4289,7 +4064,7 @@ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - var outerParams = Object.freeze(this.constructor.argsToParams(args)); + const outerParams = Object.freeze(this.constructor.argsToParams(args)); /** @type {Readonly} */ this.params = outerParams; @@ -4298,56 +4073,51 @@ this.isAwaitingPromise = false; _classPrivateFieldSet2(_promise, this, this._main(currentInstance.params)); } - return _createClass(SweetAlert, [{ - key: "_main", - value: function _main(userParams) { - var mixinParams = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - showWarningsForParams(Object.assign({}, mixinParams, userParams)); - if (globalState.currentInstance) { - var swalPromiseResolve = privateMethods.swalPromiseResolve.get(globalState.currentInstance); - var isAwaitingPromise = globalState.currentInstance.isAwaitingPromise; - globalState.currentInstance._destroy(); - if (!isAwaitingPromise) { - swalPromiseResolve({ - isDismissed: true - }); - } - if (isModal()) { - unsetAriaHidden(); - } + _main(userParams) { + let mixinParams = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + showWarningsForParams(Object.assign({}, mixinParams, userParams)); + if (globalState.currentInstance) { + const swalPromiseResolve = privateMethods.swalPromiseResolve.get(globalState.currentInstance); + const { + isAwaitingPromise + } = globalState.currentInstance; + globalState.currentInstance._destroy(); + if (!isAwaitingPromise) { + swalPromiseResolve({ + isDismissed: true + }); } - globalState.currentInstance = currentInstance; - var innerParams = prepareParams(userParams, mixinParams); - setParameters(innerParams); - Object.freeze(innerParams); - - // clear the previous timer - if (globalState.timeout) { - globalState.timeout.stop(); - delete globalState.timeout; + if (isModal()) { + unsetAriaHidden(); } - - // clear the restore focus timeout - clearTimeout(globalState.restoreFocusTimeout); - var domCache = populateDomCache(currentInstance); - render(currentInstance, innerParams); - privateProps.innerParams.set(currentInstance, innerParams); - return swalPromise(currentInstance, domCache, innerParams); } - - // `catch` cannot be the name of a module export, so we define our thenable methods here instead - }, { - key: "then", - value: function then(onFulfilled) { - return _classPrivateFieldGet2(_promise, this).then(onFulfilled); - } - }, { - key: "finally", - value: function _finally(onFinally) { - return _classPrivateFieldGet2(_promise, this)["finally"](onFinally); + globalState.currentInstance = currentInstance; + const innerParams = prepareParams(userParams, mixinParams); + setParameters(innerParams); + Object.freeze(innerParams); + + // clear the previous timer + if (globalState.timeout) { + globalState.timeout.stop(); + delete globalState.timeout; } - }]); - }(); + + // clear the restore focus timeout + clearTimeout(globalState.restoreFocusTimeout); + const domCache = populateDomCache(currentInstance); + render(currentInstance, innerParams); + privateProps.innerParams.set(currentInstance, innerParams); + return swalPromise(currentInstance, domCache, innerParams); + } + + // `catch` cannot be the name of a module export, so we define our thenable methods here instead + then(onFulfilled) { + return _classPrivateFieldGet2(_promise, this).then(onFulfilled); + } + finally(onFinally) { + return _classPrivateFieldGet2(_promise, this).finally(onFinally); + } + } /** * @param {SweetAlert} instance @@ -4355,30 +4125,30 @@ * @param {SweetAlertOptions} innerParams * @returns {Promise} */ - var swalPromise = function swalPromise(instance, domCache, innerParams) { - return new Promise(function (resolve, reject) { + const swalPromise = (instance, domCache, innerParams) => { + return new Promise((resolve, reject) => { // functions to handle all closings/dismissals /** * @param {DismissReason} dismiss */ - var dismissWith = function dismissWith(dismiss) { + const dismissWith = dismiss => { instance.close({ isDismissed: true, - dismiss: dismiss + dismiss }); }; privateMethods.swalPromiseResolve.set(instance, resolve); privateMethods.swalPromiseReject.set(instance, reject); - domCache.confirmButton.onclick = function () { + domCache.confirmButton.onclick = () => { handleConfirmButtonClick(instance); }; - domCache.denyButton.onclick = function () { + domCache.denyButton.onclick = () => { handleDenyButtonClick(instance); }; - domCache.cancelButton.onclick = function () { + domCache.cancelButton.onclick = () => { handleCancelButtonClick(instance, dismissWith); }; - domCache.closeButton.onclick = function () { + domCache.closeButton.onclick = () => { dismissWith(DismissReason.close); }; handlePopupClick(innerParams, domCache, dismissWith); @@ -4389,7 +4159,7 @@ initFocus(domCache, innerParams); // Scroll container to top on open (#1247, #1946) - setTimeout(function () { + setTimeout(() => { domCache.container.scrollTop = 0; }); }); @@ -4400,9 +4170,9 @@ * @param {SweetAlertOptions} mixinParams * @returns {SweetAlertOptions} */ - var prepareParams = function prepareParams(userParams, mixinParams) { - var templateParams = getTemplateParams(userParams); - var params = Object.assign({}, defaultParams, mixinParams, templateParams, userParams); // precedence is described in #2131 + const prepareParams = (userParams, mixinParams) => { + const templateParams = getTemplateParams(userParams); + const params = Object.assign({}, defaultParams, mixinParams, templateParams, userParams); // precedence is described in #2131 params.showClass = Object.assign({}, defaultParams.showClass, params.showClass); params.hideClass = Object.assign({}, defaultParams.hideClass, params.hideClass); if (params.animation === false) { @@ -4418,8 +4188,8 @@ * @param {SweetAlert} instance * @returns {DomCache} */ - var populateDomCache = function populateDomCache(instance) { - var domCache = { + const populateDomCache = instance => { + const domCache = { popup: getPopup(), container: getContainer(), actions: getActions(), @@ -4440,18 +4210,18 @@ * @param {SweetAlertOptions} innerParams * @param {Function} dismissWith */ - var setupTimer = function setupTimer(globalState, innerParams, dismissWith) { - var timerProgressBar = getTimerProgressBar(); + const setupTimer = (globalState, innerParams, dismissWith) => { + const timerProgressBar = getTimerProgressBar(); hide(timerProgressBar); if (innerParams.timer) { - globalState.timeout = new Timer(function () { + globalState.timeout = new Timer(() => { dismissWith('timer'); delete globalState.timeout; }, innerParams.timer); if (innerParams.timerProgressBar) { show(timerProgressBar); applyCustomClass(timerProgressBar, innerParams, 'timerProgressBar'); - setTimeout(function () { + setTimeout(() => { if (globalState.timeout && globalState.timeout.running) { // timer can be already stopped or unset at this point animateTimerProgressBar(innerParams.timer); @@ -4462,20 +4232,50 @@ }; /** + * Initialize focus in the popup: + * + * 1. If `toast` is `true`, don't steal focus from the document. + * 2. Else if there is an [autofocus] element, focus it. + * 3. Else if `focusConfirm` is `true` and confirm button is visible, focus it. + * 4. Else if `focusDeny` is `true` and deny button is visible, focus it. + * 5. Else if `focusCancel` is `true` and cancel button is visible, focus it. + * 6. Else focus the first focusable element in a popup (if any). + * * @param {DomCache} domCache * @param {SweetAlertOptions} innerParams */ - var initFocus = function initFocus(domCache, innerParams) { + const initFocus = (domCache, innerParams) => { if (innerParams.toast) { return; } + // TODO: this is dumb, remove `allowEnterKey` param in the next major version if (!callIfFunction(innerParams.allowEnterKey)) { + warnAboutDeprecation('allowEnterKey'); blurActiveElement(); return; } - if (!focusButton(domCache, innerParams)) { - setFocus(-1, 1); + if (focusAutofocus(domCache)) { + return; + } + if (focusButton(domCache, innerParams)) { + return; } + setFocus(-1, 1); + }; + + /** + * @param {DomCache} domCache + * @returns {boolean} + */ + const focusAutofocus = domCache => { + const autofocusElements = domCache.popup.querySelectorAll('[autofocus]'); + for (const autofocusElement of autofocusElements) { + if (autofocusElement instanceof HTMLElement && isVisible$1(autofocusElement)) { + autofocusElement.focus(); + return true; + } + } + return false; }; /** @@ -4483,7 +4283,7 @@ * @param {SweetAlertOptions} innerParams * @returns {boolean} */ - var focusButton = function focusButton(domCache, innerParams) { + const focusButton = (domCache, innerParams) => { if (innerParams.focusDeny && isVisible$1(domCache.denyButton)) { domCache.denyButton.focus(); return true; @@ -4498,7 +4298,7 @@ } return false; }; - var blurActiveElement = function blurActiveElement() { + const blurActiveElement = () => { if (document.activeElement instanceof HTMLElement && typeof document.activeElement.blur === 'function') { document.activeElement.blur(); } @@ -4506,19 +4306,19 @@ // Dear russian users visiting russian sites. Let's have fun. if (typeof window !== 'undefined' && /^ru\b/.test(navigator.language) && location.host.match(/\.(ru|su|by|xn--p1ai)$/)) { - var now = new Date(); - var initiationDate = localStorage.getItem('swal-initiation'); + const now = new Date(); + const initiationDate = localStorage.getItem('swal-initiation'); if (!initiationDate) { - localStorage.setItem('swal-initiation', "".concat(now)); + localStorage.setItem('swal-initiation', `${now}`); } else if ((now.getTime() - Date.parse(initiationDate)) / (1000 * 60 * 60 * 24) > 3) { - setTimeout(function () { + setTimeout(() => { document.body.style.pointerEvents = 'none'; - var ukrainianAnthem = document.createElement('audio'); + const ukrainianAnthem = document.createElement('audio'); ukrainianAnthem.src = 'https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3'; ukrainianAnthem.loop = true; document.body.appendChild(ukrainianAnthem); - setTimeout(function () { - ukrainianAnthem.play()["catch"](function () { + setTimeout(() => { + ukrainianAnthem.play().catch(() => { // ignore }); }, 2500); @@ -4548,25 +4348,24 @@ Object.assign(SweetAlert, staticMethods); // Proxy to instance methods to constructor, for now, for backwards compatibility - Object.keys(instanceMethods).forEach(function (key) { + Object.keys(instanceMethods).forEach(key => { /** * @param {...any} args * @returns {any | undefined} */ SweetAlert[key] = function () { if (currentInstance && currentInstance[key]) { - var _currentInstance; - return (_currentInstance = currentInstance)[key].apply(_currentInstance, arguments); + return currentInstance[key](...arguments); } return null; }; }); SweetAlert.DismissReason = DismissReason; - SweetAlert.version = '11.11.1'; + SweetAlert.version = '11.13.2'; - var Swal = SweetAlert; + const Swal = SweetAlert; // @ts-ignore - Swal["default"] = Swal; + Swal.default = Swal; return Swal; diff --git a/lam/templates/lib/extra/friendlyCaptcha/friendly-challenge-0.9.15.js b/lam/templates/lib/extra/friendlyCaptcha/friendly-challenge-0.9.17.js similarity index 67% rename from lam/templates/lib/extra/friendlyCaptcha/friendly-challenge-0.9.15.js rename to lam/templates/lib/extra/friendlyCaptcha/friendly-challenge-0.9.17.js index 45bd46784..1ee863101 100644 --- a/lam/templates/lib/extra/friendlyCaptcha/friendly-challenge-0.9.15.js +++ b/lam/templates/lib/extra/friendlyCaptcha/friendly-challenge-0.9.17.js @@ -1,38 +1,33 @@ "use strict"; -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } - +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } - -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } - -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } - -function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } - -function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } - +function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } +function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } +function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } +function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } (function () { 'use strict'; - var css = '.frc-captcha *{margin:0;padding:0;border:0;text-align:initial;border-radius:px;filter:none!important;transition:none!important;font-weight:400;font-size:14px;line-height:1.2;text-decoration:none;background-color:initial;color:#222}.frc-captcha{position:relative;min-width:250px;max-width:312px;border:1px solid #f4f4f4;padding-bottom:12px;background-color:#fff}.frc-captcha b{font-weight:700}.frc-container{display:flex;align-items:center;min-height:52px}.frc-icon{fill:#222;stroke:#222;flex-shrink:0;margin:8px 8px 0}.frc-icon.frc-warning{fill:#c00}.frc-success .frc-icon{animation:1s ease-in both frc-fade-in}.frc-content{white-space:nowrap;display:flex;flex-direction:column;margin:4px 6px 0 0;overflow-x:auto;flex-grow:1}.frc-banner{position:absolute;bottom:0;right:6px;line-height:1}.frc-banner *{font-size:10px;opacity:.8;text-decoration:none}.frc-progress{-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:3px 0;height:4px;border:none;background-color:#eee;color:#222;width:100%;transition:.5s linear}.frc-progress::-webkit-progress-bar{background:#eee}.frc-progress::-webkit-progress-value{background:#222}.frc-progress::-moz-progress-bar{background:#222}.frc-button{cursor:pointer;padding:2px 6px;background-color:#f1f1f1;border:1px solid transparent;text-align:center;font-weight:600;text-transform:none}.frc-button:focus{border:1px solid #333}.frc-button:hover{background-color:#ddd}.frc-captcha-solution{display:none}.frc-err-url{text-decoration:underline;font-size:.9em}.frc-rtl{direction:rtl}.frc-rtl .frc-content{margin:4px 0 0 6px}.frc-banner.frc-rtl{left:6px;right:auto}.dark.frc-captcha{color:#fff;background-color:#222;border-color:#333}.dark.frc-captcha *{color:#fff}.dark.frc-captcha button{background-color:#444}.dark .frc-icon{fill:#fff;stroke:#fff}.dark .frc-progress{background-color:#444}.dark .frc-progress::-webkit-progress-bar{background:#444}.dark .frc-progress::-webkit-progress-value{background:#ddd}.dark .frc-progress::-moz-progress-bar{background:#ddd}@keyframes frc-fade-in{from{opacity:0}to{opacity:1}}'; // This is not an enum to save some bytes in the output bundle. + var css = '.frc-captcha *{margin:0;padding:0;border:0;text-align:initial;border-radius:0;filter:none!important;transition:none!important;font-weight:400;font-size:14px;line-height:1.2;text-decoration:none;background-color:initial;color:#222}.frc-captcha{position:relative;min-width:250px;max-width:312px;border:1px solid #f4f4f4;padding-bottom:12px;background-color:#fff}.frc-captcha b{font-weight:700}.frc-container{display:flex;align-items:center;min-height:52px}.frc-icon{fill:#222;stroke:#222;flex-shrink:0;margin:8px 8px 0}.frc-icon.frc-warning{fill:#c00}.frc-success .frc-icon{animation:1s ease-in both frc-fade-in}.frc-content{white-space:nowrap;display:flex;flex-direction:column;margin:4px 6px 0 0;overflow-x:auto;flex-grow:1}.frc-banner{position:absolute;bottom:0;right:6px;line-height:1}.frc-banner *{font-size:10px;opacity:.8;text-decoration:none}.frc-progress{-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:3px 0;height:4px;border:none;background-color:#eee;color:#222;width:100%;transition:.5s linear}.frc-progress::-webkit-progress-bar{background:#eee}.frc-progress::-webkit-progress-value{background:#222}.frc-progress::-moz-progress-bar{background:#222}.frc-button{cursor:pointer;padding:2px 6px;background-color:#f1f1f1;border:1px solid transparent;text-align:center;font-weight:600;text-transform:none}.frc-button:focus{border:1px solid #333}.frc-button:hover{background-color:#ddd}.frc-captcha-solution{display:none}.frc-err-url{text-decoration:underline;font-size:.9em}.frc-rtl{direction:rtl}.frc-rtl .frc-content{margin:4px 0 0 6px}.frc-banner.frc-rtl{left:6px;right:auto}.dark.frc-captcha{color:#fff;background-color:#222;border-color:#333}.dark.frc-captcha *{color:#fff}.dark.frc-captcha button{background-color:#444}.dark .frc-icon{fill:#fff;stroke:#fff}.dark .frc-progress{background-color:#444}.dark .frc-progress::-webkit-progress-bar{background:#444}.dark .frc-progress::-webkit-progress-value{background:#ddd}.dark .frc-progress::-moz-progress-bar{background:#ddd}@keyframes frc-fade-in{from{opacity:0}to{opacity:1}}'; + // This is not an enum to save some bytes in the output bundle. var SOLVER_TYPE_JS = 1; - var CHALLENGE_SIZE_BYTES = 128; // @ts-ignore + var CHALLENGE_SIZE_BYTES = 128; + // @ts-ignore var loaderSVG = ""; var errorSVG = ""; /** * Base template used for all widget states * The reason we use raw string interpolation here is so we don't have to ship something like lit-html. */ - function getTemplate(fieldName, rtl, svgContent, svgAriaHidden, textContent, solutionString, buttonText) { var progress = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : false; var debugData = arguments.length > 8 ? arguments[8] : undefined; @@ -42,63 +37,53 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } /** * Used when the widget is ready to start solving. */ - - function getReadyHTML(fieldName, l) { return getTemplate(fieldName, l.rtl, "", true, l.text_ready, ".UNSTARTED", l.button_start, false); } /** * Used when the widget is retrieving a puzzle */ - - function getFetchingHTML(fieldName, l) { return getTemplate(fieldName, l.rtl, loaderSVG, true, l.text_fetching, ".FETCHING", undefined, true); } /** * Used when the solver is running, displays a progress bar. */ - - function getRunningHTML(fieldName, l) { return getTemplate(fieldName, l.rtl, loaderSVG, true, l.text_solving, ".UNFINISHED", undefined, true); } - function getDoneHTML(fieldName, l, solution, data) { var timeData = "".concat(data.t.toFixed(0), "s (").concat((data.h / data.t * 0.001).toFixed(0), "K/s)").concat(data.solver === SOLVER_TYPE_JS ? " JS Fallback" : ""); return getTemplate(fieldName, l.rtl, "".concat(l.text_completed_sr, ""), false, l.text_completed, solution, undefined, false, timeData, "frc-success"); } - function getExpiredHTML(fieldName, l) { return getTemplate(fieldName, l.rtl, errorSVG, true, l.text_expired, ".EXPIRED", l.button_restart); } - function getErrorHTML(fieldName, l, errorDescription) { var recoverable = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; var headless = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; return getTemplate(fieldName, l.rtl, errorSVG, true, "".concat(l.text_error, "
      ").concat(errorDescription), headless ? ".HEADLESS_ERROR" : ".ERROR", recoverable ? l.button_retry : undefined); } - function findCaptchaElements() { var elements = document.querySelectorAll(".frc-captcha"); - if (elements.length === 0) { console.warn("FriendlyCaptcha: No div was found with .frc-captcha class"); } - return elements; } /** * Injects the style if no #frc-style element is already present * (to support custom stylesheets) */ - - function injectStyle() { + var styleNonce = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; if (!document.querySelector("#frc-style")) { var styleSheet = document.createElement("style"); styleSheet.id = "frc-style"; styleSheet.innerHTML = css; + if (styleNonce) { + styleSheet.setAttribute('nonce', styleNonce); + } document.head.appendChild(styleSheet); } } @@ -106,67 +91,55 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } * @param element parent element of friendlycaptcha * @param progress value between 0 and 1 */ - - function updateProgressBar(element, data) { var p = element.querySelector(".frc-progress"); var perc = (data.i + 1) / data.n; - if (p) { p.value = perc; - p.innerText = perc.toFixed(2) + "%"; + p.innerText = (perc * 100).toFixed(1) + "%"; p.title = data.i + 1 + "/" + data.n + " (" + (data.h / data.t * 0.001).toFixed(0) + "K/s)"; } } /** * Traverses parent nodes until a
      is found, returns null if not found. */ - - function findParentFormElement(element) { while (element.tagName !== "FORM") { element = element.parentElement; - if (!element) { return null; } } - return element; } /** * Add listener to specified element that will only fire once on focus. */ - - function executeOnceOnFocusInEvent(element, listener) { element.addEventListener("focusin", listener, { once: true, passive: true }); - } // Adapted from the base64-arraybuffer package implementation - // (https://github.com/niklasvh/base64-arraybuffer, MIT licensed) - + } + // Adapted from the base64-arraybuffer package implementation + // (https://github.com/niklasvh/base64-arraybuffer, MIT licensed) var CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - var EQ_CHAR = "=".charCodeAt(0); // Use a lookup table to find the index. - + var EQ_CHAR = "=".charCodeAt(0); + // Use a lookup table to find the index. var lookup = new Uint8Array(256); - for (var i = 0; i < CHARS.length; i++) { lookup[CHARS.charCodeAt(i)] = i; } - function encode(bytes) { var len = bytes.length; var base64 = ""; - for (var _i = 0; _i < len; _i += 3) { var b0 = bytes[_i + 0]; var b1 = bytes[_i + 1]; - var b2 = bytes[_i + 2]; // This temporary variable stops the NextJS 13 compiler from breaking this code in optimization. + var b2 = bytes[_i + 2]; + // This temporary variable stops the NextJS 13 compiler from breaking this code in optimization. // See issue https://github.com/FriendlyCaptcha/friendly-challenge/issues/165 - var t = ""; t += CHARS.charAt(b0 >>> 2); t += CHARS.charAt((b0 & 3) << 4 | b1 >>> 4); @@ -174,24 +147,19 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } t += CHARS.charAt(b2 & 63); base64 += t; } - if (len % 3 === 2) { base64 = base64.substring(0, base64.length - 1) + "="; } else if (len % 3 === 1) { base64 = base64.substring(0, base64.length - 2) + "=="; } - return base64; } - function decode(base64) { var len = base64.length; var bufferLength = len * 3 >>> 2; // * 0.75 - if (base64.charCodeAt(len - 1) === EQ_CHAR) bufferLength--; if (base64.charCodeAt(len - 2) === EQ_CHAR) bufferLength--; var bytes = new Uint8Array(bufferLength); - for (var _i2 = 0, p = 0; _i2 < len; _i2 += 4) { var encoded1 = lookup[base64.charCodeAt(_i2 + 0)]; var encoded2 = lookup[base64.charCodeAt(_i2 + 1)]; @@ -201,14 +169,12 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2; bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63; } - return bytes; - } // Defensive init to make it easier to integrate with Gatsby, NextJS, and friends. - + } + // Defensive init to make it easier to integrate with Gatsby, NextJS, and friends. var nav; var ua; - if (typeof navigator !== "undefined" && typeof navigator.userAgent === "string") { nav = navigator; ua = nav.userAgent.toLowerCase(); @@ -218,51 +184,44 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } * and one can spoof whatever is checked here. However, that doesn't make it worthless: it's yet another hurdle for spammers and * it stops unsophisticated scripters from making any request whatsoever. */ - - function isHeadless() { - return (//tell-tale bot signs - ua.indexOf("headless") !== -1 || nav.appVersion.indexOf("Headless") !== -1 || ua.indexOf("bot") !== -1 || // http://www.useragentstring.com/pages/useragentstring.php?typ=Browser - ua.indexOf("crawl") !== -1 || // Only IE5 has two distributions that has this on windows NT.. so yeah. + return ( + //tell-tale bot signs + ua.indexOf("headless") !== -1 || nav.appVersion.indexOf("Headless") !== -1 || ua.indexOf("bot") !== -1 || + // http://www.useragentstring.com/pages/useragentstring.php?typ=Browser + ua.indexOf("crawl") !== -1 || + // Only IE5 has two distributions that has this on windows NT.. so yeah. nav.webdriver === true || !nav.language || nav.languages !== undefined && !nav.languages.length // IE 11 does not support NavigatorLanguage.languages https://developer.mozilla.org/en-US/docs/Web/API/NavigatorLanguage/languages - ); } + /** * Maps a value between 0 and 255 to a difficulty threshold (as uint32) * Difficulty 0 maps to 99.99% probability of being right on the first attempt * Anything above 250 needs 2^32 tries on average to solve. * 150 to 180 seems reasonable */ - - function difficultyToThreshold(value) { if (value > 255) { value = 255; } else if (value < 0) { value = 0; } - return Math.pow(2, (255.999 - value) / 8.0) >>> 0; } - var PUZZLE_EXPIRY_OFFSET = 13; var NUMBER_OF_PUZZLES_OFFSET = 14; var PUZZLE_DIFFICULTY_OFFSET = 15; - function getPuzzleSolverInputs(puzzleBuffer, numPuzzles) { var startingPoints = []; - for (var _i3 = 0; _i3 < numPuzzles; _i3++) { var input = new Uint8Array(CHALLENGE_SIZE_BYTES); input.set(puzzleBuffer); input[120] = _i3; startingPoints.push(input); } - return startingPoints; } - function decodeBase64Puzzle(base64Puzzle) { var parts = base64Puzzle.split("."); var puzzle = parts[1]; @@ -276,27 +235,22 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } expiry: arr[PUZZLE_EXPIRY_OFFSET] * 300000 }; } - function getPuzzle(urlsSeparatedByComma, siteKey, lang) { return new Promise(function ($return, $error) { var urls; urls = urlsSeparatedByComma.split(","); var $Loop_4_trampoline, $Loop_4_local; - function $Loop_4_step() { var _$Loop_4_local = $Loop_4_local(), - _$Loop_4_local2 = _slicedToArray(_$Loop_4_local, 1), - i = _$Loop_4_local2[0]; - + _$Loop_4_local2 = _slicedToArray(_$Loop_4_local, 1), + i = _$Loop_4_local2[0]; i++; return $Loop_4.bind(this, i); } - function $Loop_4(i) { $Loop_4_local = function $Loop_4_local() { return [i]; }; - if (i < urls.length) { var $Try_1_Post = function $Try_1_Post() { try { @@ -305,7 +259,6 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } return $error($boundEx); } }; - var $Try_1_Catch = function $Try_1_Catch(e) { try { { @@ -319,20 +272,17 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } return $error($boundEx); } }; - try { var response; return Promise.resolve(fetchAndRetryWithBackoff(urls[i] + "?sitekey=" + siteKey, { - headers: [["x-frc-client", "js-0.9.14"]], + headers: [["x-frc-client", "js-0.9.17"]], mode: "cors" }, 2)).then(function ($await_7) { try { var $If_6 = function $If_6() { return $Try_1_Post(); }; - response = $await_7; - if (response.ok) { var json; return Promise.resolve(response.json()).then(function ($await_8) { @@ -345,32 +295,26 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } }, $Try_1_Catch); } else { var _json; - var $Try_2_Post = function () { try { if (_json && _json.errors && _json.errors[0] === "endpoint_not_enabled") { throw Error("Endpoint not allowed (".concat(response.status, ")")); } - if (i === urls.length - 1) { throw Error("Response status ".concat(response.status, " ").concat(response.statusText, " ").concat(_json ? _json.errors : "")); } - return $If_6.call(this); } catch ($boundEx) { return $Try_1_Catch($boundEx); } }.bind(this); - var $Try_2_Catch = function $Try_2_Catch(e) { - /* Do nothing, the error is not valid JSON */ try { return $Try_2_Post(); } catch ($boundEx) { return $Try_1_Catch($boundEx); } - }; - + } /* Do nothing, the error is not valid JSON */; try { return Promise.resolve(response.json()).then(function ($await_9) { try { @@ -384,7 +328,6 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } $Try_2_Catch(e); } } - return $If_6.call(this); } catch ($boundEx) { return $Try_1_Catch($boundEx); @@ -395,11 +338,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } } } else return [1]; } - return ($Loop_4_trampoline = function (q) { while (q) { if (q.then) return void q.then($Loop_4_trampoline, $error); - try { if (q.pop) { if (q.length) return q.pop() ? $Loop_4_exit.call(this) : q;else q = $Loop_4_step; @@ -409,7 +350,6 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } } } }.bind(this))($Loop_4.bind(this, 0)); - function $Loop_4_exit() { // This code should never be reached. return $error(Error("Internal error")); @@ -422,8 +362,6 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } * @param opts Options for fetch * @param n Number of times to attempt before giving up. */ - - function fetchAndRetryWithBackoff(url, opts, n) { return new Promise(function ($return, $error) { var time = 1000; @@ -443,9 +381,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } }); })); }); - } // English - + } + // English var LANG_EN = { text_init: "Initializing...", text_ready: "Anti-Robot Verification", @@ -459,8 +397,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } text_error: "Verification failed", button_retry: "Retry", text_fetch_error: "Failed to connect to" - }; // French - + }; + // French var LANG_FR = { text_init: "Chargement...", text_ready: "Vérification Anti-Robot", @@ -474,8 +412,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } text_error: "Échec de la vérification", button_retry: "Recommencer", text_fetch_error: "Problème de connexion avec" - }; // German - + }; + // German var LANG_DE = { text_init: "Initialisierung...", text_ready: "Anti-Roboter-Verifizierung", @@ -489,8 +427,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } text_error: "Verifizierung fehlgeschlagen", button_retry: "Erneut versuchen", text_fetch_error: "Verbindungsproblem mit" - }; // Dutch - + }; + // Dutch var LANG_NL = { text_init: "Initializeren...", text_ready: "Anti-robotverificatie", @@ -504,8 +442,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } text_error: "Verificatie mislukt", button_retry: "Opnieuw proberen", text_fetch_error: "Verbinding mislukt met" - }; // Italian - + }; + // Italian var LANG_IT = { text_init: "Inizializzazione...", text_ready: "Verifica Anti-Robot", @@ -519,8 +457,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } text_error: "Verifica fallita", button_retry: "Riprova", text_fetch_error: "Problema di connessione con" - }; // Portuguese - + }; + // Portuguese var LANG_PT = { text_init: "Inicializando...", text_ready: "Verificação Anti-Robô", @@ -534,8 +472,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } text_error: "Verificação falhou", button_retry: "Tentar novamente", text_fetch_error: "Falha de conexão com" - }; // Spanish - + }; + // Spanish var LANG_ES = { text_init: "Inicializando...", text_ready: "Verificación Anti-Robot", @@ -549,8 +487,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } text_error: "Ha fallado la verificación", button_retry: "Intentar de nuevo", text_fetch_error: "Error al conectarse a" - }; // Catalan - + }; + // Catalan var LANG_CA = { text_init: "Inicialitzant...", text_ready: "Verificació Anti-Robot", @@ -564,8 +502,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } text_error: "Ha fallat la verificació", button_retry: "Tornar a provar", text_fetch_error: "Error connectant a" - }; // Japanese - + }; + // Japanese var LANG_JA = { text_init: "開始しています...", text_ready: "アンチロボット認証", @@ -579,8 +517,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } text_error: "認証にエラーが発生しました", button_retry: "再度認証を行う", text_fetch_error: "接続ができませんでした" - }; // Danish - + }; + // Danish var LANG_DA = { text_init: "Aktiverer...", text_ready: "Jeg er ikke en robot", @@ -594,8 +532,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } text_error: "Bekræftelse mislykkedes", button_retry: "Prøv igen", text_fetch_error: "Forbindelsen mislykkedes" - }; // Russian - + }; + // Russian var LANG_RU = { text_init: "Инициализация...", text_ready: "АнтиРобот проверка", @@ -609,8 +547,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } text_error: "Ошибка проверки", button_retry: "Повторить ещё раз", text_fetch_error: "Ошибка подключения" - }; // Swedish - + }; + // Swedish var LANG_SV = { text_init: "Aktiverar...", text_ready: "Jag är inte en robot", @@ -624,8 +562,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } text_error: "Verifiering kunde inte slutföras", button_retry: "Omstart", text_fetch_error: "Verifiering misslyckades" - }; // Turkish - + }; + // Turkish var LANG_TR = { text_init: "Başlatılıyor...", text_ready: "Anti-Robot Doğrulaması", @@ -639,8 +577,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } text_error: "Doğrulama başarısız oldu", button_retry: "Tekrar dene", text_fetch_error: "Bağlantı başarısız oldu" - }; // Greek - + }; + // Greek var LANG_EL = { text_init: "Προετοιμασία...", text_ready: "Anti-Robot Επαλήθευση", @@ -654,8 +592,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } text_error: " Η επαλήθευση απέτυχε", button_retry: " Δοκιμάστε ξανά", text_fetch_error: " Αποτυχία σύνδεσης με" - }; // Ukrainian - + }; + // Ukrainian var LANG_UK = { text_init: "Ініціалізація...", text_ready: "Антиробот верифікація", @@ -669,8 +607,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } text_error: "Верифікація не вдалась", button_retry: "Спробувати знову", text_fetch_error: "Не вдалось з’єднатись" - }; // Bulgarian - + }; + // Bulgarian var LANG_BG = { text_init: "Инициализиране...", text_ready: "Анти-робот проверка", @@ -684,8 +622,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } text_error: "Неуспешна проверка", button_retry: "Опитайте пак", text_fetch_error: "Неуспешно свързване с" - }; // Czech - + }; + // Czech var LANG_CS = { text_init: "Inicializace...", text_ready: "Ověření proti robotům", @@ -699,8 +637,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } text_error: "Ověření se nezdařilo", button_retry: "Zkusit znovu", text_fetch_error: "Připojení se nezdařilo" - }; // Slovak - + }; + // Slovak var LANG_SK = { text_init: "Inicializácia...", text_ready: "Overenie proti robotom", @@ -714,8 +652,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } text_error: "Overenie sa nepodarilo", button_retry: "Skúsiť znova", text_fetch_error: "Pripojenie sa nepodarilo" - }; // Norwegian - + }; + // Norwegian var LANG_NO = { text_init: " Aktiverer...", text_ready: "Jeg er ikke en robot", @@ -729,8 +667,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } text_error: "Bekreftelsen mislyktes", button_retry: "Prøv på nytt", text_fetch_error: "Tilkoblingen mislyktes" - }; // Finnish - + }; + // Finnish var LANG_FI = { text_init: "Aktivoidaan...", text_ready: "En ole robotti", @@ -744,8 +682,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } text_error: "Vahvistus epäonnistui", button_retry: "Yritä uudelleen", text_fetch_error: "Yhteys epäonnistui" - }; // Latvian - + }; + // Latvian var LANG_LV = { text_init: "Notiek inicializēšana...", text_ready: "Verifikācija, ka neesat robots", @@ -759,8 +697,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } text_error: "Verifikācija neizdevās", button_retry: "Mēģināt vēlreiz", text_fetch_error: "Neizdevās izveidot savienojumu ar" - }; // Lithuanian - + }; + // Lithuanian var LANG_LT = { text_init: "Inicijuojama...", text_ready: "Patikrinimas, ar nesate robotas", @@ -774,8 +712,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } text_error: "Patikrinimas nepavyko", button_retry: "Kartoti", text_fetch_error: "Nepavyko prisijungti prie" - }; // Polish - + }; + // Polish var LANG_PL = { text_init: "Inicjowanie...", text_ready: "Weryfikacja antybotowa", @@ -789,8 +727,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } text_error: "Weryfikacja nie powiodła się", button_retry: "Spróbuj ponownie", text_fetch_error: "Nie udało się połączyć z" - }; // Estonian - + }; + // Estonian var LANG_ET = { text_init: "Initsialiseerimine...", text_ready: "Robotivastane kinnitus", @@ -804,8 +742,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } text_error: "Kinnitamine nurjus", button_retry: "Proovi uuesti", text_fetch_error: "Ühenduse loomine nurjus" - }; // Croatian - + }; + // Croatian var LANG_HR = { text_init: "Početno postavljanje...", text_ready: "Provjera protiv robota", @@ -819,8 +757,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } text_error: "Provjera nije uspjlela", button_retry: " Ponovo pokreni", text_fetch_error: "Nije moguće uspostaviti vezu" - }; // Serbian - + }; + // Serbian var LANG_SR = { text_init: "Pokretanje...", text_ready: "Anti-Robot Verifikacija", @@ -834,8 +772,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } text_error: "Verifikacija nije uspela", button_retry: "Pokušajte ponovo", text_fetch_error: "Neuspelo povezivanje sa..." - }; // Slovenian - + }; + // Slovenian var LANG_SL = { text_init: "Inicializiranje...", text_ready: "Preverjanje robotov", @@ -849,8 +787,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } text_error: "Preverjanje ni uspelo", button_retry: "Poskusi ponovno", text_fetch_error: "Povezave ni bilo mogoče vzpostaviti" - }; // Hungarian - + }; + // Hungarian var LANG_HU = { text_init: "Inicializálás...", text_ready: "Robotellenes ellenőrzés", @@ -864,8 +802,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } text_error: "Az ellenőrzés nem sikerült", button_retry: "Próbálja újra", text_fetch_error: "Nem sikerült csatlakozni" - }; // Romanian - + }; + // Romanian var LANG_RO = { text_init: "Se inițializează...", text_ready: "Verificare anti-robot", @@ -879,8 +817,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } text_error: "Verificare eșuată", button_retry: "Reîncearcă", text_fetch_error: "Nu s-a putut conecta" - }; // Chinese - + }; + // Chinese var LANG_ZH = { text_init: "初始化中……", text_ready: "人机验证", @@ -894,8 +832,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } text_error: "校验失败", button_retry: "重试", text_fetch_error: "无法连接到" - }; // Traditional Chinese - + }; + // Traditional Chinese var LANG_ZH_TW = { text_init: "正在初始化……", text_ready: "反機器人驗證", @@ -909,8 +847,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } text_error: "驗證失敗", button_retry: "重試", text_fetch_error: "無法連線到" - }; // Vietnamese - + }; + // Vietnamese var LANG_VI = { text_init: "Đang khởi tạo...", text_ready: "Xác minh chống Robot", @@ -924,8 +862,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } text_error: "Xác minh thất bại", button_retry: "Thử lại", text_fetch_error: "Không kết nối được" - }; // Hebrew - + }; + // Hebrew var LANG_HE = { text_init: "בביצוע...", text_ready: "אימות אנוש", @@ -940,8 +878,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } button_retry: "לנסות שוב", text_fetch_error: "נכשל החיבור אל", rtl: true - }; // Thai - + }; + // Thai var LANG_TH = { text_init: "การเริ่มต้น...", text_ready: " การตรวจสอบต่อต้านหุ่นยนต์", @@ -956,6 +894,21 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } button_retry: "ลองใหม่", text_fetch_error: "ไม่สามารถเชื่อมต่อได้" }; + // South Korean + var LANG_KR = { + text_init: "초기화 중", + text_ready: "Anti-Robot 검증", + button_start: "검증을 위해 클릭해 주세요", + text_fetching: "검증 준비 중", + text_solving: "검증 중", + text_completed: "검증이 완료되었습니다", + text_completed_sr: "자동 스팸 확인 완료", + text_expired: "Anti-Robot 검증 만료", + button_restart: "다시 시작합니다", + text_error: "검증 실패", + button_retry: "다시 시도해 주세요", + text_fetch_error: "연결하지 못했습니다" + }; var localizations = { en: LANG_EN, de: LANG_DE, @@ -991,10 +944,10 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } vi: LANG_VI, he: LANG_HE, th: LANG_TH, + kr: LANG_KR, // alternative language codes nb: LANG_NO }; - function createDiagnosticsBuffer(solverID, timeToSolved) { var arr = new Uint8Array(3); var view = new DataView(arr.buffer); @@ -1002,19 +955,16 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } view.setUint16(1, timeToSolved); return arr; } + var workerString = "!function(){function A(r){return A=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(A){return typeof A}:function(A){return A&&\"function\"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?\"symbol\":typeof A},A(r)}function r(A,r){(null==r||r>A.length)&&(r=A.length);for(var t=0,n=Array(r);t>>31))+a+(((B=I)&c|(B|c)&~(I=B+c))>>>31)),E=(Q=(l=(Q=l^(w=w+(v=C=y^(B=I))+((h&(y=Q)|(h|y)&~(I=h+y))>>>31)))>>>24^(C=E^(h=I))<<8)^(w=w+(v=(Q=v^(s=(s=s+l+((B&(E=C>>>24^Q<<8)|(B|E)&~(I=B+E))>>>31))+u+(((B=I)&f|(B|f)&~(I=B+f))>>>31)))>>>16^(C=y^(B=I))<<16)+((h&(y=C>>>16^Q<<16)|(h|y)&~(I=h+y))>>>31)))>>>31^(C=E^(h=I))<<1,l=C>>>31^Q<<1,A[t]=B,A[t+1]=s,A[n]=E,A[n+1]=l,A[e]=h,A[e+1]=w,A[o]=y,A[o+1]=v}var I,C,Q=[4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225],c=[0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,28,20,8,16,18,30,26,12,2,24,0,4,22,14,10,6,22,16,24,0,10,4,30,26,20,28,6,12,14,2,18,8,14,18,6,2,26,24,22,28,4,12,10,20,8,0,30,16,18,0,10,14,4,8,20,30,28,2,22,24,12,16,6,26,4,24,12,20,0,22,16,6,8,26,14,10,30,28,2,18,24,10,2,30,28,26,8,20,0,14,12,6,18,4,16,22,26,22,14,28,24,2,6,18,10,0,30,8,16,12,4,20,12,30,28,18,22,6,0,16,24,4,26,14,2,8,20,10,20,4,16,8,14,12,2,10,30,22,18,28,6,24,26,0,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,28,20,8,16,18,30,26,12,2,24,0,4,22,14,10,6];function a(A,r){for(var t=A.v,n=A.m,e=0;e<16;e++)t[e]=A.h[e],t[e+16]=Q[e];t[24]=t[24]^A.t,t[25]=t[25]^A.t/4294967296,r&&(t[28]=~t[28],t[29]=~t[29]);for(var o=0;o<32;o++)n[o]=i(A.b,4*o);for(var I=0;I<12;I++)g(t,n,0,8,16,24,c[16*I+0],c[16*I+1]),g(t,n,2,10,18,26,c[16*I+2],c[16*I+3]),g(t,n,4,12,20,28,c[16*I+4],c[16*I+5]),g(t,n,6,14,22,30,c[16*I+6],c[16*I+7]),g(t,n,0,10,20,30,c[16*I+8],c[16*I+9]),g(t,n,2,12,22,24,c[16*I+10],c[16*I+11]),g(t,n,4,14,16,26,c[16*I+12],c[16*I+13]),g(t,n,6,8,18,28,c[16*I+14],c[16*I+15]);for(var C=0;C<16;C++)A.h[C]=A.h[C]^t[C]^t[C+16]}function f(A,r){for(var t=0;t<16;t++)A.h[t]=Q[t];A.b.set(r),A.h[0]^=16842752^A.outlen}function u(){return new Promise((function(A){return A((function(A,r){var t=function(A,r,t){if(128!=A.length)throw Error(\"Invalid input\");var n=A.buffer,e=new DataView(n),i=new o(32);i.t=128;for(var g=e.getUint32(124,!0),I=g+t,C=g;C2&&void 0!==arguments[2]?arguments[2]:4294967295);return[A,t]}))}))}Uint8Array.prototype.slice||Object.defineProperty(Uint8Array.prototype,\"slice\",{value:function(A,r){return new Uint8Array(Array.prototype.slice.call(this,A,r))}}),self.ASC_TARGET=0;var B=new Promise((function(A){return C=A}));self.onerror=function(A){self.postMessage({type:\"error\",message:JSON.stringify(A)})},self.onmessage=function(n){return new Promise((function(e,o){var i;i=n.data;var g=function(){try{return e()}catch(A){return o(A)}},Q=function(A){try{return setTimeout((function(){throw A})),g()}catch(r){return o(r)}};try{var c=function(){return g()};if(\"solver\"!==i.type){var a,f,s,E,l=function(){return c.call(this)};return\"start\"===i.type?Promise.resolve(B).then(function(A){try{a=A,self.postMessage({type:\"started\"}),f=0;for(var t=0;t<256;t++){i.puzzleSolverInput[123]=t;var n=function(A){if(Array.isArray(A))return A}(o=a(i.puzzleSolverInput,i.threshold))||function(A){var r=null==A?null:\"undefined\"!=typeof Symbol&&A[Symbol.iterator]||A[\"@@iterator\"];if(null!=r){var t,n,e,o,i=[],g=!0,I=!1;try{for(e=(r=r.call(A)).next;!(g=(t=e.call(r)).done)&&(i.push(t.value),2!==i.length);g=!0);}catch(A){I=!0,n=A}finally{try{if(!g&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(I)throw n}}return i}}(o)||function(A){if(A){if(\"string\"==typeof A)return r(A,2);var t={}.toString.call(A).slice(8,-1);return\"Object\"===t&&A.constructor&&(t=A.constructor.name),\"Map\"===t||\"Set\"===t?Array.from(A):\"Arguments\"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?r(A,2):void 0}}(o)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}(),e=n[0];if(0!==n[1].length){s=e;break}console.warn(\"FC: Internal error or no solution found\"),f+=Math.pow(2,32)-1}return E=new DataView(s.slice(-4).buffer),f+=E.getUint32(0,!0),self.postMessage({type:\"done\",solution:s.slice(-8),h:f,puzzleIndex:i.puzzleIndex,puzzleNumber:i.puzzleNumber}),l.call(this)}catch(g){return Q(g)}var o}.bind(this),Q):l.call(this)}var h=function(){return self.postMessage({type:\"ready\",solver:I}),c.call(this)};if(i.forceJS)return I=1,Promise.resolve(u()).then(function(A){try{return C(A),h.call(this)}catch(r){return Q(r)}}.bind(this),Q);var w=function(){try{return h.call(this)}catch(A){return Q(A)}}.bind(this),y=function(A){try{return console.log(\"FriendlyCaptcha failed to initialize WebAssembly, falling back to Javascript solver: \"+A.toString()),I=1,Promise.resolve(u()).then((function(A){try{return C(A),w()}catch(r){return Q(r)}}),Q)}catch(r){return Q(r)}};try{var v;return I=2,v=WebAssembly.compile(function(r){var n=3285;r.charCodeAt(4379)===A&&n--,r.charCodeAt(4378)===A&&n--;for(var e=new Uint8Array(n),o=0,i=0;o<4380;o+=4){var g=t[r.charCodeAt(o+0)],I=t[r.charCodeAt(o+1)],C=t[r.charCodeAt(o+2)],Q=t[r.charCodeAt(o+3)];e[i++]=g<<2|I>>4,e[i++]=(15&I)<<4|C>>2,e[i++]=(3&C)<<6|63&Q}return e}(\"AGFzbQEAAAABKghgAABgAn9/AGADf39/AX9gAX8AYAR/f39/AGAAAX9gAX8Bf2ACf38BfwINAQNlbnYFYWJvcnQABAMMCwcGAwAAAQIFAQIABQMBAAEGFgR/AUEAC38BQQALfwBBAwt/AEHgDAsHbgkGbWVtb3J5AgAHX19hbGxvYwABCF9fcmV0YWluAAIJX19yZWxlYXNlAAMJX19jb2xsZWN0AAQHX19yZXNldAAFC19fcnR0aV9iYXNlAwMNVWludDhBcnJheV9JRAMCDHNvbHZlQmxha2UyYgAKCAELCvQSC5IBAQV/IABB8P///wNLBEAACyMBQRBqIgQgAEEPakFwcSICQRAgAkEQSxsiBmoiAj8AIgVBEHQiA0sEQCAFIAIgA2tB//8DakGAgHxxQRB2IgMgBSADShtAAEEASARAIANAAEEASARAAAsLCyACJAEgBEEQayICIAY2AgAgAkEBNgIEIAIgATYCCCACIAA2AgwgBAsEACAACwMAAQsDAAELBgAjACQBC7sCAQF/AkAgAUUNACAAQQA6AAAgACABakEEayICQQA6AAMgAUECTQ0AIABBADoAASAAQQA6AAIgAkEAOgACIAJBADoAASABQQZNDQAgAEEAOgADIAJBADoAACABQQhNDQAgAEEAIABrQQNxIgJqIgBBADYCACAAIAEgAmtBfHEiAmpBHGsiAUEANgIYIAJBCE0NACAAQQA2AgQgAEEANgIIIAFBADYCECABQQA2AhQgAkEYTQ0AIABBADYCDCAAQQA2AhAgAEEANgIUIABBADYCGCABQQA2AgAgAUEANgIEIAFBADYCCCABQQA2AgwgACAAQQRxQRhqIgFqIQAgAiABayEBA0AgAUEgTwRAIABCADcDACAAQgA3AwggAEIANwMQIABCADcDGCABQSBrIQEgAEEgaiEADAELCwsLcgACfyAARQRAQQxBAhABIQALIAALQQA2AgAgAEEANgIEIABBADYCCCABQfD///8DIAJ2SwRAQcAKQfAKQRJBORAAAAsgASACdCIBQQAQASICIAEQBiAAKAIAGiAAIAI2AgAgACACNgIEIAAgATYCCCAAC88BAQJ/QaABQQAQASIAQQxBAxABQYABQQAQBzYCACAAQQxBBBABQQhBAxAHNgIEIABCADcDCCAAQQA2AhAgAEIANwMYIABCADcDICAAQgA3AyggAEIANwMwIABCADcDOCAAQgA3A0AgAEIANwNIIABCADcDUCAAQgA3A1ggAEIANwNgIABCADcDaCAAQgA3A3AgAEIANwN4IABCADcDgAEgAEIANwOIASAAQgA3A5ABQYABQQUQASIBQYABEAYgACABNgKYASAAQSA2ApwBIAAL2AkCA38SfiAAKAIEIQIgACgCmAEhAwNAIARBgAFIBEAgAyAEaiABIARqKQMANwMAIARBCGohBAwBCwsgAigCBCkDACEMIAIoAgQpAwghDSACKAIEKQMQIQ4gAigCBCkDGCEPIAIoAgQpAyAhBSACKAIEKQMoIQsgAigCBCkDMCEGIAIoAgQpAzghB0KIkvOd/8z5hOoAIQhCu86qptjQ67O7fyEJQqvw0/Sv7ry3PCEQQvHt9Pilp/2npX8hCiAAKQMIQtGFmu/6z5SH0QCFIRFCn9j52cKR2oKbfyESQpSF+aXAyom+YCETQvnC+JuRo7Pw2wAhFEEAIQQDQCAEQcABSARAIAUgCCARIAwgBSADIARBgAhqIgEtAABBA3RqKQMAfHwiBYVCIIoiDHwiCIVCGIoiESAIIAwgBSARIAMgAS0AAUEDdGopAwB8fCIMhUIQiiIIfCIVhUI/iiEFIAsgCSASIA0gCyADIAEtAAJBA3RqKQMAfHwiDYVCIIoiCXwiEYVCGIohCyAGIBAgEyAOIAYgAyABLQAEQQN0aikDAHx8IgaFQiCKIg58IhCFQhiKIhIgECAOIAYgEiADIAEtAAVBA3RqKQMAfHwiDoVCEIoiE3wiEIVCP4ohBiAHIAogFCAPIAcgAyABLQAGQQN0aikDAHx8IgeFQiCKIg98IgqFQhiKIhIgCiAPIAcgEiADIAEtAAdBA3RqKQMAfHwiD4VCEIoiCnwiEoVCP4ohByAQIAogDCARIAkgDSALIAMgAS0AA0EDdGopAwB8fCINhUIQiiIJfCIWIAuFQj+KIgwgAyABLQAIQQN0aikDAHx8IhCFQiCKIgp8IgsgECALIAyFQhiKIhEgAyABLQAJQQN0aikDAHx8IgwgCoVCEIoiFHwiECARhUI/iiELIAYgEiAIIA0gBiADIAEtAApBA3RqKQMAfHwiDYVCIIoiCHwiCoVCGIoiBiANIAYgAyABLQALQQN0aikDAHx8Ig0gCIVCEIoiESAKfCIKhUI/iiEGIAcgFSAJIA4gByADIAEtAAxBA3RqKQMAfHwiDoVCIIoiCHwiCYVCGIoiByAOIAcgAyABLQANQQN0aikDAHx8Ig4gCIVCEIoiEiAJfCIIhUI/iiEHIAUgFiATIA8gBSADIAEtAA5BA3RqKQMAfHwiD4VCIIoiCXwiFYVCGIoiBSAPIAUgAyABLQAPQQN0aikDAHx8Ig8gCYVCEIoiEyAVfCIJhUI/iiEFIARBEGohBAwBCwsgAigCBCACKAIEKQMAIAggDIWFNwMAIAIoAgQgAigCBCkDCCAJIA2FhTcDCCACKAIEIAIoAgQpAxAgDiAQhYU3AxAgAigCBCACKAIEKQMYIAogD4WFNwMYIAIoAgQgAigCBCkDICAFIBGFhTcDICACKAIEIAIoAgQpAyggCyAShYU3AyggAigCBCACKAIEKQMwIAYgE4WFNwMwIAIoAgQgAigCBCkDOCAHIBSFhTcDOCAAIAw3AxggACANNwMgIAAgDjcDKCAAIA83AzAgACAFNwM4IAAgCzcDQCAAIAY3A0ggACAHNwNQIAAgCDcDWCAAIAk3A2AgACAQNwNoIAAgCjcDcCAAIBE3A3ggACASNwOAASAAIBM3A4gBIAAgFDcDkAEL4QIBBH8gACgCCEGAAUcEQEHQCUGACkEeQQUQAAALIAAoAgAhBBAIIgMoAgQhBSADQoABNwMIIAQoAnwiACACaiEGA0AgACAGSQRAIAQgADYCfCADKAIEIgIoAgQgAygCnAGtQoiS95X/zPmE6gCFNwMAIAIoAgRCu86qptjQ67O7fzcDCCACKAIEQqvw0/Sv7ry3PDcDECACKAIEQvHt9Pilp/2npX83AxggAigCBELRhZrv+s+Uh9EANwMgIAIoAgRCn9j52cKR2oKbfzcDKCACKAIEQuv6htq/tfbBHzcDMCACKAIEQvnC+JuRo7Pw2wA3AzggAyAEEAkgBSgCBCkDAKcgAUkEQEEAIAUoAgAiAUEQaygCDCICSwRAQfALQbAMQc0NQQUQAAALQQxBAxABIgAgATYCACAAIAI2AgggACABNgIEIAAPCyAAQQFqIQAMAQsLQQxBAxABQQBBABAHCwwAQaANJABBoA0kAQsL+gQJAEGBCAu/AQECAwQFBgcICQoLDA0ODw4KBAgJDw0GAQwAAgsHBQMLCAwABQIPDQoOAwYHAQkEBwkDAQ0MCw4CBgUKBAAPCAkABQcCBAoPDgELDAYIAw0CDAYKAAsIAwQNBwUPDgEJDAUBDw4NBAoABwYDCQIICw0LBw4MAQMJBQAPBAgGAgoGDw4JCwMACAwCDQcBBAoFCgIIBAcGAQUPCwkOAwwNAAABAgMEBQYHCAkKCwwNDg8OCgQICQ8NBgEMAAILBwUDAEHACQspGgAAAAEAAAABAAAAGgAAAEkAbgB2AGEAbABpAGQAIABpAG4AcAB1AHQAQfAJCzEiAAAAAQAAAAEAAAAiAAAAcwByAGMALwBzAG8AbAB2AGUAcgBXAGEAcwBtAC4AdABzAEGwCgsrHAAAAAEAAAABAAAAHAAAAEkAbgB2AGEAbABpAGQAIABsAGUAbgBnAHQAaABB4AoLNSYAAAABAAAAAQAAACYAAAB+AGwAaQBiAC8AYQByAHIAYQB5AGIAdQBmAGYAZQByAC4AdABzAEGgCws1JgAAAAEAAAABAAAAJgAAAH4AbABpAGIALwBzAHQAYQB0AGkAYwBhAHIAcgBhAHkALgB0AHMAQeALCzMkAAAAAQAAAAEAAAAkAAAASQBuAGQAZQB4ACAAbwB1AHQAIABvAGYAIAByAGEAbgBnAGUAQaAMCzMkAAAAAQAAAAEAAAAkAAAAfgBsAGkAYgAvAHQAeQBwAGUAZABhAHIAcgBhAHkALgB0AHMAQeAMCy4GAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAYQAAAAIAAAAhAgAAAgAAACQC\")),Promise.resolve(v).then((function(A){try{return Promise.resolve(function(A){return new Promise((function(r,t){var n,e,o;return Promise.resolve(function(A){return new Promise((function(r,t){var n,e;return n={env:{abort:function(){throw Error(\"Wasm aborted\")}}},Promise.resolve(WebAssembly.instantiate(A,n)).then((function(A){try{return e=function(A){var r={},t=A.exports,n=t.memory,e=t.__alloc,o=t.__retain,i=t.__rtti_base||-1;return r.__allocArray=function(A,r){var t=function(A){return new Uint32Array(n.buffer)[(i+4>>>2)+2*A]}(A),g=31-Math.clz32(t>>>6&31),I=r.length,C=e(I<>>2]=o(C),c[Q+4>>>2]=C,c[Q+8>>>2]=I<>>g)+u]=o(r[u]);else f.set(r,C>>>g);return Q},r.__getUint8Array=function(A){var r=new Uint32Array(n.buffer),t=r[A+4>>>2];return new Uint8Array(n.buffer,t,r[t-4>>>2]>>>0)},function(A){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=A.__argumentsLength?function(r){A.__argumentsLength.value=r}:A.__setArgumentsLength||A.__setargc||function(){return{}},n=function(){if(!Object.prototype.hasOwnProperty.call(A,e))return 1;var n=A[e],o=e.split(\".\")[0];\"function\"==typeof n&&n!==t?(r[o]=function(){return t(arguments.length),n.apply(void 0,arguments)}).original=n:r[o]=n};for(var e in A)n();return r}(t,r)}(A),r({exports:e})}catch(n){return t(n)}}),t)}))}(A)).then((function(A){try{return e=(n=A).exports.__retain(n.exports.__allocArray(n.exports.Uint8Array_ID,new Uint8Array(128))),o=n.exports.__getUint8Array(e),r((function(A,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4294967295;o.set(A);var i=n.exports.solveBlake2b(e,r,t);o=n.exports.__getUint8Array(e);var g=n.exports.__getUint8Array(i);return n.exports.__release(i),[o,g]}))}catch(i){return t(i)}}),t)}))}(A)).then((function(A){try{return C(A),w()}catch(r){return y(r)}}),y)}catch(r){return y(r)}}),y)}catch(p){y(p)}}catch(p){Q(p)}}))}}()}(\"undefined\"==typeof frcWorker?frcWorker={}:frcWorker);"; - var workerString = "!function(){function A(A,r){return function(A){if(Array.isArray(A))return A}(A)||function(A,t){if(\"undefined\"!=typeof Symbol&&Symbol.iterator in Object(A)){var r=[],n=!0,e=!1,o=void 0;try{for(var i,g=A[Symbol.iterator]();!(n=(i=g.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(I){e=!0,o=I}finally{try{n||null==g.return||g.return()}finally{if(e)throw o}}return r}}(A,r)||function(A,r){if(A){if(\"string\"==typeof A)return t(A,r);var n=Object.prototype.toString.call(A).slice(8,-1);return\"Object\"===n&&A.constructor&&(n=A.constructor.name),\"Map\"===n||\"Set\"===n?Array.from(A):\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(A,r):void 0}}(A,r)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function t(A,t){(null==t||t>A.length)&&(t=A.length);for(var r=0,n=new Array(t);r>>31))+a+(((u=I)&c|(u|c)&~(I=u+c))>>>31)),E=(Q=(h=(Q=h^(l=l+(D=C=y^(u=I))+((w&(y=Q)|(w|y)&~(I=w+y))>>>31)))>>>24^(C=E^(w=I))<<8)^(l=l+(D=(Q=D^(s=(s=s+h+((u&(E=C>>>24^Q<<8)|(u|E)&~(I=u+E))>>>31))+f+(((u=I)&B|(u|B)&~(I=u+B))>>>31)))>>>16^(C=y^(u=I))<<16)+((w&(y=C>>>16^Q<<16)|(w|y)&~(I=w+y))>>>31)))>>>31^(C=E^(w=I))<<1,h=C>>>31^Q<<1,A[r]=u,A[r+1]=s,A[n]=E,A[n+1]=h,A[e]=w,A[e+1]=l,A[o]=y,A[o+1]=D}var I,C,Q=[4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225],c=[0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,28,20,8,16,18,30,26,12,2,24,0,4,22,14,10,6,22,16,24,0,10,4,30,26,20,28,6,12,14,2,18,8,14,18,6,2,26,24,22,28,4,12,10,20,8,0,30,16,18,0,10,14,4,8,20,30,28,2,22,24,12,16,6,26,4,24,12,20,0,22,16,6,8,26,14,10,30,28,2,18,24,10,2,30,28,26,8,20,0,14,12,6,18,4,16,22,26,22,14,28,24,2,6,18,10,0,30,8,16,12,4,20,12,30,28,18,22,6,0,16,24,4,26,14,2,8,20,10,20,4,16,8,14,12,2,10,30,22,18,28,6,24,26,0,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,28,20,8,16,18,30,26,12,2,24,0,4,22,14,10,6];function a(A,t){for(var r=A.v,n=A.m,e=0;e<16;e++)r[e]=A.h[e],r[e+16]=Q[e];r[24]=r[24]^A.t,r[25]=r[25]^A.t/4294967296,t&&(r[28]=~r[28],r[29]=~r[29]);for(var o=0;o<32;o++)n[o]=i(A.b,4*o);for(var I=0;I<12;I++)g(r,n,0,8,16,24,c[16*I+0],c[16*I+1]),g(r,n,2,10,18,26,c[16*I+2],c[16*I+3]),g(r,n,4,12,20,28,c[16*I+4],c[16*I+5]),g(r,n,6,14,22,30,c[16*I+6],c[16*I+7]),g(r,n,0,10,20,30,c[16*I+8],c[16*I+9]),g(r,n,2,12,22,24,c[16*I+10],c[16*I+11]),g(r,n,4,14,16,26,c[16*I+12],c[16*I+13]),g(r,n,6,8,18,28,c[16*I+14],c[16*I+15]);for(var C=0;C<16;C++)A.h[C]=A.h[C]^r[C]^r[C+16]}function B(A,t){for(var r=0;r<16;r++)A.h[r]=Q[r];A.b.set(t),A.h[0]^=16842752^A.outlen}function f(A,t,r){if(128!=A.length)throw Error(\"Invalid input\");var n=A.buffer,e=new DataView(n),i=new o(32);i.t=128;for(var g=e.getUint32(124,!0),I=g+r,C=g;C2&&void 0!==arguments[2]?arguments[2]:4294967295,n=f(A,t,r);return[A,n]}))}))}Uint8Array.prototype.slice||Object.defineProperty(Uint8Array.prototype,\"slice\",{value:function(A,t){return new Uint8Array(Array.prototype.slice.call(this,A,t))}}),self.ASC_TARGET=0;var s=new Promise((function(A){return C=A}));self.onerror=function(A){self.postMessage({type:\"error\",message:JSON.stringify(A)})},self.onmessage=function(t){return new Promise((function(e,o){var i;i=t.data;var g=function(){try{return e()}catch(A){return o(A)}},Q=function(A){try{return setTimeout((function(){throw A})),g()}catch(t){return o(t)}};try{var c=function(){return g()};if(\"solver\"!==i.type){var a,B,f,E,h=function(){return c.call(this)};return\"start\"===i.type?Promise.resolve(s).then(function(t){try{a=t,self.postMessage({type:\"started\"}),B=0;for(var r=0;r<256;r++){i.puzzleSolverInput[123]=r;var n=A(a(i.puzzleSolverInput,i.threshold),2),e=n[0];if(0!==n[1].length){f=e;break}console.warn(\"FC: Internal error or no solution found\"),B+=Math.pow(2,32)-1}return E=new DataView(f.slice(-4).buffer),B+=E.getUint32(0,!0),self.postMessage({type:\"done\",solution:f.slice(-8),h:B,puzzleIndex:i.puzzleIndex,puzzleNumber:i.puzzleNumber}),h.call(this)}catch(o){return Q(o)}}.bind(this),Q):h.call(this)}var w=function(){return self.postMessage({type:\"ready\",solver:I}),c.call(this)};if(i.forceJS)return I=1,Promise.resolve(u()).then(function(A){try{return C(A),w.call(this)}catch(t){return Q(t)}}.bind(this),Q);var l=function(){try{return w.call(this)}catch(A){return Q(A)}}.bind(this),y=function(A){try{return console.log(\"FriendlyCaptcha failed to initialize WebAssembly, falling back to Javascript solver: \"+A.toString()),I=1,Promise.resolve(u()).then((function(A){try{return C(A),l()}catch(t){return Q(t)}}),Q)}catch(t){return Q(t)}};try{var D;return I=2,D=WebAssembly.compile(function(A){var t=A.length,e=3*t>>>2;A.charCodeAt(t-1)===r&&e--,A.charCodeAt(t-2)===r&&e--;for(var o=new Uint8Array(e),i=0,g=0;i>4,o[g++]=(15&C)<<4|Q>>2,o[g++]=(3&Q)<<6|63&c}return o}(\"AGFzbQEAAAABKghgAABgAn9/AGADf39/AX9gAX8AYAR/f39/AGAAAX9gAX8Bf2ACf38BfwINAQNlbnYFYWJvcnQABAMMCwcGAwAAAQIFAQIABQMBAAEGFgR/AUEAC38BQQALfwBBAwt/AEHgDAsHbgkGbWVtb3J5AgAHX19hbGxvYwABCF9fcmV0YWluAAIJX19yZWxlYXNlAAMJX19jb2xsZWN0AAQHX19yZXNldAAFC19fcnR0aV9iYXNlAwMNVWludDhBcnJheV9JRAMCDHNvbHZlQmxha2UyYgAKCAELCvQSC5IBAQV/IABB8P///wNLBEAACyMBQRBqIgQgAEEPakFwcSICQRAgAkEQSxsiBmoiAj8AIgVBEHQiA0sEQCAFIAIgA2tB//8DakGAgHxxQRB2IgMgBSADShtAAEEASARAIANAAEEASARAAAsLCyACJAEgBEEQayICIAY2AgAgAkEBNgIEIAIgATYCCCACIAA2AgwgBAsEACAACwMAAQsDAAELBgAjACQBC7sCAQF/AkAgAUUNACAAQQA6AAAgACABakEEayICQQA6AAMgAUECTQ0AIABBADoAASAAQQA6AAIgAkEAOgACIAJBADoAASABQQZNDQAgAEEAOgADIAJBADoAACABQQhNDQAgAEEAIABrQQNxIgJqIgBBADYCACAAIAEgAmtBfHEiAmpBHGsiAUEANgIYIAJBCE0NACAAQQA2AgQgAEEANgIIIAFBADYCECABQQA2AhQgAkEYTQ0AIABBADYCDCAAQQA2AhAgAEEANgIUIABBADYCGCABQQA2AgAgAUEANgIEIAFBADYCCCABQQA2AgwgACAAQQRxQRhqIgFqIQAgAiABayEBA0AgAUEgTwRAIABCADcDACAAQgA3AwggAEIANwMQIABCADcDGCABQSBrIQEgAEEgaiEADAELCwsLcgACfyAARQRAQQxBAhABIQALIAALQQA2AgAgAEEANgIEIABBADYCCCABQfD///8DIAJ2SwRAQcAKQfAKQRJBORAAAAsgASACdCIBQQAQASICIAEQBiAAKAIAGiAAIAI2AgAgACACNgIEIAAgATYCCCAAC88BAQJ/QaABQQAQASIAQQxBAxABQYABQQAQBzYCACAAQQxBBBABQQhBAxAHNgIEIABCADcDCCAAQQA2AhAgAEIANwMYIABCADcDICAAQgA3AyggAEIANwMwIABCADcDOCAAQgA3A0AgAEIANwNIIABCADcDUCAAQgA3A1ggAEIANwNgIABCADcDaCAAQgA3A3AgAEIANwN4IABCADcDgAEgAEIANwOIASAAQgA3A5ABQYABQQUQASIBQYABEAYgACABNgKYASAAQSA2ApwBIAAL2AkCA38SfiAAKAIEIQIgACgCmAEhAwNAIARBgAFIBEAgAyAEaiABIARqKQMANwMAIARBCGohBAwBCwsgAigCBCkDACEMIAIoAgQpAwghDSACKAIEKQMQIQ4gAigCBCkDGCEPIAIoAgQpAyAhBSACKAIEKQMoIQsgAigCBCkDMCEGIAIoAgQpAzghB0KIkvOd/8z5hOoAIQhCu86qptjQ67O7fyEJQqvw0/Sv7ry3PCEQQvHt9Pilp/2npX8hCiAAKQMIQtGFmu/6z5SH0QCFIRFCn9j52cKR2oKbfyESQpSF+aXAyom+YCETQvnC+JuRo7Pw2wAhFEEAIQQDQCAEQcABSARAIAUgCCARIAwgBSADIARBgAhqIgEtAABBA3RqKQMAfHwiBYVCIIoiDHwiCIVCGIoiESAIIAwgBSARIAMgAS0AAUEDdGopAwB8fCIMhUIQiiIIfCIVhUI/iiEFIAsgCSASIA0gCyADIAEtAAJBA3RqKQMAfHwiDYVCIIoiCXwiEYVCGIohCyAGIBAgEyAOIAYgAyABLQAEQQN0aikDAHx8IgaFQiCKIg58IhCFQhiKIhIgECAOIAYgEiADIAEtAAVBA3RqKQMAfHwiDoVCEIoiE3wiEIVCP4ohBiAHIAogFCAPIAcgAyABLQAGQQN0aikDAHx8IgeFQiCKIg98IgqFQhiKIhIgCiAPIAcgEiADIAEtAAdBA3RqKQMAfHwiD4VCEIoiCnwiEoVCP4ohByAQIAogDCARIAkgDSALIAMgAS0AA0EDdGopAwB8fCINhUIQiiIJfCIWIAuFQj+KIgwgAyABLQAIQQN0aikDAHx8IhCFQiCKIgp8IgsgECALIAyFQhiKIhEgAyABLQAJQQN0aikDAHx8IgwgCoVCEIoiFHwiECARhUI/iiELIAYgEiAIIA0gBiADIAEtAApBA3RqKQMAfHwiDYVCIIoiCHwiCoVCGIoiBiANIAYgAyABLQALQQN0aikDAHx8Ig0gCIVCEIoiESAKfCIKhUI/iiEGIAcgFSAJIA4gByADIAEtAAxBA3RqKQMAfHwiDoVCIIoiCHwiCYVCGIoiByAOIAcgAyABLQANQQN0aikDAHx8Ig4gCIVCEIoiEiAJfCIIhUI/iiEHIAUgFiATIA8gBSADIAEtAA5BA3RqKQMAfHwiD4VCIIoiCXwiFYVCGIoiBSAPIAUgAyABLQAPQQN0aikDAHx8Ig8gCYVCEIoiEyAVfCIJhUI/iiEFIARBEGohBAwBCwsgAigCBCACKAIEKQMAIAggDIWFNwMAIAIoAgQgAigCBCkDCCAJIA2FhTcDCCACKAIEIAIoAgQpAxAgDiAQhYU3AxAgAigCBCACKAIEKQMYIAogD4WFNwMYIAIoAgQgAigCBCkDICAFIBGFhTcDICACKAIEIAIoAgQpAyggCyAShYU3AyggAigCBCACKAIEKQMwIAYgE4WFNwMwIAIoAgQgAigCBCkDOCAHIBSFhTcDOCAAIAw3AxggACANNwMgIAAgDjcDKCAAIA83AzAgACAFNwM4IAAgCzcDQCAAIAY3A0ggACAHNwNQIAAgCDcDWCAAIAk3A2AgACAQNwNoIAAgCjcDcCAAIBE3A3ggACASNwOAASAAIBM3A4gBIAAgFDcDkAEL4QIBBH8gACgCCEGAAUcEQEHQCUGACkEeQQUQAAALIAAoAgAhBBAIIgMoAgQhBSADQoABNwMIIAQoAnwiACACaiEGA0AgACAGSQRAIAQgADYCfCADKAIEIgIoAgQgAygCnAGtQoiS95X/zPmE6gCFNwMAIAIoAgRCu86qptjQ67O7fzcDCCACKAIEQqvw0/Sv7ry3PDcDECACKAIEQvHt9Pilp/2npX83AxggAigCBELRhZrv+s+Uh9EANwMgIAIoAgRCn9j52cKR2oKbfzcDKCACKAIEQuv6htq/tfbBHzcDMCACKAIEQvnC+JuRo7Pw2wA3AzggAyAEEAkgBSgCBCkDAKcgAUkEQEEAIAUoAgAiAUEQaygCDCICSwRAQfALQbAMQc0NQQUQAAALQQxBAxABIgAgATYCACAAIAI2AgggACABNgIEIAAPCyAAQQFqIQAMAQsLQQxBAxABQQBBABAHCwwAQaANJABBoA0kAQsL+gQJAEGBCAu/AQECAwQFBgcICQoLDA0ODw4KBAgJDw0GAQwAAgsHBQMLCAwABQIPDQoOAwYHAQkEBwkDAQ0MCw4CBgUKBAAPCAkABQcCBAoPDgELDAYIAw0CDAYKAAsIAwQNBwUPDgEJDAUBDw4NBAoABwYDCQIICw0LBw4MAQMJBQAPBAgGAgoGDw4JCwMACAwCDQcBBAoFCgIIBAcGAQUPCwkOAwwNAAABAgMEBQYHCAkKCwwNDg8OCgQICQ8NBgEMAAILBwUDAEHACQspGgAAAAEAAAABAAAAGgAAAEkAbgB2AGEAbABpAGQAIABpAG4AcAB1AHQAQfAJCzEiAAAAAQAAAAEAAAAiAAAAcwByAGMALwBzAG8AbAB2AGUAcgBXAGEAcwBtAC4AdABzAEGwCgsrHAAAAAEAAAABAAAAHAAAAEkAbgB2AGEAbABpAGQAIABsAGUAbgBnAHQAaABB4AoLNSYAAAABAAAAAQAAACYAAAB+AGwAaQBiAC8AYQByAHIAYQB5AGIAdQBmAGYAZQByAC4AdABzAEGgCws1JgAAAAEAAAABAAAAJgAAAH4AbABpAGIALwBzAHQAYQB0AGkAYwBhAHIAcgBhAHkALgB0AHMAQeALCzMkAAAAAQAAAAEAAAAkAAAASQBuAGQAZQB4ACAAbwB1AHQAIABvAGYAIAByAGEAbgBnAGUAQaAMCzMkAAAAAQAAAAEAAAAkAAAAfgBsAGkAYgAvAHQAeQBwAGUAZABhAHIAcgBhAHkALgB0AHMAQeAMCy4GAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAYQAAAAIAAAAhAgAAAgAAACQC\")),Promise.resolve(D).then((function(A){try{return Promise.resolve(function(A){return new Promise((function(t,r){var n,e,o;return Promise.resolve(function(A){return new Promise((function(t,r){var n,e;return n={env:{abort:function(){throw Error(\"Wasm aborted\")}}},Promise.resolve(WebAssembly.instantiate(A,n)).then((function(A){try{return e=function(A){var t={},r=A.exports,n=r.memory,e=r.__alloc,o=r.__retain,i=r.__rtti_base||-1;return t.__allocArray=function(A,t){var r=function(A){return new Uint32Array(n.buffer)[(i+4>>>2)+2*A]}(A),g=31-Math.clz32(r>>>6&31),I=t.length,C=e(I<>>2]=o(C),c[Q+4>>>2]=C,c[Q+8>>>2]=I<>>g)+f]=o(t[f]);else B.set(t,C>>>g);return Q},t.__getUint8Array=function(A){var t=new Uint32Array(n.buffer),r=t[A+4>>>2];return new Uint8Array(n.buffer,r,t[r-4>>>2]>>>0)},function(A){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=A.__argumentsLength?function(t){A.__argumentsLength.value=t}:A.__setArgumentsLength||A.__setargc||function(){return{}},n=function(n){if(!Object.prototype.hasOwnProperty.call(A,n))return\"continue\";var e=A[n],o=n.split(\".\")[0];\"function\"==typeof e&&e!==r?(t[o]=function(){return r(arguments.length),e.apply(void 0,arguments)}).original=e:t[o]=e};for(var e in A)n(e);return t}(r,t)}(A),t({exports:e})}catch(n){return r(n)}}),r)}))}(A)).then((function(A){try{return e=(n=A).exports.__retain(n.exports.__allocArray(n.exports.Uint8Array_ID,new Uint8Array(128))),o=n.exports.__getUint8Array(e),t((function(A,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4294967295;o.set(A);var i=n.exports.solveBlake2b(e,t,r);o=n.exports.__getUint8Array(e);var g=n.exports.__getUint8Array(i);return n.exports.__release(i),[o,g]}))}catch(i){return r(i)}}),r)}))}(A)).then((function(A){try{return C(A),l()}catch(t){return y(t)}}),y)}catch(t){return y(t)}}),y)}catch(v){y(v)}}catch(v){Q(v)}}))}}()}(\"undefined\"==typeof frcWorker?frcWorker={}:frcWorker);"; // Defensive init to make it easier to integrate with Gatsby and friends. - + // Defensive init to make it easier to integrate with Gatsby and friends. var URL; - if (typeof window !== "undefined") { URL = window.URL || window.webkitURL; } - var WorkerGroup = /*#__PURE__*/function () { function WorkerGroup() { _classCallCheck(this, WorkerGroup); - this.workers = []; this.puzzleNumber = 0; this.numPuzzles = 0; @@ -1022,81 +972,74 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } this.startTime = 0; this.progress = 0; this.totalHashes = 0; - this.puzzleSolverInputs = []; // The index of the next puzzle - + this.puzzleSolverInputs = []; + // The index of the next puzzle this.puzzleIndex = 0; - this.solutionBuffer = new Uint8Array(0); // initialize some value, so ts is happy - + this.solutionBuffer = new Uint8Array(0); + // initialize some value, so ts is happy this.solverType = 1; + this.readyPromise = new Promise(function () {}); this.readyCount = 0; this.startCount = 0; - this.progressCallback = function () { return 0; }; - this.readyCallback = function () { return 0; }; - this.startedCallback = function () { return 0; }; - this.doneCallback = function () { return 0; }; - this.errorCallback = function () { return 0; }; } - - _createClass(WorkerGroup, [{ + return _createClass(WorkerGroup, [{ key: "init", value: function init() { var _this = this; - this.terminateWorkers(); this.progress = 0; this.totalHashes = 0; + var setReady; + this.readyPromise = new Promise(function (resolve) { + return setReady = resolve; + }); this.readyCount = 0; - this.startCount = 0; // Setup four workers for now - later we could calculate this depending on the device - + this.startCount = 0; + // Setup four workers for now - later we could calculate this depending on the device this.workers = new Array(4); var workerBlob = new Blob([workerString], { type: "text/javascript" }); - var _loop = function _loop(_i4) { _this.workers[_i4] = new Worker(URL.createObjectURL(workerBlob)); - _this.workers[_i4].onerror = function (e) { return _this.errorCallback(e); }; - _this.workers[_i4].onmessage = function (e) { var data = e.data; if (!data) return; - if (data.type === "ready") { _this.readyCount++; - _this.solverType = data.solver; // We are ready, when all workers are ready - + _this.solverType = data.solver; + // We are ready, when all workers are ready if (_this.readyCount == _this.workers.length) { + setReady(); _this.readyCallback(); } } else if (data.type === "started") { - _this.startCount++; // We started, when the first worker starts working - + _this.startCount++; + // We started, when the first worker starts working if (_this.startCount == 1) { _this.startTime = Date.now(); - _this.startedCallback(); } } else if (data.type === "done") { if (data.puzzleNumber !== _this.puzzleNumber) return; // solution belongs to a previous puzzle - if (_this.puzzleIndex < _this.puzzleSolverInputs.length) { _this.workers[_i4].postMessage({ type: "start", @@ -1105,26 +1048,20 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } puzzleIndex: _this.puzzleIndex, puzzleNumber: _this.puzzleNumber }); - _this.puzzleIndex++; } - _this.progress++; _this.totalHashes += data.h; - _this.progressCallback({ n: _this.numPuzzles, h: _this.totalHashes, t: (Date.now() - _this.startTime) / 1000, i: _this.progress }); - - _this.solutionBuffer.set(data.solution, data.puzzleIndex * 8); // We are done, when all puzzles have been solved - - + _this.solutionBuffer.set(data.solution, data.puzzleIndex * 8); + // We are done, when all puzzles have been solved if (_this.progress == _this.numPuzzles) { var totalTime = (Date.now() - _this.startTime) / 1000; - _this.doneCallback({ solution: _this.solutionBuffer, h: _this.totalHashes, @@ -1138,7 +1075,6 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } } }; }; - for (var _i4 = 0; _i4 < this.workers.length; _i4++) { _loop(_i4); } @@ -1151,7 +1087,6 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } type: "solver", forceJS: forceJS }; - for (var _i5 = 0; _i5 < this.workers.length; _i5++) { this.workers[_i5].postMessage(msg); } @@ -1159,67 +1094,62 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } }, { key: "start", value: function start(puzzle) { - this.puzzleSolverInputs = getPuzzleSolverInputs(puzzle.buffer, puzzle.n); - this.solutionBuffer = new Uint8Array(8 * puzzle.n); - this.numPuzzles = puzzle.n; - this.threshold = puzzle.threshold; - this.puzzleIndex = 0; - this.puzzleNumber++; - - for (var _i6 = 0; _i6 < this.workers.length; _i6++) { - if (this.puzzleIndex === this.puzzleSolverInputs.length) break; - - this.workers[_i6].postMessage({ - type: "start", - puzzleSolverInput: this.puzzleSolverInputs[_i6], - threshold: this.threshold, - puzzleIndex: this.puzzleIndex, - puzzleNumber: this.puzzleNumber - }); - - this.puzzleIndex++; - } + return new Promise(function ($return, $error) { + return Promise.resolve(this.readyPromise).then(function ($await_11) { + try { + this.puzzleSolverInputs = getPuzzleSolverInputs(puzzle.buffer, puzzle.n); + this.solutionBuffer = new Uint8Array(8 * puzzle.n); + this.numPuzzles = puzzle.n; + this.threshold = puzzle.threshold; + this.puzzleIndex = 0; + this.puzzleNumber++; + for (var _i6 = 0; _i6 < this.workers.length; _i6++) { + if (this.puzzleIndex === this.puzzleSolverInputs.length) break; + this.workers[_i6].postMessage({ + type: "start", + puzzleSolverInput: this.puzzleSolverInputs[_i6], + threshold: this.threshold, + puzzleIndex: this.puzzleIndex, + puzzleNumber: this.puzzleNumber + }); + this.puzzleIndex++; + } + return $return(); + } catch ($boundEx) { + return $error($boundEx); + } + }.bind(this), $error); + }.bind(this)); } }, { key: "terminateWorkers", value: function terminateWorkers() { if (this.workers.length == 0) return; - for (var _i7 = 0; _i7 < this.workers.length; _i7++) { this.workers[_i7].terminate(); } - this.workers = []; } }]); - - return WorkerGroup; }(); - var PUZZLE_ENDPOINT_URL = "https://api.friendlycaptcha.com/api/v1/puzzle"; - var WidgetInstance = /*#__PURE__*/function () { function WidgetInstance(element) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - _classCallCheck(this, WidgetInstance); - this.workerGroup = new WorkerGroup(); /** * The captcha has been succesfully solved. */ - this.valid = false; /** * Some errors may cause a need for the (worker) to be reinitialized. If this is * true `init` will be called again when start is called. */ - this.needsReInit = false; /** * Start() has been called at least once ever. */ - this.hasBeenStarted = false; this.hasBeenDestroyed = false; this.opts = Object.assign({ @@ -1241,38 +1171,32 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } }, sitekey: element.dataset["sitekey"] || "", language: element.dataset["lang"] || "en", - solutionFieldName: element.dataset["solutionFieldName"] || "frc-captcha-solution" + solutionFieldName: element.dataset["solutionFieldName"] || "frc-captcha-solution", + styleNonce: null }, options); this.e = element; this.e.friendlyChallengeWidget = this; - this.loadLanguage(); // @ts-ignore Ignore is required as TS thinks that `this.lang` is not assigned yet, but it happens in `this.loadLanguage()` above. - + this.loadLanguage(); + // @ts-ignore Ignore is required as TS thinks that `this.lang` is not assigned yet, but it happens in `this.loadLanguage()` above. element.innerText = this.lang.text_init; - if (!this.opts.skipStyleInjection) { - injectStyle(); + injectStyle(this.opts.styleNonce); } - this.init(this.opts.startMode === "auto" || this.e.dataset["start"] === "auto"); } - - _createClass(WidgetInstance, [{ + return _createClass(WidgetInstance, [{ key: "init", value: function init(forceStart) { var _this2 = this; - if (this.hasBeenDestroyed) { console.error("FriendlyCaptcha widget has been destroyed using destroy(), it can not be used anymore."); return; } - this.initWorkerGroup(); - if (forceStart) { this.start(); } else if (this.e.dataset["start"] !== "none" && (this.opts.startMode === "focus" || this.e.dataset["start"] === "focus")) { var form = findParentFormElement(this.e); - if (form) { executeOnceOnFocusInEvent(form, function () { return _this2.start(); @@ -1286,7 +1210,6 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } * Loads the configured language, or a language passed to this function. * Note that only the next update will be in the new language, consider calling `reset()` after switching languages. */ - }, { key: "loadLanguage", value: function loadLanguage(lang) { @@ -1295,23 +1218,19 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } } else if (this.e.dataset["lang"]) { this.opts.language = this.e.dataset["lang"]; } - if (typeof this.opts.language === "string") { var langCode = this.opts.language.toLowerCase(); var l = localizations[langCode]; - - if (l === undefined && langCode[2] === '-') { + if (l === undefined && langCode[2] === "-") { // Language has a locale '-' separator, remove it and try again langCode = langCode.substring(0, 2); l = localizations[langCode]; } - if (l === undefined) { - console.error('FriendlyCaptcha: language "' + this.opts.language + '" not found.'); // Fall back to English - + console.error('FriendlyCaptcha: language "' + this.opts.language + '" not found.'); + // Fall back to English l = localizations.en; } - this.lang = l; } else { // We assign to a copy of the English language localization, so that any missing values will be English @@ -1321,14 +1240,11 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } /** * Add a listener to the button that calls `this.start` on click. */ - }, { key: "makeButtonStart", value: function makeButtonStart() { var _this3 = this; - var b = this.e.querySelector("button"); - if (b) { b.addEventListener("click", function (e) { return _this3.start(); @@ -1352,57 +1268,45 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } if (this.expiryTimeout) clearTimeout(this.expiryTimeout); console.error("[FRC]", e); this.e.innerHTML = getErrorHTML(this.opts.solutionFieldName, this.lang, "Background worker error " + e.message); - this.makeButtonStart(); // Just out of precaution - + this.makeButtonStart(); + // Just out of precaution this.opts.forceJSFallback = true; } }, { key: "initWorkerGroup", value: function initWorkerGroup() { var _this4 = this; - this.workerGroup.progressCallback = function (progress) { updateProgressBar(_this4.e, progress); }; - this.workerGroup.readyCallback = function () { _this4.e.innerHTML = getReadyHTML(_this4.opts.solutionFieldName, _this4.lang); - _this4.makeButtonStart(); - _this4.opts.readyCallback(); }; - this.workerGroup.startedCallback = function () { _this4.e.innerHTML = getRunningHTML(_this4.opts.solutionFieldName, _this4.lang); - _this4.opts.startedCallback(); }; - this.workerGroup.doneCallback = function (data) { var solutionPayload = _this4.handleDone(data); - _this4.opts.doneCallback(solutionPayload); - var callback = _this4.e.dataset["callback"]; - if (callback) { window[callback](solutionPayload); } }; - this.workerGroup.errorCallback = function (e) { _this4.onWorkerError(e); }; - this.workerGroup.init(); this.workerGroup.setupSolver(this.opts.forceJSFallback); } }, { key: "expire", value: function expire() { - this.hasBeenStarted = false; // Node.isConnected will be undefined in older browsers - + this.hasBeenStarted = false; + // Node.isConnected will be undefined in older browsers if (this.e.isConnected !== false) { this.e.innerHTML = getExpiredHTML(this.opts.solutionFieldName, this.lang); this.makeButtonStart(); @@ -1413,47 +1317,43 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } value: function start() { return new Promise(function ($return, $error) { var sitekey; - if (this.hasBeenDestroyed) { console.error("Can not start FriendlyCaptcha widget which has been destroyed"); return $return(); } - if (this.hasBeenStarted) { console.warn("Can not start FriendlyCaptcha widget which has already been started"); return $return(); } - sitekey = this.opts.sitekey || this.e.dataset["sitekey"]; - if (!sitekey) { console.error("FriendlyCaptcha: sitekey not set on frc-captcha element"); this.e.innerHTML = getErrorHTML(this.opts.solutionFieldName, this.lang, "Website problem: sitekey not set", false); return $return(); } - if (isHeadless()) { this.e.innerHTML = getErrorHTML(this.opts.solutionFieldName, this.lang, "Browser check failed, try a different browser", false, true); return $return(); } - if (this.needsReInit) { this.needsReInit = false; this.init(true); return $return(); } - this.hasBeenStarted = true; - var $Try_3_Post = function () { try { - this.workerGroup.start(this.puzzle); - return $return(); + return Promise.resolve(this.workerGroup.start(this.puzzle)).then(function ($await_12) { + try { + return $return(); + } catch ($boundEx) { + return $error($boundEx); + } + }, $error); } catch ($boundEx) { return $error($boundEx); } }.bind(this); - var $Try_3_Catch = function (e) { try { { @@ -1471,30 +1371,25 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } }); var callback; callback = this.e.dataset["callback-error"]; - if (callback) { window[callback](this); } - return $return(); } } catch ($boundEx) { return $error($boundEx); } }.bind(this); - try { this.e.innerHTML = getFetchingHTML(this.opts.solutionFieldName, this.lang); - return Promise.resolve(getPuzzle(this.opts.puzzleEndpoint, sitekey, this.lang)).then(function ($await_11) { + return Promise.resolve(getPuzzle(this.opts.puzzleEndpoint, sitekey, this.lang)).then(function ($await_13) { var _this5 = this; - try { - this.puzzle = decodeBase64Puzzle($await_11); + this.puzzle = decodeBase64Puzzle($await_13); if (this.expiryTimeout) clearTimeout(this.expiryTimeout); this.expiryTimeout = setTimeout(function () { return _this5.expire(); }, this.puzzle.expiry - 30000); // 30s grace - return $Try_3_Post(); } catch ($boundEx) { return $Try_3_Catch($boundEx); @@ -1510,14 +1405,13 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } * Here the hidden field gets updated with the solution. * @param data message from the webworker */ - }, { key: "handleDone", value: function handleDone(data) { this.valid = true; var puzzleSolutionMessage = "".concat(this.puzzle.signature, ".").concat(this.puzzle.base64, ".").concat(encode(data.solution), ".").concat(encode(data.diagnostics)); - this.e.innerHTML = getDoneHTML(this.opts.solutionFieldName, this.lang, puzzleSolutionMessage, data); // this.worker = null; // This literally crashes very old browsers.. - + this.e.innerHTML = getDoneHTML(this.opts.solutionFieldName, this.lang, puzzleSolutionMessage, data); + // this.worker = null; // This literally crashes very old browsers.. this.needsReInit = true; return puzzleSolutionMessage; } @@ -1525,7 +1419,6 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } * Cleans up the widget entirely, removing any DOM elements and terminating any background workers. * After it is destroyed it can no longer be used for any purpose. */ - }, { key: "destroy", value: function destroy() { @@ -1533,21 +1426,18 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } this.needsReInit = false; this.hasBeenStarted = false; if (this.expiryTimeout) clearTimeout(this.expiryTimeout); - if (this.e) { - this.e.remove(); // eslint-disable-next-line @typescript-eslint/ban-ts-ignore + this.e.remove(); + // eslint-disable-next-line @typescript-eslint/ban-ts-ignore // @ts-ignore - delete this.e; } - this.hasBeenDestroyed = true; } /** * Resets the widget to the initial state. * This is useful in situations where the page does not refresh when you submit and the form may be re-submitted again */ - }, { key: "reset", value: function reset() { @@ -1555,7 +1445,6 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } console.error("FriendlyCaptcha widget has been destroyed, it can not be used anymore"); return; } - this.workerGroup.terminateWorkers(); this.needsReInit = false; this.hasBeenStarted = false; @@ -1563,31 +1452,23 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } this.init(this.opts.startMode === "auto" || this.e.dataset["start"] === "auto"); } }]); - - return WidgetInstance; }(); - window.friendlyChallenge = { WidgetInstance: WidgetInstance }; - function setup() { var autoWidget = window.friendlyChallenge.autoWidget; var elements = findCaptchaElements(); - for (var index = 0; index < elements.length; index++) { var hElement = elements[index]; - if (hElement && !hElement.dataset["attached"]) { - autoWidget = new WidgetInstance(hElement); // We set the "data-attached" attribute so we don't attach to the same element twice. - + autoWidget = new WidgetInstance(hElement); + // We set the "data-attached" attribute so we don't attach to the same element twice. hElement.dataset["attached"] = "1"; } } - window.friendlyChallenge.autoWidget = autoWidget; } - if (document.readyState !== "loading") { setup(); } else { diff --git a/lam/templates/lib/extra/tabulator/tabulator.js.js b/lam/templates/lib/extra/tabulator/tabulator.js.js index e85d94b1b..3362d20d0 100644 --- a/lam/templates/lib/extra/tabulator/tabulator.js.js +++ b/lam/templates/lib/extra/tabulator/tabulator.js.js @@ -1,4 +1,4 @@ -/* Tabulator v6.2.1 (c) Oliver Folkerd 2024 */ +/* Tabulator v6.2.5 (c) Oliver Folkerd 2024 */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : @@ -1396,6 +1396,9 @@ }); this.contentElement.style.maxWidth = (childWidth - 1) + "px"; + if (this.table.initialized) { + this.element.style.width = childWidth + "px"; + } if(this.parent.isGroup){ this.parent.matchChildWidths();