gina 0.1.6-alpha.7 → 0.1.6-alpha.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README-4Contributors.md +14 -8
- package/README.md +3 -3
- package/bin/cli +13 -0
- package/bin/gina +29 -1
- package/framework/v0.1.6-alpha.70/VERSION +1 -0
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/asset/plugin/README.md +1 -0
- package/framework/v0.1.6-alpha.70/core/asset/plugin/dist/vendor/gina/css/gina.min.css.map +1 -0
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/asset/plugin/dist/vendor/gina/js/gina.js +370 -75
- package/framework/v0.1.6-alpha.70/core/asset/plugin/dist/vendor/gina/js/gina.min.js +775 -0
- package/framework/v0.1.6-alpha.70/core/asset/plugin/dist/vendor/gina/js/gina.min.js.map +8 -0
- package/framework/v0.1.6-alpha.70/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js +8 -0
- package/framework/v0.1.6-alpha.70/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.map +8 -0
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/config.js +116 -33
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/connectors/couchbase/lib/connector.v4.js +28 -22
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/controller/controller.js +357 -42
- package/framework/v0.1.6-alpha.70/core/deps/busboy-1.6.0/.github/workflows/ci.yml +24 -0
- package/framework/v0.1.6-alpha.70/core/deps/busboy-1.6.0/.github/workflows/lint.yml +23 -0
- package/framework/v0.1.6-alpha.70/core/deps/busboy-1.6.0/LICENSE +19 -0
- package/framework/v0.1.6-alpha.70/core/deps/busboy-1.6.0/README.md +191 -0
- package/framework/v0.1.6-alpha.70/core/deps/busboy-1.6.0/bench/bench-multipart-fields-100mb-big.js +149 -0
- package/framework/v0.1.6-alpha.70/core/deps/busboy-1.6.0/bench/bench-multipart-fields-100mb-small.js +143 -0
- package/framework/v0.1.6-alpha.70/core/deps/busboy-1.6.0/bench/bench-multipart-files-100mb-big.js +154 -0
- package/framework/v0.1.6-alpha.70/core/deps/busboy-1.6.0/bench/bench-multipart-files-100mb-small.js +148 -0
- package/framework/v0.1.6-alpha.70/core/deps/busboy-1.6.0/bench/bench-urlencoded-fields-100pairs-small.js +101 -0
- package/framework/v0.1.6-alpha.70/core/deps/busboy-1.6.0/bench/bench-urlencoded-fields-900pairs-small-alt.js +84 -0
- package/framework/v0.1.6-alpha.70/core/deps/busboy-1.6.0/lib/index.js +57 -0
- package/framework/v0.1.6-alpha.70/core/deps/busboy-1.6.0/lib/types/multipart.js +680 -0
- package/framework/v0.1.6-alpha.70/core/deps/busboy-1.6.0/lib/types/urlencoded.js +350 -0
- package/framework/v0.1.6-alpha.70/core/deps/busboy-1.6.0/lib/utils.js +596 -0
- package/framework/v0.1.6-alpha.70/core/deps/busboy-1.6.0/package.json +22 -0
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/gna.js +97 -18
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/model/index.js +28 -24
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/plugins/lib/validator/src/form-validator.js +5 -3
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/plugins/lib/validator/src/main.js +240 -53
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/router.js +75 -40
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/server.isaac.js +34 -8
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/server.js +31 -5
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/boilerplate/bundle/controllers/setup.js +2 -2
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/conf/templates.json +4 -2
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/helpers/context.js +16 -11
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/helpers/path.js +25 -9
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/bundle/add.js +2 -1
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/bundle/start.js +21 -8
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/framework/build.js +1 -1
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/framework/init.js +18 -0
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/framework/link-node-modules.js +2 -3
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/framework/link.js +1 -0
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/framework/tail.js +28 -11
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/framework/version.js +15 -1
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/helper.js +6 -2
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/project/add.js +3 -2
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/project/build.js +4 -4
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/protocol/list.js +71 -50
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/collection/src/main.js +8 -0
- package/framework/v0.1.6-alpha.70/lib/domain/exemples/backend.js +12 -0
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/domain/src/main.js +59 -1
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/merge/package.json +1 -1
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/model.js +1 -1
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/routing/src/main.js +50 -11
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/session-store.js +2 -2
- package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/swig-filters/src/main.js +64 -9
- package/framework/v0.1.6-alpha.70/package.json +12 -0
- package/package.json +2 -2
- package/utils/helper.js +24 -0
- package/framework/v0.1.6-alpha.7/VERSION +0 -1
- package/framework/v0.1.6-alpha.7/core/asset/plugin/dist/vendor/gina/css/gina.min.css.map +0 -1
- package/framework/v0.1.6-alpha.7/core/asset/plugin/dist/vendor/gina/js/gina.min.js +0 -765
- package/framework/v0.1.6-alpha.7/core/asset/plugin/dist/vendor/gina/js/gina.min.js.map +0 -8
- package/framework/v0.1.6-alpha.7/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js +0 -7
- package/framework/v0.1.6-alpha.7/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.map +0 -8
- package/framework/v0.1.6-alpha.7/lib/domain/exemples/backend.js +0 -0
- package/framework/v0.1.6-alpha.7/package.json +0 -14
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/AUTHORS +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/LICENSE +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/asset/html/nolayout.html +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/asset/html/static.html +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/asset/img/android-chrome-192x192.png +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/asset/img/android-chrome-512x512.png +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/asset/img/apple-touch-icon.png +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/asset/img/favicon-16x16.png +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/asset/img/favicon-32x32.png +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/asset/img/favicon.ico +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/asset/plugin/dist/vendor/gina/css/gina.min.css +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/asset/plugin/dist/vendor/gina/html/toolbar.html +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/asset/plugin/uuid.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/connectors/couchbase/index.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/connectors/couchbase/lib/connector.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/connectors/couchbase/lib/connector.v2.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/connectors/couchbase/lib/connector.v3.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/connectors/couchbase/lib/n1ql.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/connectors/couchbase/lib/session-store.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/connectors/couchbase/lib/session-store.v2.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/connectors/couchbase/lib/session-store.v3.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/connectors/couchbase/lib/session-store.v4.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/controller/controller.framework.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/controller/index.js +0 -0
- /package/framework/{v0.1.6-alpha.7/core/deps/busboy → v0.1.6-alpha.70/core/deps/busboy-0.2.14}/.travis.yml +0 -0
- /package/framework/{v0.1.6-alpha.7/core/deps/busboy → v0.1.6-alpha.70/core/deps/busboy-0.2.14}/LICENSE +0 -0
- /package/framework/{v0.1.6-alpha.7/core/deps/busboy → v0.1.6-alpha.70/core/deps/busboy-0.2.14}/README.md +0 -0
- /package/framework/{v0.1.6-alpha.7/core/deps/busboy → v0.1.6-alpha.70/core/deps/busboy-0.2.14}/deps/encoding/encoding-indexes.js +0 -0
- /package/framework/{v0.1.6-alpha.7/core/deps/busboy → v0.1.6-alpha.70/core/deps/busboy-0.2.14}/deps/encoding/encoding.js +0 -0
- /package/framework/{v0.1.6-alpha.7/core/deps/busboy → v0.1.6-alpha.70/core/deps/busboy-0.2.14}/lib/main.js +0 -0
- /package/framework/{v0.1.6-alpha.7/core/deps/busboy → v0.1.6-alpha.70/core/deps/busboy-0.2.14}/lib/types/multipart.js +0 -0
- /package/framework/{v0.1.6-alpha.7/core/deps/busboy → v0.1.6-alpha.70/core/deps/busboy-0.2.14}/lib/types/urlencoded.js +0 -0
- /package/framework/{v0.1.6-alpha.7/core/deps/busboy → v0.1.6-alpha.70/core/deps/busboy-0.2.14}/lib/utils.js +0 -0
- /package/framework/{v0.1.6-alpha.7/core/deps/busboy → v0.1.6-alpha.70/core/deps/busboy-0.2.14}/package.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/deps/swig-client/swig-2.0.0.min.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/dev/index.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/dev/lib/class.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/dev/lib/factory.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/dev/lib/tools.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/locales/README.md +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/locales/currency.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/locales/dist/language/en.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/locales/dist/language/fr.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/locales/dist/region/en.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/locales/dist/region/fr.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/locales/index.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/locales/src/make.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/locales/src/resources/currency.csv +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/locales/src/resources/region.csv +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/locales/src/resources/region.mapping.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/mime.types +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/model/entity.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/model/template/entityFactory.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/model/template/index.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/plugins/README.md +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/plugins/index.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/plugins/lib/file/README.md +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/plugins/lib/file/build.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/plugins/lib/file/package.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/plugins/lib/intl/README.md +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/plugins/lib/intl/build.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/plugins/lib/intl/package.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/plugins/lib/intl/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/plugins/lib/storage/README.md +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/plugins/lib/storage/build.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/plugins/lib/storage/package.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/plugins/lib/storage/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/plugins/lib/validator/README.md +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/plugins/lib/validator/build.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/plugins/lib/validator/package.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/server.express.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/status.codes +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/_gitignore +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/boilerplate/bundle/config/app.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/boilerplate/bundle/config/routing.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/boilerplate/bundle/config/settings.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/boilerplate/bundle/config/settings.server.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/boilerplate/bundle/config/templates.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/boilerplate/bundle/controllers/controller.content.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/boilerplate/bundle/controllers/controller.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/boilerplate/bundle/index.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/boilerplate/bundle_namespace/controllers/controller.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/boilerplate/bundle_public/css/default.css +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/boilerplate/bundle_public/css/vendor/readme.md +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/boilerplate/bundle_public/favicon.ico +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/boilerplate/bundle_public/js/vendor/readme.md +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/boilerplate/bundle_public/readme.md +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/boilerplate/bundle_templates/handlers/main.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/boilerplate/bundle_templates/html/content/homepage.html +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/boilerplate/bundle_templates/html/includes/error-msg-noscript.html +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/boilerplate/bundle_templates/html/includes/error-msg-outdated-browser.html +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/boilerplate/bundle_templates/html/layouts/main.html +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/command/gina.bat.tpl +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/command/gina.tpl +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/conf/env.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/conf/manifest.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/conf/package.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/conf/settings.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/conf/statics.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/error/client/json/401.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/error/client/json/403.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/error/client/json/404.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/error/server/html/50x.html +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/error/server/json/500.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/error/server/json/503.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/template/extensions/logger/config.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/helpers/console.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/helpers/data/LICENSE +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/helpers/data/README.md +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/helpers/data/package.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/helpers/data/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/helpers/dateFormat.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/helpers/index.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/helpers/json/LICENSE +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/helpers/json/README.md +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/helpers/json/package.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/helpers/json/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/helpers/plugins/README.md +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/helpers/plugins/package.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/helpers/plugins/src/api-error.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/helpers/plugins/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/helpers/prototypes.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/helpers/task.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/helpers/text.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/archiver/README.md +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/archiver/build.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/archiver/package.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/archiver/src/dep/jszip.min.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/archiver/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/aliases.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/bundle/arguments.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/bundle/copy.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/bundle/cp.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/bundle/help.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/bundle/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/bundle/list.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/bundle/remove.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/bundle/rename.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/bundle/restart.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/bundle/rm.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/bundle/status.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/bundle/stop.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/env/add.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/env/get.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/env/help.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/env/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/env/link-dev.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/env/list.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/env/remove.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/env/rm.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/env/set.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/env/unset.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/env/use.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/framework/dot.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/framework/get.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/framework/help.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/framework/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/framework/msg.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/framework/open.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/framework/restart.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/framework/set.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/framework/start.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/framework/status.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/framework/stop.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/framework/update.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/gina-dev.1.md +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/gina-framework.1.md +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/gina.1.md +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/index.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/msg.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/port/help.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/port/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/port/inc/scan.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/port/list.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/port/reset.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/port/set.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/project/arguments.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/project/help.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/project/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/project/import.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/project/list.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/project/move.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/project/remove.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/project/rename.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/project/restart.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/project/rm.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/project/start.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/project/status.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/project/stop.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/protocol/help.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/protocol/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/protocol/set.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/scope/add.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/scope/help.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/scope/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/scope/link-local.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/scope/link-production.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/scope/list.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/scope/remove.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/scope/rm.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/scope/use.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cmd/view/add.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/collection/README.md +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/collection/build.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/collection/package.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/config.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cron/README.md +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cron/package.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/cron/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/domain/LICENSE +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/domain/README.md +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/domain/dist/public_suffix_list.dat +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/domain/exemples/frontend.html +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/domain/package.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/generator/index.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/index.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/inherits/LICENSE +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/inherits/README.md +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/inherits/example/inheriting_eventemitter.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/inherits/example/protected_inheritance.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/inherits/example/simple_inheritance.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/inherits/example/super_attribute_overridden_by_child_on_init.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/inherits/package.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/inherits/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/logger/README.md +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/logger/package.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/logger/src/containers/default/index.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/logger/src/containers/file/index.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/logger/src/containers/file/lib/logrotator/README.md +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/logger/src/containers/file/lib/logrotator/index.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/logger/src/containers/mq/index.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/logger/src/containers/mq/listener.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/logger/src/containers/mq/speaker.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/logger/src/helper.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/logger/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/math/index.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/merge/README.md +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/merge/example/merge.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/merge/example/merge_2_literal objects.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/merge/example/merge_and_preserve_first.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/merge/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/proc.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/routing/README.md +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/routing/build.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/routing/package.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/shell.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/swig-filters/README.md +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/swig-filters/package.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/url/README.md +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/url/index.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/url/mocks.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/url/routing.json +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/url/test.js +0 -0
- /package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/lib/validator.js +0 -0
package/framework/{v0.1.6-alpha.7 → v0.1.6-alpha.70}/core/asset/plugin/dist/vendor/gina/js/gina.js
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** vim: et:ts=4:sw=4:sts=4
|
|
2
|
-
* @license RequireJS 2.3.
|
|
2
|
+
* @license RequireJS 2.3.7 Copyright jQuery Foundation and other contributors.
|
|
3
3
|
* Released under MIT license, https://github.com/requirejs/requirejs/blob/master/LICENSE
|
|
4
4
|
*/
|
|
5
5
|
//Not using strict: uneven strict support in browsers, #392, and causes
|
|
@@ -11,7 +11,7 @@ var requirejs, require, define;
|
|
|
11
11
|
(function (global, setTimeout) {
|
|
12
12
|
var req, s, head, baseElement, dataMain, src,
|
|
13
13
|
interactiveScript, currentlyAddingScript, mainScript, subPath,
|
|
14
|
-
version = '2.3.
|
|
14
|
+
version = '2.3.7',
|
|
15
15
|
commentRegExp = /\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/mg,
|
|
16
16
|
cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
|
|
17
17
|
jsSuffixRegExp = /\.js$/,
|
|
@@ -33,7 +33,8 @@ var requirejs, require, define;
|
|
|
33
33
|
contexts = {},
|
|
34
34
|
cfg = {},
|
|
35
35
|
globalDefQueue = [],
|
|
36
|
-
useInteractive = false
|
|
36
|
+
useInteractive = false,
|
|
37
|
+
disallowedProps = ['__proto__', 'constructor'];
|
|
37
38
|
|
|
38
39
|
//Could match something like ')//comment', do not lose the prefix to comment.
|
|
39
40
|
function commentReplace(match, singlePrefix) {
|
|
@@ -94,7 +95,7 @@ var requirejs, require, define;
|
|
|
94
95
|
function eachProp(obj, func) {
|
|
95
96
|
var prop;
|
|
96
97
|
for (prop in obj) {
|
|
97
|
-
if (hasProp(obj, prop)) {
|
|
98
|
+
if (hasProp(obj, prop) && disallowedProps.indexOf(prop) == -1) {
|
|
98
99
|
if (func(obj[prop], prop)) {
|
|
99
100
|
break;
|
|
100
101
|
}
|
|
@@ -5593,6 +5594,13 @@ function Collection(content, options) {
|
|
|
5593
5594
|
|
|
5594
5595
|
|
|
5595
5596
|
if ( typeof(a) == 'string' && a != '' || typeof(b) == 'string' ) {
|
|
5597
|
+
// Fixed on 2025-03-08: allowed to compare with one of the fields being NULL or not defined
|
|
5598
|
+
if ( typeof(a) == 'undefined' || a == null) {
|
|
5599
|
+
a = ''; // cast to string
|
|
5600
|
+
}
|
|
5601
|
+
if ( typeof(b) == 'undefined' || b == null) {
|
|
5602
|
+
b = ''; // cast to string
|
|
5603
|
+
}
|
|
5596
5604
|
|
|
5597
5605
|
if ( typeof(a) == 'number' ) {
|
|
5598
5606
|
a = ''+a; // cast to string
|
|
@@ -5601,6 +5609,7 @@ function Collection(content, options) {
|
|
|
5601
5609
|
b = ''+b; // cast to string
|
|
5602
5610
|
}
|
|
5603
5611
|
|
|
5612
|
+
|
|
5604
5613
|
return a.localeCompare(b, undefined, {sensitivity: 'case', caseFirst: 'upper'})
|
|
5605
5614
|
}
|
|
5606
5615
|
|
|
@@ -6230,11 +6239,12 @@ function FormValidatorUtil(data, $fields, xhrOptions, fieldsSet) {
|
|
|
6230
6239
|
// system error
|
|
6231
6240
|
systemError = result.error;
|
|
6232
6241
|
}
|
|
6233
|
-
// Fixed on 2023-01-10
|
|
6242
|
+
// Fixed added on 2023-01-10
|
|
6234
6243
|
// We want `local.errorLabels['query']` before the generic|user defined `rule` error
|
|
6235
6244
|
var optionError = ( typeof(options['error']) != 'undefined' ) ? options['error'] : null;
|
|
6236
6245
|
errors['query'] = replace(systemError || _this['error'] || optionError || local.errorLabels['query'], _this);
|
|
6237
|
-
|
|
6246
|
+
|
|
6247
|
+
console.debug('[1] query error detected !! ', result, errorFields, errors['query']);
|
|
6238
6248
|
}
|
|
6239
6249
|
|
|
6240
6250
|
if ( !errors['query'] && _this.value == '' ) {
|
|
@@ -6304,6 +6314,7 @@ function FormValidatorUtil(data, $fields, xhrOptions, fieldsSet) {
|
|
|
6304
6314
|
|
|
6305
6315
|
var id = _this.target.id || _this.target.getAttribute('id');
|
|
6306
6316
|
console.debug('prematurely completed event `'+ 'asyncCompleted.' + id +'`');
|
|
6317
|
+
|
|
6307
6318
|
return triggerEvent(gina, _this.target, 'asyncCompleted.' + id, self[_this['name']]);
|
|
6308
6319
|
} // EO onResult
|
|
6309
6320
|
|
|
@@ -6699,7 +6710,7 @@ function FormValidatorUtil(data, $fields, xhrOptions, fieldsSet) {
|
|
|
6699
6710
|
isValid = condition;
|
|
6700
6711
|
} else if (!isValid) {
|
|
6701
6712
|
var re = null, flags = null;
|
|
6702
|
-
// Fixed on 2021-03-13: $variable now replaced with real value beafore validation
|
|
6713
|
+
// Fixed added on 2021-03-13: $variable now replaced with real value beafore validation
|
|
6703
6714
|
if ( /[\!\=>\>\<a-z 0-9]+/i.test(condition) ) {
|
|
6704
6715
|
var variables = condition.match(/\${0}[-_,.\[\]a-z0-9]+/ig); // without space(s)
|
|
6705
6716
|
if (variables && variables.length > 0) {
|
|
@@ -7727,7 +7738,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
7727
7738
|
|
|
7728
7739
|
function Routing() {
|
|
7729
7740
|
|
|
7730
|
-
var isGFFCtx = ((typeof (module) !== 'undefined') && module.exports) ? false :
|
|
7741
|
+
var isGFFCtx = ((typeof (module) !== 'undefined') && module.exports) ? false : true;
|
|
7731
7742
|
var self = {
|
|
7732
7743
|
allowedMethods: ['get', 'post', 'put', 'delete'],
|
|
7733
7744
|
reservedParams: ['controle', 'file','title', 'namespace', 'path'],
|
|
@@ -7782,7 +7793,7 @@ function Routing() {
|
|
|
7782
7793
|
urlProps.hostname = config.hostname;
|
|
7783
7794
|
if ( typeof(bundle) != 'undefined' ) {
|
|
7784
7795
|
// get from webroot
|
|
7785
|
-
_route =
|
|
7796
|
+
_route = this.getRoute('webroot@'+ bundle);
|
|
7786
7797
|
urlProps.hostname = _route.hostname;
|
|
7787
7798
|
urlProps.host = _route.host;
|
|
7788
7799
|
urlProps.webroot = _route.webroot;
|
|
@@ -7883,9 +7894,11 @@ function Routing() {
|
|
|
7883
7894
|
return foundRoute;
|
|
7884
7895
|
}
|
|
7885
7896
|
|
|
7897
|
+
|
|
7886
7898
|
return await parseRouting(params, url, request, response, next);
|
|
7887
7899
|
};
|
|
7888
7900
|
|
|
7901
|
+
|
|
7889
7902
|
/**
|
|
7890
7903
|
* Check if rule has params
|
|
7891
7904
|
*
|
|
@@ -8553,14 +8566,26 @@ function Routing() {
|
|
|
8553
8566
|
* */
|
|
8554
8567
|
self.getRoute = function(rule, params, urlIndex) {
|
|
8555
8568
|
|
|
8556
|
-
var config = null;
|
|
8569
|
+
var config = null, isProxyHost = false;
|
|
8557
8570
|
if (isGFFCtx) {
|
|
8571
|
+
if (
|
|
8572
|
+
!window.location.port
|
|
8573
|
+
&& window.location.hostname == window.gina.config.hostname.replace(/^(https|http|wss|ws)\:\/\//, '').replace(/\:\d+$/, '')
|
|
8574
|
+
) {
|
|
8575
|
+
isProxyHost = true;
|
|
8576
|
+
window.gina.config.hostname = window.gina.config.hostname.replace(/^(https|http|wss|ws)\:\/\//, '').replace(/\:\d+$/, '')
|
|
8577
|
+
}
|
|
8558
8578
|
config = window.gina.config;
|
|
8559
8579
|
} else {
|
|
8580
|
+
|
|
8560
8581
|
config = getContext('gina').config;
|
|
8561
8582
|
if ( typeof(getContext('argvFilename')) != 'undefined' ) {
|
|
8562
8583
|
config.getRouting = getContext('gina').Config.instance.getRouting;
|
|
8563
8584
|
}
|
|
8585
|
+
|
|
8586
|
+
isProxyHost = getContext('isProxyHost');
|
|
8587
|
+
// isProxyHost = ( _isProxyHost && /^true$/i.test(_isProxyHost) ) ? true : (( typeof(process.gina.PROXY_HOSTNAME) != 'undefined' ) ? true : false);
|
|
8588
|
+
|
|
8564
8589
|
}
|
|
8565
8590
|
|
|
8566
8591
|
var env = config.env || GINA_ENV // by default, takes the current bundle
|
|
@@ -8605,6 +8630,13 @@ function Routing() {
|
|
|
8605
8630
|
var msg = null;
|
|
8606
8631
|
route = checkRouteParams(route, params);
|
|
8607
8632
|
|
|
8633
|
+
route.isProxyHost = isProxyHost;
|
|
8634
|
+
if (isProxyHost) {
|
|
8635
|
+
// route.proxy_hostname = (isGFFCtx) ? window.location.protocol +'//'+ window.gina.config.hostname : (process.gina.PROXY_HOSTNAME||config.envConf._proxyHostname);
|
|
8636
|
+
route.proxy_hostname = (isGFFCtx) ? window.location.protocol +'//'+ document.location.hostname : (process.gina.PROXY_HOSTNAME||config.envConf._proxyHostname);
|
|
8637
|
+
route.proxy_host = route.proxy_hostname.replace(/^(https|http)\:\/\//, '');
|
|
8638
|
+
}
|
|
8639
|
+
|
|
8608
8640
|
if ( /\,/.test(route.url) ) {
|
|
8609
8641
|
if ( typeof(route.urlIndex) != 'undefined' ) {
|
|
8610
8642
|
urlIndex = route.urlIndex; // set by checkRouteParams(route, params)
|
|
@@ -8674,11 +8706,23 @@ function Routing() {
|
|
|
8674
8706
|
}
|
|
8675
8707
|
|
|
8676
8708
|
var wroot = this.webroot || urlProps.webroot
|
|
8677
|
-
, hostname = this.hostname || urlProps.hostname
|
|
8678
|
-
, path = this.url
|
|
8709
|
+
, hostname = ''+this.hostname || ''+urlProps.hostname
|
|
8710
|
+
, path = ''+this.url
|
|
8679
8711
|
;
|
|
8712
|
+
if (this.isProxyHost) {
|
|
8713
|
+
hostname = ''+this.proxy_hostname;
|
|
8714
|
+
}
|
|
8715
|
+
|
|
8716
|
+
this.url = (
|
|
8717
|
+
typeof(ignoreWebRoot) != 'undefined'
|
|
8718
|
+
&& /^true$/i.test(ignoreWebRoot)
|
|
8719
|
+
) ? path.replace( new RegExp('^'+ wroot), '/') : path.replace( new RegExp('^('+wroot +'|\/$)'), wroot);
|
|
8720
|
+
|
|
8721
|
+
// this.url = (
|
|
8722
|
+
// typeof(ignoreWebRoot) != 'undefined'
|
|
8723
|
+
// && /^true$/i.test(ignoreWebRoot)
|
|
8724
|
+
// ) ? path.replace( new RegExp('\/'+ wroot), '/') : path;
|
|
8680
8725
|
|
|
8681
|
-
this.url = ( typeof(ignoreWebRoot) != 'undefined' && ignoreWebRoot == true ) ? path.replace(wroot, '/') : path;
|
|
8682
8726
|
|
|
8683
8727
|
return hostname + this.url
|
|
8684
8728
|
};
|
|
@@ -8710,6 +8754,10 @@ function Routing() {
|
|
|
8710
8754
|
, url = ( typeof(ignoreWebRoot) != 'undefined' && ignoreWebRoot == true ) ? path.replace(wroot, '/') : this.url || _this.url
|
|
8711
8755
|
;
|
|
8712
8756
|
|
|
8757
|
+
if ( /^\//.test(url) ) {
|
|
8758
|
+
url = hostname + url;
|
|
8759
|
+
}
|
|
8760
|
+
|
|
8713
8761
|
var scheme = ( /^https/.test(hostname) ) ? 'https' : 'http';
|
|
8714
8762
|
|
|
8715
8763
|
if (isGFFCtx) {
|
|
@@ -8792,6 +8840,7 @@ function Routing() {
|
|
|
8792
8840
|
return route
|
|
8793
8841
|
};
|
|
8794
8842
|
|
|
8843
|
+
// TODO - Remove this : deprecated && not used
|
|
8795
8844
|
var getFormatedRoute = function(route, url, hash) {
|
|
8796
8845
|
// fix url in case of empty param value allowed by the routing rule
|
|
8797
8846
|
// to prevent having a folder.
|
|
@@ -8822,12 +8871,13 @@ function Routing() {
|
|
|
8822
8871
|
/**
|
|
8823
8872
|
* Get route by url
|
|
8824
8873
|
* N.B.: this will only work with rules declared with `GET` method property
|
|
8874
|
+
* ATTENTION !!! Not fully working for frontend because of unresolved promises !!!!
|
|
8825
8875
|
*
|
|
8826
8876
|
* @function getRouteByUrl
|
|
8827
8877
|
*
|
|
8828
8878
|
* @param {string} url e.g.: /webroot/some/url/path or http
|
|
8829
8879
|
* @param {string} [bundle] targeted bundle
|
|
8830
|
-
* @param {string} [method] request method (GET|PUT|PUT|DELETE) - GET is set by default
|
|
8880
|
+
* @param {string} [method] 2nd or 3rd - request method (GET|PUT|PUT|DELETE) - GET is set by default
|
|
8831
8881
|
* @param {object} [request]
|
|
8832
8882
|
* @param {boolean} [isOverridinMethod] // will replace request.method by the provided method - Used for redirections
|
|
8833
8883
|
*
|
|
@@ -8922,6 +8972,9 @@ function Routing() {
|
|
|
8922
8972
|
params: {},
|
|
8923
8973
|
url: url
|
|
8924
8974
|
};
|
|
8975
|
+
if (bundle) {
|
|
8976
|
+
request.bundle = bundle;
|
|
8977
|
+
}
|
|
8925
8978
|
} else {
|
|
8926
8979
|
|
|
8927
8980
|
var gnaCtx = getContext('gina');
|
|
@@ -9009,11 +9062,8 @@ function Routing() {
|
|
|
9009
9062
|
// normal case
|
|
9010
9063
|
//Parsing for the right url.
|
|
9011
9064
|
try {
|
|
9012
|
-
|
|
9013
9065
|
isRoute = self.compareUrls(params, routing[name].url, request);
|
|
9014
|
-
|
|
9015
9066
|
if (isRoute.past) {
|
|
9016
|
-
|
|
9017
9067
|
route = JSON.clone(routing[name]);
|
|
9018
9068
|
route.name = name;
|
|
9019
9069
|
|
|
@@ -9035,7 +9085,7 @@ function Routing() {
|
|
|
9035
9085
|
url == '#'
|
|
9036
9086
|
&& /GET/i.test(method)
|
|
9037
9087
|
&& isMethodProvidedByDefault
|
|
9038
|
-
||
|
|
9088
|
+
|| /^404\:/.test(url)
|
|
9039
9089
|
) {
|
|
9040
9090
|
url = location.pathname;
|
|
9041
9091
|
urlHasChanged = true;
|
|
@@ -10112,6 +10162,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
10112
10162
|
'eventData' : {},
|
|
10113
10163
|
'target' : (isGFFCtx) ? document : null, // by default
|
|
10114
10164
|
'cachedErrors' : {},
|
|
10165
|
+
'lastFocused' : (isGFFCtx) ? [] : null,
|
|
10115
10166
|
'binded' : false,
|
|
10116
10167
|
'unbinded' : false,
|
|
10117
10168
|
'withUserBindings' : false,
|
|
@@ -10393,12 +10444,12 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
10393
10444
|
|
|
10394
10445
|
var refreshWarning = function($el) {
|
|
10395
10446
|
var formId = $el.form.getAttribute('id');
|
|
10396
|
-
if ( /^true$/i.test(instance.$forms[formId].isValidating) ) {
|
|
10397
|
-
return;
|
|
10398
|
-
}
|
|
10399
10447
|
|
|
10400
|
-
|
|
10401
|
-
var $
|
|
10448
|
+
|
|
10449
|
+
var $parent = $el.parentNode
|
|
10450
|
+
, isErrorMessageHidden = false
|
|
10451
|
+
, $children = $parent.getElementsByTagName('div')
|
|
10452
|
+
;
|
|
10402
10453
|
|
|
10403
10454
|
if ( /form\-item\-warning/.test($parent.className) ) {
|
|
10404
10455
|
$parent.className = $parent.className.replace(/form\-item\-warning/, 'form-item-error');
|
|
@@ -10408,6 +10459,14 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
10408
10459
|
isErrorMessageHidden = true;
|
|
10409
10460
|
}
|
|
10410
10461
|
|
|
10462
|
+
// Fixed added on 2025-03-07
|
|
10463
|
+
if (
|
|
10464
|
+
/^true$/i.test(instance.$forms[formId].isValidating)
|
|
10465
|
+
&& !isErrorMessageHidden
|
|
10466
|
+
) {
|
|
10467
|
+
return;
|
|
10468
|
+
}
|
|
10469
|
+
|
|
10411
10470
|
|
|
10412
10471
|
for (var c = 0, cLen = $children.length; c<cLen; ++c) {
|
|
10413
10472
|
if ( /form\-item\-error\-message/.test($children[c].className) ) {
|
|
@@ -10429,7 +10488,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
10429
10488
|
* @param {object} $form - Target (HTMLFormElement)
|
|
10430
10489
|
* @param {object} errors
|
|
10431
10490
|
* @param {object|null} data
|
|
10432
|
-
* @param {
|
|
10491
|
+
* @param {string|null} [fileName]
|
|
10433
10492
|
*/
|
|
10434
10493
|
var liveCheckErrors = {}; // Per Form & Per Element
|
|
10435
10494
|
var handleErrorsDisplay = function($form, errors, data, fieldName) {
|
|
@@ -10460,7 +10519,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
10460
10519
|
if ( typeof(liveCheckErrors[formId]) == 'undefined') {
|
|
10461
10520
|
liveCheckErrors[formId] = {};
|
|
10462
10521
|
}
|
|
10463
|
-
if (errors.count() > 0) {
|
|
10522
|
+
if (errors && errors.count() > 0) {
|
|
10464
10523
|
// reset field name
|
|
10465
10524
|
liveCheckErrors[formId][fieldName] = {};
|
|
10466
10525
|
// override
|
|
@@ -10470,8 +10529,29 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
10470
10529
|
}
|
|
10471
10530
|
errors = liveCheckErrors[formId];
|
|
10472
10531
|
// only if the form has not been sent yet
|
|
10473
|
-
if (
|
|
10532
|
+
if (
|
|
10533
|
+
!instance.$forms[formId].sent
|
|
10534
|
+
||
|
|
10535
|
+
instance.$forms[formId].isValidating
|
|
10536
|
+
) {
|
|
10474
10537
|
isWarning = true;
|
|
10538
|
+
// Fixed on 2025-03-07
|
|
10539
|
+
var lastFocused = instance.$forms[formId].lastFocused;
|
|
10540
|
+
// console.debug('fieldName: '+ fieldName + '\nactiveElement: '+ document.activeElement.getAttribute('name') +'\nlastFocused: ', lastFocused);
|
|
10541
|
+
if (
|
|
10542
|
+
lastFocused.length > 0
|
|
10543
|
+
&& typeof(lastFocused[1]) != 'undefined'
|
|
10544
|
+
&& lastFocused[1].name == fieldName
|
|
10545
|
+
||
|
|
10546
|
+
lastFocused.length > 0
|
|
10547
|
+
&& !lastFocused[1]
|
|
10548
|
+
&& document.activeElement.getAttribute('name') != lastFocused[0].name
|
|
10549
|
+
||
|
|
10550
|
+
document.activeElement.getAttribute('name') != fieldName
|
|
10551
|
+
) {
|
|
10552
|
+
isWarning = false;
|
|
10553
|
+
}
|
|
10554
|
+
// console.debug('isWarning: '+isWarning);
|
|
10475
10555
|
}
|
|
10476
10556
|
} else {
|
|
10477
10557
|
if ( typeof(liveCheckErrors[formId][fieldName]) != 'undefined') {
|
|
@@ -10535,7 +10615,11 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
10535
10615
|
|
|
10536
10616
|
if (!name) continue;
|
|
10537
10617
|
|
|
10538
|
-
if (
|
|
10618
|
+
if (
|
|
10619
|
+
errors
|
|
10620
|
+
&& typeof(errors[name]) != 'undefined'
|
|
10621
|
+
&& !/(form\-item\-error|form\-item\-warning)/.test($parent.className)
|
|
10622
|
+
) {
|
|
10539
10623
|
|
|
10540
10624
|
if (isWarning) {
|
|
10541
10625
|
// adding warning class
|
|
@@ -10576,7 +10660,24 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
10576
10660
|
|
|
10577
10661
|
|
|
10578
10662
|
|
|
10579
|
-
} else if (
|
|
10663
|
+
} else if (
|
|
10664
|
+
errors
|
|
10665
|
+
&& typeof(errors[name]) == 'undefined'
|
|
10666
|
+
&& /(form\-item\-error|form\-item\-warning)/.test($parent.className)
|
|
10667
|
+
||
|
|
10668
|
+
errors
|
|
10669
|
+
&& typeof(errors[name]) != 'undefined' && errors[name].count() == 0
|
|
10670
|
+
&& /(form\-item\-error|form\-item\-warning)/.test($parent.className)
|
|
10671
|
+
) {
|
|
10672
|
+
// Fixed on 2025-03-10
|
|
10673
|
+
// targeted field must be the active element
|
|
10674
|
+
if (
|
|
10675
|
+
document.activeElement.getAttribute('name') != fieldName
|
|
10676
|
+
&& errors.count() > 0
|
|
10677
|
+
) {
|
|
10678
|
+
break
|
|
10679
|
+
}
|
|
10680
|
+
console.debug('[handleErrorsDisplay] Resetting when not in error');
|
|
10580
10681
|
// reset when not in error
|
|
10581
10682
|
// remove child elements
|
|
10582
10683
|
var $children = $parent.getElementsByTagName('div');
|
|
@@ -10590,16 +10691,34 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
10590
10691
|
|
|
10591
10692
|
$parent.className = $parent.className.replace(/(\s+form\-item\-error|form\-item\-error|\s+form\-item\-warning|form\-item\-warning)/, '');
|
|
10592
10693
|
|
|
10593
|
-
} else if (
|
|
10694
|
+
} else if (
|
|
10695
|
+
errors.count() > 0
|
|
10696
|
+
&& typeof(errors[name]) != 'undefined'
|
|
10697
|
+
&& errAttr
|
|
10698
|
+
) {
|
|
10594
10699
|
// refreshing already displayed error on msg update
|
|
10595
10700
|
var $divs = $parent.getElementsByTagName('div');
|
|
10596
10701
|
for (var d = 0, dLen = $divs.length; d<dLen; ++d) {
|
|
10597
|
-
|
|
10702
|
+
// Fixed added on 2025-03-05: className can have more than one !!
|
|
10703
|
+
let foundMessage = $divs[d].className.match("form-item-error-message");
|
|
10704
|
+
if (
|
|
10705
|
+
foundMessage
|
|
10706
|
+
&& typeof(foundMessage.length) != 'undefined'
|
|
10707
|
+
&& foundMessage.length > 0
|
|
10708
|
+
) {
|
|
10598
10709
|
|
|
10599
10710
|
$divs[d].parentElement.removeChild($divs[d]);
|
|
10600
10711
|
$err = document.createElement('div');
|
|
10601
10712
|
$err.setAttribute('class', 'form-item-error-message');
|
|
10602
10713
|
|
|
10714
|
+
// Fixed added on 2025-03-09: className cleanup
|
|
10715
|
+
if (
|
|
10716
|
+
!isWarning
|
|
10717
|
+
&& /(\s+form\-item\-warning|form\-item\-warning)/.test($parent.className)
|
|
10718
|
+
) {
|
|
10719
|
+
$parent.className = $parent.className.replace(/(\s+form\-item\-warning|form\-item\-warning)/, ' form-item-error');
|
|
10720
|
+
}
|
|
10721
|
+
|
|
10603
10722
|
// injecting error messages
|
|
10604
10723
|
// {
|
|
10605
10724
|
// field: {
|
|
@@ -10624,12 +10743,17 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
10624
10743
|
}
|
|
10625
10744
|
}
|
|
10626
10745
|
|
|
10627
|
-
if ($err && $target.type != 'hidden')
|
|
10746
|
+
if ($err && $target.type != 'hidden') {
|
|
10628
10747
|
insertAfter($target, $err);
|
|
10629
|
-
|
|
10748
|
+
}
|
|
10630
10749
|
}
|
|
10631
10750
|
|
|
10632
|
-
if (
|
|
10751
|
+
if (
|
|
10752
|
+
typeof(fieldName) != 'undefined'
|
|
10753
|
+
&& fieldName === $el.name
|
|
10754
|
+
) {
|
|
10755
|
+
break;
|
|
10756
|
+
}
|
|
10633
10757
|
}
|
|
10634
10758
|
|
|
10635
10759
|
|
|
@@ -11260,6 +11384,13 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
11260
11384
|
// } else { // external - need to remove `X-Requested-With` from `options.headers`
|
|
11261
11385
|
result.location = (!/^http/.test(result.location) && !/^\//.test(result.location) ) ? location.protocol +'//' + result.location : result.location;
|
|
11262
11386
|
//}
|
|
11387
|
+
// isProxyHost ?
|
|
11388
|
+
if (
|
|
11389
|
+
result.location.replace(/^http(.*)\:\d+/, '$1').replace(/^\:\/\//, '').split(/\//g)[0] == gina.config.hostname
|
|
11390
|
+
&& gina.config.hostname == window.location.host
|
|
11391
|
+
) {
|
|
11392
|
+
result.location = location.protocol + result.location.replace(/^http(.*)\:\d+/, '$1').replace(/^\:/, '')
|
|
11393
|
+
}
|
|
11263
11394
|
|
|
11264
11395
|
return setTimeout(() => {
|
|
11265
11396
|
window.location.href = result.location;
|
|
@@ -13110,7 +13241,6 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
13110
13241
|
} else {
|
|
13111
13242
|
handleErrorsDisplay(event.target.form, errors, null, event.target.name);
|
|
13112
13243
|
}
|
|
13113
|
-
//return cancelEvent(event);
|
|
13114
13244
|
}
|
|
13115
13245
|
|
|
13116
13246
|
|
|
@@ -13146,7 +13276,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
13146
13276
|
instance.$forms[formId].isValidating = true;
|
|
13147
13277
|
validate($gForm, gFields, $gFields, gRules, function onSilentGlobalLiveValidation(gResult){
|
|
13148
13278
|
instance.$forms[formId].isValidating = false;
|
|
13149
|
-
console.debug('['+ formId +'] onSilentGlobalLiveValidation: '+ gResult.isValid(), gResult);
|
|
13279
|
+
console.debug('['+ formId +'] onSilentGlobalLiveValidation: '+ gResult.isValid(), gResult, gFields);
|
|
13150
13280
|
var isFormValid = gResult.isValid();
|
|
13151
13281
|
if ( envIsDev && isGFFCtx && typeof(window.ginaToolbar) != 'undefined' && window.ginaToolbar ) {
|
|
13152
13282
|
// update toolbar
|
|
@@ -13162,6 +13292,24 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
13162
13292
|
}
|
|
13163
13293
|
|
|
13164
13294
|
|
|
13295
|
+
if ( !isFormValid && gResult.error ) {
|
|
13296
|
+
instance.$forms[ $el.form.getAttribute('id') ].errors = gResult.error;
|
|
13297
|
+
// Fixed on 2025-03-09
|
|
13298
|
+
// for (let eField in gResult.error) {
|
|
13299
|
+
// refreshWarning($gFields[eField]);
|
|
13300
|
+
// // handleErrorsDisplay($gForm, gResult.error, gResult.data, eField);
|
|
13301
|
+
// }
|
|
13302
|
+
}
|
|
13303
|
+
// Fixed on 2025-03-10
|
|
13304
|
+
// Eg.: input select change impacting another element: solve `no more errors`
|
|
13305
|
+
else if (isFormValid) {
|
|
13306
|
+
//resetting error display
|
|
13307
|
+
instance.$forms[ formId ].errors = {};
|
|
13308
|
+
console.debug('resetting field: '+ $el.name);
|
|
13309
|
+
liveCheckErrors[formId] = {};
|
|
13310
|
+
handleErrorsDisplay($gForm, {}, null, $el.name);
|
|
13311
|
+
}
|
|
13312
|
+
|
|
13165
13313
|
updateSubmitTriggerState( $gForm, isFormValid);
|
|
13166
13314
|
|
|
13167
13315
|
once = false;
|
|
@@ -13195,13 +13343,17 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
13195
13343
|
// other inputs & textareas
|
|
13196
13344
|
else if ( /^focusin\./i.test(event.type) ) {
|
|
13197
13345
|
if ( /\-error/.test($el.parentNode.className) ) {
|
|
13198
|
-
console.debug('#1 you just focusin ....'+$el.id, $el.value);
|
|
13346
|
+
console.debug('#1 you just focusin ....'+$el.id, $el.value, instance.$forms[ $el.form.getAttribute('id') ].isValidating);
|
|
13199
13347
|
refreshWarning($el);
|
|
13200
13348
|
}
|
|
13201
13349
|
}
|
|
13202
13350
|
else if ( /^focusout\./i.test(event.type) ) {
|
|
13203
13351
|
if ( /\-warning/.test($el.parentNode.className) ) {
|
|
13204
13352
|
console.debug('#1 you just focusout ....'+$el.id, $el.value);
|
|
13353
|
+
// event.target.form.getAttribute('id');
|
|
13354
|
+
// $el.form.id
|
|
13355
|
+
// $el.form.getAttribute('id')
|
|
13356
|
+
instance.$forms[ $el.form.getAttribute('id') ].isValidating = false;
|
|
13205
13357
|
refreshWarning($el);
|
|
13206
13358
|
// in case error context is changed by another task
|
|
13207
13359
|
handleErrorsDisplay($el.form, instance.$forms[ $el.form.getAttribute('id') ].errors, null, $el.name);
|
|
@@ -13210,12 +13362,30 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
13210
13362
|
else if ( /^keyup\./i.test(event.type) ) {
|
|
13211
13363
|
$el.ginaFormValidatorTestedValue = $el.value;
|
|
13212
13364
|
liveCheckTimer = setTimeout( function onLiveCheckTimer() {
|
|
13213
|
-
//
|
|
13214
|
-
if ( ['91', '17'].indexOf(''+event.keyCode) > -1 && keyboardMapping.count() == 0) {
|
|
13365
|
+
// Do not trigger for copy/paste event
|
|
13366
|
+
if ( ['91', '17', '16'].indexOf(''+event.keyCode) > -1 && keyboardMapping.count() == 0) {
|
|
13215
13367
|
//console.debug('mapping ', keyboardMapping);
|
|
13216
13368
|
return;
|
|
13217
13369
|
}
|
|
13218
|
-
|
|
13370
|
+
|
|
13371
|
+
// Fixed added on 2025-03-05:
|
|
13372
|
+
// Treat TAB as focus in/out
|
|
13373
|
+
if ( ['9'].indexOf(''+event.keyCode) > -1 ) {
|
|
13374
|
+
var $previeousEl = document.getElementById(instance.$forms[ $el.form.getAttribute('id') ].lastFocused[1].id);
|
|
13375
|
+
var errors = instance.$forms[ $previeousEl.form.getAttribute('id') ].errors;
|
|
13376
|
+
var isFormValid = true;
|
|
13377
|
+
console.debug('[TAB] you just focusout from "'+ instance.$forms[ $el.form.getAttribute('id') ].lastFocused[1].id +'" to "'+ $el.id +'"', "errors: ", errors);
|
|
13378
|
+
if (errors && errors.count() > 0 ) {
|
|
13379
|
+
instance.$forms[ $previeousEl.form.getAttribute('id') ].isValidating = false;
|
|
13380
|
+
isFormValid = false;
|
|
13381
|
+
}
|
|
13382
|
+
refreshWarning($previeousEl);
|
|
13383
|
+
// in case error context is changed by another task
|
|
13384
|
+
handleErrorsDisplay($previeousEl.form, errors, null, $previeousEl.name);
|
|
13385
|
+
updateSubmitTriggerState( $el.form, isFormValid);
|
|
13386
|
+
return;
|
|
13387
|
+
}
|
|
13388
|
+
console.debug('[A]['+keyboardMapping.count()+'] keyup ('+ event.keyCode +') .... '+$el.id, $el.value, ' VS ',$el.ginaFormValidatorTestedValue + '(old)');
|
|
13219
13389
|
processEvent();
|
|
13220
13390
|
}, 1000);
|
|
13221
13391
|
}
|
|
@@ -13635,7 +13805,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
13635
13805
|
// submit buttons
|
|
13636
13806
|
$elTMP = $form.target.getElementsByTagName('button');
|
|
13637
13807
|
if ( $elTMP.length > 0 ) {
|
|
13638
|
-
for(let i = 0, len = $elTMP.length; i < len; ++i) {
|
|
13808
|
+
for (let i = 0, len = $elTMP.length; i < len; ++i) {
|
|
13639
13809
|
// if button is != type="submit", you will need to provide : data-gina-form-submit
|
|
13640
13810
|
// TODO - On button binding, you can then provide data-gina-form-action & data-gina-form-method
|
|
13641
13811
|
$els.push($elTMP[i])
|
|
@@ -13645,7 +13815,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
13645
13815
|
// submit links
|
|
13646
13816
|
$elTMP = $form.target.getElementsByTagName('a');
|
|
13647
13817
|
if ( $elTMP.length > 0 ) {
|
|
13648
|
-
for(let i = 0, len = $elTMP.length; i < len; ++i) {
|
|
13818
|
+
for (let i = 0, len = $elTMP.length; i < len; ++i) {
|
|
13649
13819
|
$els.push($elTMP[i])
|
|
13650
13820
|
}
|
|
13651
13821
|
}
|
|
@@ -13701,7 +13871,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
13701
13871
|
// textarea
|
|
13702
13872
|
$elTMP = $form.target.getElementsByTagName('textarea');
|
|
13703
13873
|
if ( $elTMP.length > 0 ) {
|
|
13704
|
-
for(let i = 0, len = $elTMP.length; i < len; ++i) {
|
|
13874
|
+
for (let i = 0, len = $elTMP.length; i < len; ++i) {
|
|
13705
13875
|
$els.push( $elTMP[i] )
|
|
13706
13876
|
}
|
|
13707
13877
|
}
|
|
@@ -13710,7 +13880,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
13710
13880
|
// forms inside main form
|
|
13711
13881
|
$elTMP = $form.target.getElementsByTagName('form');
|
|
13712
13882
|
if ( $elTMP.length > 0 ) {
|
|
13713
|
-
for(let i = 0, len = $elTMP.length; i < len; ++i) {
|
|
13883
|
+
for (let i = 0, len = $elTMP.length; i < len; ++i) {
|
|
13714
13884
|
$els.push( $elTMP[i] )
|
|
13715
13885
|
}
|
|
13716
13886
|
}
|
|
@@ -14519,7 +14689,16 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
14519
14689
|
validate($gForm, gFields, $gFields, gRules, function onSilentGlobalLiveValidation(gResult){
|
|
14520
14690
|
instance.$forms[formId].isValidating = false;
|
|
14521
14691
|
console.debug('[updateSelect]: onSilentGlobalLiveValidation: '+ gResult.isValid(), gResult);
|
|
14692
|
+
// Fixed on 2025-03-09
|
|
14522
14693
|
var isFormValid = gResult.isValid();
|
|
14694
|
+
if (!isFormValid) {
|
|
14695
|
+
instance.$forms[formId].errors = gResult.error;
|
|
14696
|
+
for (let eField in gResult.error) {
|
|
14697
|
+
// refreshWarning($gFields[eField]);
|
|
14698
|
+
handleErrorsDisplay($gForm, gResult.error, gResult.data, eField);
|
|
14699
|
+
}
|
|
14700
|
+
}
|
|
14701
|
+
|
|
14523
14702
|
updateSubmitTriggerState( $gForm, isFormValid);
|
|
14524
14703
|
once = false;
|
|
14525
14704
|
})
|
|
@@ -15042,7 +15221,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
15042
15221
|
) {
|
|
15043
15222
|
return false;
|
|
15044
15223
|
}
|
|
15045
|
-
// Fixed on 2021/06/08 - because of radio reset
|
|
15224
|
+
// Fixed added on 2021/06/08 - because of radio reset
|
|
15046
15225
|
event.preventDefault();
|
|
15047
15226
|
|
|
15048
15227
|
var _evt = $el.id;
|
|
@@ -15113,6 +15292,25 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
15113
15292
|
if (gina.events[_evt]) {
|
|
15114
15293
|
cancelEvent(event);
|
|
15115
15294
|
|
|
15295
|
+
// Fixed added on 2025-03-05 - "last focus" vs "current focus"
|
|
15296
|
+
// To get active element: document.activeElement
|
|
15297
|
+
var formId = event.target.form.getAttribute('id') || event.currentTarget.getAttribute('id');
|
|
15298
|
+
var lastFocused = {
|
|
15299
|
+
id : $el.id,
|
|
15300
|
+
name: $el.name
|
|
15301
|
+
};
|
|
15302
|
+
if (!instance.$forms[formId].lastFocused.length) {
|
|
15303
|
+
instance.$forms[formId].lastFocused[0] = lastFocused;
|
|
15304
|
+
} else {
|
|
15305
|
+
instance.$forms[formId].lastFocused.splice(0,0,lastFocused);
|
|
15306
|
+
}
|
|
15307
|
+
lastFocused = ( typeof(instance.$forms[formId].lastFocused[1]) != 'undefined' ) ? instance.$forms[formId].lastFocused[1].id : null;
|
|
15308
|
+
|
|
15309
|
+
// cleanup
|
|
15310
|
+
instance.$forms[formId].lastFocused.splice(2);
|
|
15311
|
+
|
|
15312
|
+
// console.debug('lastFocused: ', lastFocused, ' VS current: ', $el.id);
|
|
15313
|
+
|
|
15116
15314
|
triggerEvent(gina, $el, _evt, event.detail);
|
|
15117
15315
|
}
|
|
15118
15316
|
});
|
|
@@ -15429,7 +15627,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
15429
15627
|
;
|
|
15430
15628
|
$buttonsTMP = $target.getElementsByTagName('button');
|
|
15431
15629
|
if ( $buttonsTMP.length > 0 ) {
|
|
15432
|
-
for(let b = 0, len = $buttonsTMP.length; b < len; ++b) {
|
|
15630
|
+
for (let b = 0, len = $buttonsTMP.length; b < len; ++b) {
|
|
15433
15631
|
if ($buttonsTMP[b].type == 'submit') {
|
|
15434
15632
|
$buttons.push($buttonsTMP[b])
|
|
15435
15633
|
}
|
|
@@ -15439,7 +15637,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
15439
15637
|
// binding links
|
|
15440
15638
|
$buttonsTMP = $target.getElementsByTagName('a');
|
|
15441
15639
|
if ( $buttonsTMP.length > 0 ) {
|
|
15442
|
-
for(let b = 0, len = $buttonsTMP.length; b < len; ++b) {
|
|
15640
|
+
for (let b = 0, len = $buttonsTMP.length; b < len; ++b) {
|
|
15443
15641
|
if ( $buttonsTMP[b].attributes.getNamedItem('data-gina-form-submit') ) {
|
|
15444
15642
|
$buttons.push($buttonsTMP[b])
|
|
15445
15643
|
} else if (
|
|
@@ -16159,7 +16357,8 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
16159
16357
|
if ( !/^form$/i.test($formOrElement.tagName) ) {
|
|
16160
16358
|
$currentForm = $formOrElement.form;
|
|
16161
16359
|
}
|
|
16162
|
-
var formId
|
|
16360
|
+
var formId = $currentForm.getAttribute('id');
|
|
16361
|
+
var isFormValid = null;
|
|
16163
16362
|
|
|
16164
16363
|
if (
|
|
16165
16364
|
hasParsedAllRules
|
|
@@ -16174,49 +16373,79 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
16174
16373
|
|
|
16175
16374
|
cb._data = d['toData']();
|
|
16176
16375
|
cb._errors = d['getErrors'](field);
|
|
16177
|
-
|
|
16376
|
+
isFormValid = ( cb._errors.count() > 0 ) ? false : true;
|
|
16377
|
+
console.debug('[A] query callback triggered ', cb._errors, 'isFormValid: '+isFormValid, '\nisValidating: '+ instance.$forms[formId].isValidating);
|
|
16178
16378
|
// update instance form errors
|
|
16179
|
-
if ( cb._errors
|
|
16379
|
+
if ( cb._errors /**&& cb._errors.count() > 0*/) {
|
|
16180
16380
|
if ( typeof(instance.$forms[formId].errors) == 'undefined' ) {
|
|
16181
16381
|
instance.$forms[formId].errors = {}
|
|
16182
16382
|
}
|
|
16183
16383
|
|
|
16184
16384
|
instance.$forms[formId].errors[field] = cb._errors[field];
|
|
16185
16385
|
|
|
16186
|
-
if (!isFormValid && /^true|false$/i.test(instance.$forms[formId].isValidating) || d[field].target.value != '' ) {
|
|
16187
|
-
|
|
16188
|
-
|
|
16189
|
-
|
|
16190
|
-
|
|
16386
|
+
// if (!isFormValid && /^true|false$/i.test(instance.$forms[formId].isValidating) || d[field].target.value != '' ) {
|
|
16387
|
+
// if ( typeof($allFields[field]._cancelled) == 'undefined' ) {
|
|
16388
|
+
// refreshWarning($allFields[field]);
|
|
16389
|
+
// }
|
|
16390
|
+
// handleErrorsDisplay($currentForm, cb._errors, cb._data, field);
|
|
16391
|
+
// updateSubmitTriggerState( $currentForm, isFormValid);
|
|
16392
|
+
// }
|
|
16191
16393
|
|
|
16192
|
-
if ( envIsDev && isGFFCtx && typeof(window.ginaToolbar) != 'undefined' && window.ginaToolbar ) {
|
|
16193
|
-
|
|
16194
|
-
|
|
16195
|
-
|
|
16394
|
+
// if ( envIsDev && isGFFCtx && typeof(window.ginaToolbar) != 'undefined' && window.ginaToolbar ) {
|
|
16395
|
+
// // update toolbar
|
|
16396
|
+
// if (!gina.forms.errors)
|
|
16397
|
+
// gina.forms.errors = {};
|
|
16196
16398
|
|
|
16197
|
-
|
|
16198
|
-
|
|
16199
|
-
|
|
16200
|
-
|
|
16399
|
+
// var objCallback = {
|
|
16400
|
+
// id : formId,
|
|
16401
|
+
// errors : instance.$forms[formId].errors || {}
|
|
16402
|
+
// };
|
|
16201
16403
|
|
|
16202
|
-
|
|
16203
|
-
}
|
|
16404
|
+
// window.ginaToolbar.update('forms', objCallback);
|
|
16405
|
+
// }
|
|
16204
16406
|
|
|
16205
16407
|
|
|
16206
|
-
triggerEvent(gina, $currentForm, 'validated.' + formId, cb);
|
|
16207
|
-
return;
|
|
16408
|
+
// triggerEvent(gina, $currentForm, 'validated.' + formId, cb);
|
|
16409
|
+
// return;
|
|
16410
|
+
}
|
|
16411
|
+
// Fixed on 2025-03-06
|
|
16412
|
+
if (!isFormValid && /^true|false$/i.test(instance.$forms[formId].isValidating) || d[field].target.value != '' ) {
|
|
16413
|
+
console.debug('[A] Refreshing warning/error on field '+ field);
|
|
16414
|
+
// if ( typeof($allFields[field]._cancelled) == 'undefined' ) {
|
|
16415
|
+
refreshWarning($allFields[field]);
|
|
16416
|
+
// }
|
|
16417
|
+
handleErrorsDisplay($currentForm, cb._errors, cb._data, field);
|
|
16418
|
+
updateSubmitTriggerState( $currentForm, isFormValid);
|
|
16419
|
+
}
|
|
16420
|
+
|
|
16421
|
+
if ( envIsDev && isGFFCtx && typeof(window.ginaToolbar) != 'undefined' && window.ginaToolbar ) {
|
|
16422
|
+
// update toolbar
|
|
16423
|
+
if (!gina.forms.errors)
|
|
16424
|
+
gina.forms.errors = {};
|
|
16425
|
+
|
|
16426
|
+
var objCallback = {
|
|
16427
|
+
id : formId,
|
|
16428
|
+
errors : instance.$forms[formId].errors || {}
|
|
16429
|
+
};
|
|
16430
|
+
|
|
16431
|
+
window.ginaToolbar.update('forms', objCallback);
|
|
16208
16432
|
}
|
|
16433
|
+
|
|
16434
|
+
|
|
16435
|
+
triggerEvent(gina, $currentForm, 'validated.' + formId, cb);
|
|
16436
|
+
return;
|
|
16209
16437
|
}
|
|
16210
16438
|
|
|
16211
16439
|
// is this the last or the only field to be validated ?
|
|
16212
|
-
var needsGlobalReValidation = false
|
|
16440
|
+
var needsGlobalReValidation = false;
|
|
16213
16441
|
if ( listedFields.length == 1 || listedFields[listedFields.length-1] == field) {
|
|
16214
16442
|
// trigger end of validation
|
|
16215
16443
|
// console.debug(field +' is the last element to be validated for formId: '+ formId, cb._errors, instance.$forms[formId].errors);
|
|
16216
16444
|
isFormValid = ( cb._errors.count() > 0 ) ? false : true;
|
|
16217
16445
|
if (!isFormValid && /^true|false$/i.test(instance.$forms[formId].isValidating)) {
|
|
16218
|
-
|
|
16446
|
+
console.debug('[1] Should update error display now ', cb._errors);
|
|
16219
16447
|
instance.$forms[formId].errors = merge(cb._errors, instance.$forms[formId].errors);
|
|
16448
|
+
console.debug('[2] Should update error display now ', instance.$forms[formId].errors);
|
|
16220
16449
|
refreshWarning($allFields[field]);
|
|
16221
16450
|
handleErrorsDisplay($currentForm, cb._errors, cb._data, field);
|
|
16222
16451
|
updateSubmitTriggerState( $currentForm, isFormValid);
|
|
@@ -16392,7 +16621,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
16392
16621
|
|
|
16393
16622
|
for (var c in rules) {
|
|
16394
16623
|
if (!/^\_case\_/.test(c) ) continue;
|
|
16395
|
-
if ( typeof(rules[c].conditions) == 'undefined' ||
|
|
16624
|
+
if ( typeof(rules[c].conditions) == 'undefined' || Array.isArray(rules[c].conditions) && !rules[c].conditions.length ) continue;
|
|
16396
16625
|
if ( typeof(rules[c].conditions[0].rules) == 'undefined' ) continue;
|
|
16397
16626
|
|
|
16398
16627
|
|
|
@@ -16574,7 +16803,14 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
16574
16803
|
// filtering conditions
|
|
16575
16804
|
for (var _c = 0, _cLen = rules[c].conditions.length; _c < _cLen; ++_c) {
|
|
16576
16805
|
|
|
16577
|
-
if (
|
|
16806
|
+
if (
|
|
16807
|
+
Array.isArray(rules[c].conditions[_c].case)
|
|
16808
|
+
&& rules[c].conditions[_c].case.indexOf(caseValue) == -1
|
|
16809
|
+
||
|
|
16810
|
+
!Array.isArray(rules[c].conditions[_c].case)
|
|
16811
|
+
&& rules[c].conditions[_c].case != caseValue
|
|
16812
|
+
|
|
16813
|
+
) {
|
|
16578
16814
|
continue;
|
|
16579
16815
|
}
|
|
16580
16816
|
|
|
@@ -16719,7 +16955,8 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
16719
16955
|
if (
|
|
16720
16956
|
conditions[c]['case'] === caseValue
|
|
16721
16957
|
||
|
|
16722
|
-
Array.isArray(conditions[c]['case'])
|
|
16958
|
+
Array.isArray(conditions[c]['case'])
|
|
16959
|
+
&& conditions[c]['case'].indexOf(caseValue) > -1
|
|
16723
16960
|
||
|
|
16724
16961
|
/^\//.test(conditions[c]['case'])
|
|
16725
16962
|
) {
|
|
@@ -18643,11 +18880,11 @@ define('gina', [ 'require', 'vendor/uuid', 'lib/merge', 'utils/events', 'helpers
|
|
|
18643
18880
|
return construct
|
|
18644
18881
|
});
|
|
18645
18882
|
/*!
|
|
18646
|
-
* Engine.IO v6.
|
|
18647
|
-
* (c) 2014-
|
|
18883
|
+
* Engine.IO v6.6.2
|
|
18884
|
+
* (c) 2014-2024 Guillermo Rauch
|
|
18648
18885
|
* Released under the MIT License.
|
|
18649
18886
|
*/
|
|
18650
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define('vendor/engine.io',e):(t="undefined"!=typeof globalThis?globalThis:t||self).eio=e()}(this,(function(){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function n(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}function o(){return o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},o.apply(this,arguments)}function i(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}}),e&&a(t,e)}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}function u(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function c(t,e,r){return c=u()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&a(o,r.prototype),o},c.apply(null,arguments)}function p(t){var e="function"==typeof Map?new Map:void 0;return p=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return c(t,arguments,s(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),a(n,t)},p(t)}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function l(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?h(t):e}function f(t){var e=u();return function(){var r,n=s(t);if(e){var o=s(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return l(this,r)}}function d(t,e,r){return d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=s(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(r):o.value}},d(t,e,r||t)}var y=Object.create(null);y.open="0",y.close="1",y.ping="2",y.pong="3",y.message="4",y.upgrade="5",y.noop="6";var v=Object.create(null);Object.keys(y).forEach((function(t){v[y[t]]=t}));for(var m={type:"error",data:"parser error"},g="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),b="function"==typeof ArrayBuffer,k=function(t,e,r){var n,o=t.type,i=t.data;return g&&i instanceof Blob?e?r(i):w(i,r):b&&(i instanceof ArrayBuffer||(n=i,"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer))?e?r(i):w(new Blob([i]),r):r(y[o]+(i||""))},w=function(t,e){var r=new FileReader;return r.onload=function(){var t=r.result.split(",")[1];e("b"+t)},r.readAsDataURL(t)},T="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S="undefined"==typeof Uint8Array?[]:new Uint8Array(256),R=0;R<T.length;R++)S[T.charCodeAt(R)]=R;var x="function"==typeof ArrayBuffer,O=function(t,e){if("string"!=typeof t)return{type:"message",data:P(t,e)};var r=t.charAt(0);return"b"===r?{type:"message",data:E(t.substring(1),e)}:v[r]?t.length>1?{type:v[r],data:t.substring(1)}:{type:v[r]}:m},E=function(t,e){if(x){var r=function(t){var e,r,n,o,i,s=.75*t.length,a=t.length,u=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var c=new ArrayBuffer(s),p=new Uint8Array(c);for(e=0;e<a;e+=4)r=S[t.charCodeAt(e)],n=S[t.charCodeAt(e+1)],o=S[t.charCodeAt(e+2)],i=S[t.charCodeAt(e+3)],p[u++]=r<<2|n>>4,p[u++]=(15&n)<<4|o>>2,p[u++]=(3&o)<<6|63&i;return c}(t);return P(r,e)}return{base64:!0,data:t}},P=function(t,e){return"blob"===e&&t instanceof ArrayBuffer?new Blob([t]):t},B=String.fromCharCode(30);function C(t){if(t)return function(t){for(var e in C.prototype)t[e]=C.prototype[e];return t}(t)}C.prototype.on=C.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},C.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this},C.prototype.off=C.prototype.removeListener=C.prototype.removeAllListeners=C.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<n.length;o++)if((r=n[o])===e||r.fn===e){n.splice(o,1);break}return 0===n.length&&delete this._callbacks["$"+t],this},C.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){n=0;for(var o=(r=r.slice(0)).length;n<o;++n)r[n].apply(this,e)}return this},C.prototype.emitReserved=C.prototype.emit,C.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},C.prototype.hasListeners=function(t){return!!this.listeners(t).length};var L="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function q(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return r.reduce((function(e,r){return t.hasOwnProperty(r)&&(e[r]=t[r]),e}),{})}var A=setTimeout,j=clearTimeout;function _(t,e){e.useNativeTimers?(t.setTimeoutFn=A.bind(L),t.clearTimeoutFn=j.bind(L)):(t.setTimeoutFn=setTimeout.bind(L),t.clearTimeoutFn=clearTimeout.bind(L))}var U,H=function(t){i(n,t);var r=f(n);function n(t,o,i){var s;return e(this,n),(s=r.call(this,t)).description=o,s.context=i,s.type="TransportError",s}return n}(p(Error)),F=function(t){i(o,t);var r=f(o);function o(t){var n;return e(this,o),(n=r.call(this)).writable=!1,_(h(n),t),n.opts=t,n.query=t.query,n.readyState="",n.socket=t.socket,n}return n(o,[{key:"onError",value:function(t,e,r){return d(s(o.prototype),"emitReserved",this).call(this,"error",new H(t,e,r)),this}},{key:"open",value:function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this}},{key:"close",value:function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}},{key:"send",value:function(t){"open"===this.readyState&&this.write(t)}},{key:"onOpen",value:function(){this.readyState="open",this.writable=!0,d(s(o.prototype),"emitReserved",this).call(this,"open")}},{key:"onData",value:function(t){var e=O(t,this.socket.binaryType);this.onPacket(e)}},{key:"onPacket",value:function(t){d(s(o.prototype),"emitReserved",this).call(this,"packet",t)}},{key:"onClose",value:function(t){this.readyState="closed",d(s(o.prototype),"emitReserved",this).call(this,"close",t)}}]),o}(C),D="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),M={},I=0,W=0;function N(t){var e="";do{e=D[t%64]+e,t=Math.floor(t/64)}while(t>0);return e}function X(){var t=N(+new Date);return t!==U?(I=0,U=t):t+"."+N(I++)}for(;W<64;W++)M[D[W]]=W;function $(t){var e="";for(var r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function z(t){for(var e={},r=t.split("&"),n=0,o=r.length;n<o;n++){var i=r[n].split("=");e[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return e}var V=!1;try{V="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}var G=V;function J(t){var e=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!e||G))return new XMLHttpRequest}catch(t){}if(!e)try{return new(L[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}function K(){}var Q=null!=new J({xdomain:!1}).responseType,Y=function(t){i(s,t);var r=f(s);function s(t){var n;if(e(this,s),(n=r.call(this,t)).polling=!1,"undefined"!=typeof location){var o="https:"===location.protocol,i=location.port;i||(i=o?"443":"80"),n.xd="undefined"!=typeof location&&t.hostname!==location.hostname||i!==t.port,n.xs=t.secure!==o}var a=t&&t.forceBase64;return n.supportsBinary=Q&&!a,n}return n(s,[{key:"doOpen",value:function(){this.poll()}},{key:"pause",value:function(t){var e=this;this.readyState="pausing";var r=function(){e.readyState="paused",t()};if(this.polling||!this.writable){var n=0;this.polling&&(n++,this.once("pollComplete",(function(){--n||r()}))),this.writable||(n++,this.once("drain",(function(){--n||r()})))}else r()}},{key:"poll",value:function(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}},{key:"onData",value:function(t){var e=this;(function(t,e){for(var r=t.split(B),n=[],o=0;o<r.length;o++){var i=O(r[o],e);if(n.push(i),"error"===i.type)break}return n})(t,this.socket.binaryType).forEach((function(t){if("opening"===e.readyState&&"open"===t.type&&e.onOpen(),"close"===t.type)return e.onClose({description:"transport closed by the server"}),!1;e.onPacket(t)})),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.poll())}},{key:"doClose",value:function(){var t=this,e=function(){t.write([{type:"close"}])};"open"===this.readyState?e():this.once("open",e)}},{key:"write",value:function(t){var e=this;this.writable=!1,function(t,e){var r=t.length,n=new Array(r),o=0;t.forEach((function(t,i){k(t,!1,(function(t){n[i]=t,++o===r&&e(n.join(B))}))}))}(t,(function(t){e.doWrite(t,(function(){e.writable=!0,e.emitReserved("drain")}))}))}},{key:"uri",value:function(){var t=this.query||{},e=this.opts.secure?"https":"http",r="";!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=X()),this.supportsBinary||t.sid||(t.b64=1),this.opts.port&&("https"===e&&443!==Number(this.opts.port)||"http"===e&&80!==Number(this.opts.port))&&(r=":"+this.opts.port);var n=$(t);return e+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(n.length?"?"+n:"")}},{key:"request",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(t,{xd:this.xd,xs:this.xs},this.opts),new Z(this.uri(),t)}},{key:"doWrite",value:function(t,e){var r=this,n=this.request({method:"POST",data:t});n.on("success",e),n.on("error",(function(t,e){r.onError("xhr post error",t,e)}))}},{key:"doPoll",value:function(){var t=this,e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(function(e,r){t.onError("xhr poll error",e,r)})),this.pollXhr=e}},{key:"name",get:function(){return"polling"}}]),s}(F),Z=function(t){i(o,t);var r=f(o);function o(t,n){var i;return e(this,o),_(h(i=r.call(this)),n),i.opts=n,i.method=n.method||"GET",i.uri=t,i.async=!1!==n.async,i.data=void 0!==n.data?n.data:null,i.create(),i}return n(o,[{key:"create",value:function(){var t=this,e=q(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd,e.xscheme=!!this.opts.xs;var r=this.xhr=new J(e);try{r.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders)for(var n in r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0),this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(n)&&r.setRequestHeader(n,this.opts.extraHeaders[n])}catch(t){}if("POST"===this.method)try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{r.setRequestHeader("Accept","*/*")}catch(t){}"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=function(){4===r.readyState&&(200===r.status||1223===r.status?t.onLoad():t.setTimeoutFn((function(){t.onError("number"==typeof r.status?r.status:0)}),0))},r.send(this.data)}catch(e){return void this.setTimeoutFn((function(){t.onError(e)}),0)}"undefined"!=typeof document&&(this.index=o.requestsCount++,o.requests[this.index]=this)}},{key:"onError",value:function(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}},{key:"cleanup",value:function(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=K,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete o.requests[this.index],this.xhr=null}}},{key:"onLoad",value:function(){var t=this.xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}},{key:"abort",value:function(){this.cleanup()}}]),o}(C);if(Z.requestsCount=0,Z.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",tt);else if("function"==typeof addEventListener){addEventListener("onpagehide"in L?"pagehide":"unload",tt,!1)}function tt(){for(var t in Z.requests)Z.requests.hasOwnProperty(t)&&Z.requests[t].abort()}var et="function"==typeof Promise&&"function"==typeof Promise.resolve?function(t){return Promise.resolve().then(t)}:function(t,e){return e(t,0)},rt=L.WebSocket||L.MozWebSocket,nt="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),ot=function(t){i(o,t);var r=f(o);function o(t){var n;return e(this,o),(n=r.call(this,t)).supportsBinary=!t.forceBase64,n}return n(o,[{key:"doOpen",value:function(){if(this.check()){var t=this.uri(),e=this.opts.protocols,r=nt?{}:q(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=nt?new rt(t,e,r):e?new rt(t,e):new rt(t)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType||"arraybuffer",this.addEventListeners()}}},{key:"addEventListeners",value:function(){var t=this;this.ws.onopen=function(){t.opts.autoUnref&&t.ws._socket.unref(),t.onOpen()},this.ws.onclose=function(e){return t.onClose({description:"websocket connection closed",context:e})},this.ws.onmessage=function(e){return t.onData(e.data)},this.ws.onerror=function(e){return t.onError("websocket error",e)}}},{key:"write",value:function(t){var e=this;this.writable=!1;for(var r=function(r){var n=t[r],o=r===t.length-1;k(n,e.supportsBinary,(function(t){try{e.ws.send(t)}catch(t){}o&&et((function(){e.writable=!0,e.emitReserved("drain")}),e.setTimeoutFn)}))},n=0;n<t.length;n++)r(n)}},{key:"doClose",value:function(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}},{key:"uri",value:function(){var t=this.query||{},e=this.opts.secure?"wss":"ws",r="";this.opts.port&&("wss"===e&&443!==Number(this.opts.port)||"ws"===e&&80!==Number(this.opts.port))&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=X()),this.supportsBinary||(t.b64=1);var n=$(t);return e+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(n.length?"?"+n:"")}},{key:"check",value:function(){return!!rt}},{key:"name",get:function(){return"websocket"}}]),o}(F),it={websocket:ot,polling:Y},st=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,at=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function ut(t){var e=t,r=t.indexOf("["),n=t.indexOf("]");-1!=r&&-1!=n&&(t=t.substring(0,r)+t.substring(r,n).replace(/:/g,";")+t.substring(n,t.length));for(var o,i,s=st.exec(t||""),a={},u=14;u--;)a[at[u]]=s[u]||"";return-1!=r&&-1!=n&&(a.source=e,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=function(t,e){var r=/\/{2,9}/g,n=e.replace(r,"/").split("/");"/"!=e.substr(0,1)&&0!==e.length||n.splice(0,1);"/"==e.substr(e.length-1,1)&&n.splice(n.length-1,1);return n}(0,a.path),a.queryKey=(o=a.query,i={},o.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,e,r){e&&(i[e]=r)})),i),a}var ct=function(r){i(a,r);var s=f(a);function a(r){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,a),n=s.call(this),r&&"object"===t(r)&&(i=r,r=null),r?(r=ut(r),i.hostname=r.host,i.secure="https"===r.protocol||"wss"===r.protocol,i.port=r.port,r.query&&(i.query=r.query)):i.host&&(i.hostname=ut(i.host).host),_(h(n),i),n.secure=null!=i.secure?i.secure:"undefined"!=typeof location&&"https:"===location.protocol,i.hostname&&!i.port&&(i.port=n.secure?"443":"80"),n.hostname=i.hostname||("undefined"!=typeof location?location.hostname:"localhost"),n.port=i.port||("undefined"!=typeof location&&location.port?location.port:n.secure?"443":"80"),n.transports=i.transports||["polling","websocket"],n.readyState="",n.writeBuffer=[],n.prevBufferLen=0,n.opts=o({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},i),n.opts.path=n.opts.path.replace(/\/$/,"")+"/","string"==typeof n.opts.query&&(n.opts.query=z(n.opts.query)),n.id=null,n.upgrades=null,n.pingInterval=null,n.pingTimeout=null,n.pingTimeoutTimer=null,"function"==typeof addEventListener&&(n.opts.closeOnBeforeunload&&addEventListener("beforeunload",(function(){n.transport&&(n.transport.removeAllListeners(),n.transport.close())}),!1),"localhost"!==n.hostname&&(n.offlineEventListener=function(){n.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",n.offlineEventListener,!1))),n.open(),n}return n(a,[{key:"createTransport",value:function(t){var e=o({},this.opts.query);e.EIO=4,e.transport=t,this.id&&(e.sid=this.id);var r=o({},this.opts.transportOptions[t],this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new it[t](r)}},{key:"open",value:function(){var t,e=this;if(this.opts.rememberUpgrade&&a.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((function(){e.emitReserved("error","No transports available")}),0);t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)}},{key:"setTransport",value:function(t){var e=this;this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(function(t){return e.onClose("transport close",t)}))}},{key:"probe",value:function(t){var e=this,r=this.createTransport(t),n=!1;a.priorWebsocketSuccess=!1;var o=function(){n||(r.send([{type:"ping",data:"probe"}]),r.once("packet",(function(t){if(!n)if("pong"===t.type&&"probe"===t.data){if(e.upgrading=!0,e.emitReserved("upgrading",r),!r)return;a.priorWebsocketSuccess="websocket"===r.name,e.transport.pause((function(){n||"closed"!==e.readyState&&(h(),e.setTransport(r),r.send([{type:"upgrade"}]),e.emitReserved("upgrade",r),r=null,e.upgrading=!1,e.flush())}))}else{var o=new Error("probe error");o.transport=r.name,e.emitReserved("upgradeError",o)}})))};function i(){n||(n=!0,h(),r.close(),r=null)}var s=function(t){var n=new Error("probe error: "+t);n.transport=r.name,i(),e.emitReserved("upgradeError",n)};function u(){s("transport closed")}function c(){s("socket closed")}function p(t){r&&t.name!==r.name&&i()}var h=function(){r.removeListener("open",o),r.removeListener("error",s),r.removeListener("close",u),e.off("close",c),e.off("upgrading",p)};r.once("open",o),r.once("error",s),r.once("close",u),this.once("close",c),this.once("upgrading",p),r.open()}},{key:"onOpen",value:function(){if(this.readyState="open",a.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade&&this.transport.pause)for(var t=0,e=this.upgrades.length;t<e;t++)this.probe(this.upgrades[t])}},{key:"onPacket",value:function(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.resetPingTimeout(),this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":var e=new Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}}},{key:"onHandshake",value:function(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}},{key:"resetPingTimeout",value:function(){var t=this;this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn((function(){t.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}},{key:"onDrain",value:function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}},{key:"flush",value:function(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){var t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}},{key:"getWritablePackets",value:function(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;for(var t,e=1,r=0;r<this.writeBuffer.length;r++){var n=this.writeBuffer[r].data;if(n&&(e+="string"==typeof(t=n)?function(t){for(var e=0,r=0,n=0,o=t.length;n<o;n++)(e=t.charCodeAt(n))<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(n++,r+=4);return r}(t):Math.ceil(1.33*(t.byteLength||t.size))),r>0&&e>this.maxPayload)return this.writeBuffer.slice(0,r);e+=2}return this.writeBuffer}},{key:"write",value:function(t,e,r){return this.sendPacket("message",t,e,r),this}},{key:"send",value:function(t,e,r){return this.sendPacket("message",t,e,r),this}},{key:"sendPacket",value:function(t,e,r,n){if("function"==typeof e&&(n=e,e=void 0),"function"==typeof r&&(n=r,r=null),"closing"!==this.readyState&&"closed"!==this.readyState){(r=r||{}).compress=!1!==r.compress;var o={type:t,data:e,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),n&&this.once("flush",n),this.flush()}}},{key:"close",value:function(){var t=this,e=function(){t.onClose("forced close"),t.transport.close()},r=function r(){t.off("upgrade",r),t.off("upgradeError",r),e()},n=function(){t.once("upgrade",r),t.once("upgradeError",r)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(function(){t.upgrading?n():e()})):this.upgrading?n():e()),this}},{key:"onError",value:function(t){a.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}},{key:"onClose",value:function(t,e){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&removeEventListener("offline",this.offlineEventListener,!1),this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)}},{key:"filterUpgrades",value:function(t){for(var e=[],r=0,n=t.length;r<n;r++)~this.transports.indexOf(t[r])&&e.push(t[r]);return e}}]),a}(C);ct.protocol=4;return function(t,e){return new ct(t,e)}}));
|
|
18887
|
+
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define('vendor/engine.io',n):(t="undefined"!=typeof globalThis?globalThis:t||self).eio=n()}(this,(function(){"use strict";function t(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,u(r.key),r)}}function n(n,i,r){return i&&t(n.prototype,i),r&&t(n,r),Object.defineProperty(n,"prototype",{writable:!1}),n}function i(){return i=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var r in i)({}).hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t},i.apply(null,arguments)}function r(t){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},r(t)}function e(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n)}function o(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(o=function(){return!!t})()}function s(t,n){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},s(t,n)}function u(t){var n=function(t,n){if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==typeof n?n:n+""}function f(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}function h(t){var n="function"==typeof Map?new Map:void 0;return h=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(n){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,i)}function i(){return function(t,n,i){if(o())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,n);var e=new(t.bind.apply(t,r));return i&&s(e,i.prototype),e}(t,arguments,r(this).constructor)}return i.prototype=Object.create(t.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),s(i,t)},h(t)}var c=Object.create(null);c.open="0",c.close="1",c.ping="2",c.pong="3",c.message="4",c.upgrade="5",c.noop="6";var a=Object.create(null);Object.keys(c).forEach((function(t){a[c[t]]=t}));var p,l={type:"error",data:"parser error"},v="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),d="function"==typeof ArrayBuffer,y=function(t){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer},b=function(t,n,i){var r=t.type,e=t.data;return v&&e instanceof Blob?n?i(e):g(e,i):d&&(e instanceof ArrayBuffer||y(e))?n?i(e):g(new Blob([e]),i):i(c[r]+(e||""))},g=function(t,n){var i=new FileReader;return i.onload=function(){var t=i.result.split(",")[1];n("b"+(t||""))},i.readAsDataURL(t)};function w(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}for(var m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",k="undefined"==typeof Uint8Array?[]:new Uint8Array(256),A=0;A<64;A++)k[m.charCodeAt(A)]=A;var j,B="function"==typeof ArrayBuffer,E=function(t,n){if("string"!=typeof t)return{type:"message",data:U(t,n)};var i=t.charAt(0);return"b"===i?{type:"message",data:O(t.substring(1),n)}:a[i]?t.length>1?{type:a[i],data:t.substring(1)}:{type:a[i]}:l},O=function(t,n){if(B){var i=function(t){var n,i,r,e,o,s=.75*t.length,u=t.length,f=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var h=new ArrayBuffer(s),c=new Uint8Array(h);for(n=0;n<u;n+=4)i=k[t.charCodeAt(n)],r=k[t.charCodeAt(n+1)],e=k[t.charCodeAt(n+2)],o=k[t.charCodeAt(n+3)],c[f++]=i<<2|r>>4,c[f++]=(15&r)<<4|e>>2,c[f++]=(3&e)<<6|63&o;return h}(t);return U(i,n)}return{base64:!0,data:t}},U=function(t,n){return"blob"===n?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer},T=String.fromCharCode(30);function S(){return new TransformStream({transform:function(t,n){!function(t,n){v&&t.data instanceof Blob?t.data.arrayBuffer().then(w).then(n):d&&(t.data instanceof ArrayBuffer||y(t.data))?n(w(t.data)):b(t,!1,(function(t){p||(p=new TextEncoder),n(p.encode(t))}))}(t,(function(i){var r,e=i.length;if(e<126)r=new Uint8Array(1),new DataView(r.buffer).setUint8(0,e);else if(e<65536){r=new Uint8Array(3);var o=new DataView(r.buffer);o.setUint8(0,126),o.setUint16(1,e)}else{r=new Uint8Array(9);var s=new DataView(r.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(e))}t.data&&"string"!=typeof t.data&&(r[0]|=128),n.enqueue(r),n.enqueue(i)}))}})}function M(t){return t.reduce((function(t,n){return t+n.length}),0)}function x(t,n){if(t[0].length===n)return t.shift();for(var i=new Uint8Array(n),r=0,e=0;e<n;e++)i[e]=t[0][r++],r===t[0].length&&(t.shift(),r=0);return t.length&&r<t[0].length&&(t[0]=t[0].slice(r)),i}function C(t){if(t)return function(t){for(var n in C.prototype)t[n]=C.prototype[n];return t}(t)}C.prototype.on=C.prototype.addEventListener=function(t,n){return this.t=this.t||{},(this.t["$"+t]=this.t["$"+t]||[]).push(n),this},C.prototype.once=function(t,n){function i(){this.off(t,i),n.apply(this,arguments)}return i.fn=n,this.on(t,i),this},C.prototype.off=C.prototype.removeListener=C.prototype.removeAllListeners=C.prototype.removeEventListener=function(t,n){if(this.t=this.t||{},0==arguments.length)return this.t={},this;var i,r=this.t["$"+t];if(!r)return this;if(1==arguments.length)return delete this.t["$"+t],this;for(var e=0;e<r.length;e++)if((i=r[e])===n||i.fn===n){r.splice(e,1);break}return 0===r.length&&delete this.t["$"+t],this},C.prototype.emit=function(t){this.t=this.t||{};for(var n=new Array(arguments.length-1),i=this.t["$"+t],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(i){r=0;for(var e=(i=i.slice(0)).length;r<e;++r)i[r].apply(this,n)}return this},C.prototype.emitReserved=C.prototype.emit,C.prototype.listeners=function(t){return this.t=this.t||{},this.t["$"+t]||[]},C.prototype.hasListeners=function(t){return!!this.listeners(t).length};var L="function"==typeof Promise&&"function"==typeof Promise.resolve?function(t){return Promise.resolve().then(t)}:function(t,n){return n(t,0)},R="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function D(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return i.reduce((function(n,i){return t.hasOwnProperty(i)&&(n[i]=t[i]),n}),{})}var P=R.setTimeout,I=R.clearTimeout;function $(t,n){n.useNativeTimers?(t.setTimeoutFn=P.bind(R),t.clearTimeoutFn=I.bind(R)):(t.setTimeoutFn=R.setTimeout.bind(R),t.clearTimeoutFn=R.clearTimeout.bind(R))}function q(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}var N=function(t){function n(n,i,r){var e;return(e=t.call(this,n)||this).description=i,e.context=r,e.type="TransportError",e}return e(n,t),n}(h(Error)),V=function(t){function n(n){var i;return(i=t.call(this)||this).writable=!1,$(i,n),i.opts=n,i.query=n.query,i.socket=n.socket,i.supportsBinary=!n.forceBase64,i}e(n,t);var i=n.prototype;return i.onError=function(n,i,r){return t.prototype.emitReserved.call(this,"error",new N(n,i,r)),this},i.open=function(){return this.readyState="opening",this.doOpen(),this},i.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},i.send=function(t){"open"===this.readyState&&this.write(t)},i.onOpen=function(){this.readyState="open",this.writable=!0,t.prototype.emitReserved.call(this,"open")},i.onData=function(t){var n=E(t,this.socket.binaryType);this.onPacket(n)},i.onPacket=function(n){t.prototype.emitReserved.call(this,"packet",n)},i.onClose=function(n){this.readyState="closed",t.prototype.emitReserved.call(this,"close",n)},i.pause=function(t){},i.createUri=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t+"://"+this.i()+this.o()+this.opts.path+this.u(n)},i.i=function(){var t=this.opts.hostname;return-1===t.indexOf(":")?t:"["+t+"]"},i.o=function(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""},i.u=function(t){var n=function(t){var n="";for(var i in t)t.hasOwnProperty(i)&&(n.length&&(n+="&"),n+=encodeURIComponent(i)+"="+encodeURIComponent(t[i]));return n}(t);return n.length?"?"+n:""},n}(C),X=function(t){function i(){var n;return(n=t.apply(this,arguments)||this).h=!1,n}e(i,t);var r=i.prototype;return r.doOpen=function(){this.p()},r.pause=function(t){var n=this;this.readyState="pausing";var i=function(){n.readyState="paused",t()};if(this.h||!this.writable){var r=0;this.h&&(r++,this.once("pollComplete",(function(){--r||i()}))),this.writable||(r++,this.once("drain",(function(){--r||i()})))}else i()},r.p=function(){this.h=!0,this.doPoll(),this.emitReserved("poll")},r.onData=function(t){var n=this;(function(t,n){for(var i=t.split(T),r=[],e=0;e<i.length;e++){var o=E(i[e],n);if(r.push(o),"error"===o.type)break}return r})(t,this.socket.binaryType).forEach((function(t){if("opening"===n.readyState&&"open"===t.type&&n.onOpen(),"close"===t.type)return n.onClose({description:"transport closed by the server"}),!1;n.onPacket(t)})),"closed"!==this.readyState&&(this.h=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.p())},r.doClose=function(){var t=this,n=function(){t.write([{type:"close"}])};"open"===this.readyState?n():this.once("open",n)},r.write=function(t){var n=this;this.writable=!1,function(t,n){var i=t.length,r=new Array(i),e=0;t.forEach((function(t,o){b(t,!1,(function(t){r[o]=t,++e===i&&n(r.join(T))}))}))}(t,(function(t){n.doWrite(t,(function(){n.writable=!0,n.emitReserved("drain")}))}))},r.uri=function(){var t=this.opts.secure?"https":"http",n=this.query||{};return!1!==this.opts.timestampRequests&&(n[this.opts.timestampParam]=q()),this.supportsBinary||n.sid||(n.b64=1),this.createUri(t,n)},n(i,[{key:"name",get:function(){return"polling"}}])}(V),H=!1;try{H="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}var F=H;function z(){}var G=function(t){function n(n){var i;if(i=t.call(this,n)||this,"undefined"!=typeof location){var r="https:"===location.protocol,e=location.port;e||(e=r?"443":"80"),i.xd="undefined"!=typeof location&&n.hostname!==location.hostname||e!==n.port}return i}e(n,t);var i=n.prototype;return i.doWrite=function(t,n){var i=this,r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(function(t,n){i.onError("xhr post error",t,n)}))},i.doPoll=function(){var t=this,n=this.request();n.on("data",this.onData.bind(this)),n.on("error",(function(n,i){t.onError("xhr poll error",n,i)})),this.pollXhr=n},n}(X),J=function(t){function n(n,i,r){var e;return(e=t.call(this)||this).createRequest=n,$(e,r),e.l=r,e.v=r.method||"GET",e.m=i,e.k=void 0!==r.data?r.data:null,e.A(),e}e(n,t);var i=n.prototype;return i.A=function(){var t,i=this,r=D(this.l,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this.l.xd;var e=this.j=this.createRequest(r);try{e.open(this.v,this.m,!0);try{if(this.l.extraHeaders)for(var o in e.setDisableHeaderCheck&&e.setDisableHeaderCheck(!0),this.l.extraHeaders)this.l.extraHeaders.hasOwnProperty(o)&&e.setRequestHeader(o,this.l.extraHeaders[o])}catch(t){}if("POST"===this.v)try{e.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{e.setRequestHeader("Accept","*/*")}catch(t){}null===(t=this.l.cookieJar)||void 0===t||t.addCookies(e),"withCredentials"in e&&(e.withCredentials=this.l.withCredentials),this.l.requestTimeout&&(e.timeout=this.l.requestTimeout),e.onreadystatechange=function(){var t;3===e.readyState&&(null===(t=i.l.cookieJar)||void 0===t||t.parseCookies(e.getResponseHeader("set-cookie"))),4===e.readyState&&(200===e.status||1223===e.status?i.B():i.setTimeoutFn((function(){i.O("number"==typeof e.status?e.status:0)}),0))},e.send(this.k)}catch(t){return void this.setTimeoutFn((function(){i.O(t)}),0)}"undefined"!=typeof document&&(this.U=n.requestsCount++,n.requests[this.U]=this)},i.O=function(t){this.emitReserved("error",t,this.j),this.T(!0)},i.T=function(t){if(void 0!==this.j&&null!==this.j){if(this.j.onreadystatechange=z,t)try{this.j.abort()}catch(t){}"undefined"!=typeof document&&delete n.requests[this.U],this.j=null}},i.B=function(){var t=this.j.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this.T())},i.abort=function(){this.T()},n}(C);if(J.requestsCount=0,J.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",W);else if("function"==typeof addEventListener){addEventListener("onpagehide"in R?"pagehide":"unload",W,!1)}function W(){for(var t in J.requests)J.requests.hasOwnProperty(t)&&J.requests[t].abort()}var K,Q=(K=Z({xdomain:!1}))&&null!==K.responseType,Y=function(t){function n(n){var i;i=t.call(this,n)||this;var r=n&&n.forceBase64;return i.supportsBinary=Q&&!r,i}return e(n,t),n.prototype.request=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(t,{xd:this.xd},this.opts),new J(Z,this.uri(),t)},n}(G);function Z(t){var n=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!n||F))return new XMLHttpRequest}catch(t){}if(!n)try{return new(R[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}var _="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),tt=function(t){function i(){return t.apply(this,arguments)||this}e(i,t);var r=i.prototype;return r.doOpen=function(){var t=this.uri(),n=this.opts.protocols,i=_?{}:D(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,i)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()},r.addEventListeners=function(){var t=this;this.ws.onopen=function(){t.opts.autoUnref&&t.ws.S.unref(),t.onOpen()},this.ws.onclose=function(n){return t.onClose({description:"websocket connection closed",context:n})},this.ws.onmessage=function(n){return t.onData(n.data)},this.ws.onerror=function(n){return t.onError("websocket error",n)}},r.write=function(t){var n=this;this.writable=!1;for(var i=function(){var i=t[r],e=r===t.length-1;b(i,n.supportsBinary,(function(t){try{n.doWrite(i,t)}catch(t){}e&&L((function(){n.writable=!0,n.emitReserved("drain")}),n.setTimeoutFn)}))},r=0;r<t.length;r++)i()},r.doClose=function(){void 0!==this.ws&&(this.ws.onerror=function(){},this.ws.close(),this.ws=null)},r.uri=function(){var t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=q()),this.supportsBinary||(n.b64=1),this.createUri(t,n)},n(i,[{key:"name",get:function(){return"websocket"}}])}(V),nt=R.WebSocket||R.MozWebSocket,it=function(t){function n(){return t.apply(this,arguments)||this}e(n,t);var i=n.prototype;return i.createSocket=function(t,n,i){return _?new nt(t,n,i):n?new nt(t,n):new nt(t)},i.doWrite=function(t,n){this.ws.send(n)},n}(tt),rt=function(t){function i(){return t.apply(this,arguments)||this}e(i,t);var r=i.prototype;return r.doOpen=function(){var t=this;try{this.M=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this.M.closed.then((function(){t.onClose()})).catch((function(n){t.onError("webtransport error",n)})),this.M.ready.then((function(){t.M.createBidirectionalStream().then((function(n){var i=function(t,n){j||(j=new TextDecoder);var i=[],r=0,e=-1,o=!1;return new TransformStream({transform:function(s,u){for(i.push(s);;){if(0===r){if(M(i)<1)break;var f=x(i,1);o=!(128&~f[0]),e=127&f[0],r=e<126?3:126===e?1:2}else if(1===r){if(M(i)<2)break;var h=x(i,2);e=new DataView(h.buffer,h.byteOffset,h.length).getUint16(0),r=3}else if(2===r){if(M(i)<8)break;var c=x(i,8),a=new DataView(c.buffer,c.byteOffset,c.length),p=a.getUint32(0);if(p>Math.pow(2,21)-1){u.enqueue(l);break}e=p*Math.pow(2,32)+a.getUint32(4),r=3}else{if(M(i)<e)break;var v=x(i,e);u.enqueue(E(o?v:j.decode(v),n)),r=0}if(0===e||e>t){u.enqueue(l);break}}}})}(Number.MAX_SAFE_INTEGER,t.socket.binaryType),r=n.readable.pipeThrough(i).getReader(),e=S();e.readable.pipeTo(n.writable),t.C=e.writable.getWriter();!function n(){r.read().then((function(i){var r=i.done,e=i.value;r||(t.onPacket(e),n())})).catch((function(t){}))}();var o={type:"open"};t.query.sid&&(o.data='{"sid":"'.concat(t.query.sid,'"}')),t.C.write(o).then((function(){return t.onOpen()}))}))}))},r.write=function(t){var n=this;this.writable=!1;for(var i=function(){var i=t[r],e=r===t.length-1;n.C.write(i).then((function(){e&&L((function(){n.writable=!0,n.emitReserved("drain")}),n.setTimeoutFn)}))},r=0;r<t.length;r++)i()},r.doClose=function(){var t;null===(t=this.M)||void 0===t||t.close()},n(i,[{key:"name",get:function(){return"webtransport"}}])}(V),et={websocket:it,webtransport:rt,polling:Y},ot=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,st=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function ut(t){if(t.length>8e3)throw"URI too long";var n=t,i=t.indexOf("["),r=t.indexOf("]");-1!=i&&-1!=r&&(t=t.substring(0,i)+t.substring(i,r).replace(/:/g,";")+t.substring(r,t.length));for(var e,o,s=ot.exec(t||""),u={},f=14;f--;)u[st[f]]=s[f]||"";return-1!=i&&-1!=r&&(u.source=n,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=function(t,n){var i=/\/{2,9}/g,r=n.replace(i,"/").split("/");"/"!=n.slice(0,1)&&0!==n.length||r.splice(0,1);"/"==n.slice(-1)&&r.splice(r.length-1,1);return r}(0,u.path),u.queryKey=(e=u.query,o={},e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,n,i){n&&(o[n]=i)})),o),u}var ft="function"==typeof addEventListener&&"function"==typeof removeEventListener,ht=[];ft&&addEventListener("offline",(function(){ht.forEach((function(t){return t()}))}),!1);var ct=function(t){function n(n,r){var e;if((e=t.call(this)||this).binaryType="arraybuffer",e.writeBuffer=[],e.L=0,e.R=-1,e.D=-1,e.P=-1,e.I=1/0,n&&"object"===f(n)&&(r=n,n=null),n){var o=ut(n);r.hostname=o.host,r.secure="https"===o.protocol||"wss"===o.protocol,r.port=o.port,o.query&&(r.query=o.query)}else r.host&&(r.hostname=ut(r.host).host);return $(e,r),e.secure=null!=r.secure?r.secure:"undefined"!=typeof location&&"https:"===location.protocol,r.hostname&&!r.port&&(r.port=e.secure?"443":"80"),e.hostname=r.hostname||("undefined"!=typeof location?location.hostname:"localhost"),e.port=r.port||("undefined"!=typeof location&&location.port?location.port:e.secure?"443":"80"),e.transports=[],e.$={},r.transports.forEach((function(t){var n=t.prototype.name;e.transports.push(n),e.$[n]=t})),e.opts=i({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),e.opts.path=e.opts.path.replace(/\/$/,"")+(e.opts.addTrailingSlash?"/":""),"string"==typeof e.opts.query&&(e.opts.query=function(t){for(var n={},i=t.split("&"),r=0,e=i.length;r<e;r++){var o=i[r].split("=");n[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return n}(e.opts.query)),ft&&(e.opts.closeOnBeforeunload&&(e.q=function(){e.transport&&(e.transport.removeAllListeners(),e.transport.close())},addEventListener("beforeunload",e.q,!1)),"localhost"!==e.hostname&&(e.N=function(){e.V("transport close",{description:"network connection lost"})},ht.push(e.N))),e.opts.withCredentials&&(e.X=void 0),e.H(),e}e(n,t);var r=n.prototype;return r.createTransport=function(t){var n=i({},this.opts.query);n.EIO=4,n.transport=t,this.id&&(n.sid=this.id);var r=i({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this.$[t](r)},r.H=function(){var t=this;if(0!==this.transports.length){var i=this.opts.rememberUpgrade&&n.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";var r=this.createTransport(i);r.open(),this.setTransport(r)}else this.setTimeoutFn((function(){t.emitReserved("error","No transports available")}),0)},r.setTransport=function(t){var n=this;this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.F.bind(this)).on("packet",this.G.bind(this)).on("error",this.O.bind(this)).on("close",(function(t){return n.V("transport close",t)}))},r.onOpen=function(){this.readyState="open",n.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()},r.G=function(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.J("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this.W();break;case"error":var n=new Error("server error");n.code=t.data,this.O(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}},r.onHandshake=function(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.R=t.pingInterval,this.D=t.pingTimeout,this.P=t.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.W()},r.W=function(){var t=this;this.clearTimeoutFn(this.K);var n=this.R+this.D;this.I=Date.now()+n,this.K=this.setTimeoutFn((function(){t.V("ping timeout")}),n),this.opts.autoUnref&&this.K.unref()},r.F=function(){this.writeBuffer.splice(0,this.L),this.L=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()},r.flush=function(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){var t=this.Y();this.transport.send(t),this.L=t.length,this.emitReserved("flush")}},r.Y=function(){if(!(this.P&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;for(var t,n=1,i=0;i<this.writeBuffer.length;i++){var r=this.writeBuffer[i].data;if(r&&(n+="string"==typeof(t=r)?function(t){for(var n=0,i=0,r=0,e=t.length;r<e;r++)(n=t.charCodeAt(r))<128?i+=1:n<2048?i+=2:n<55296||n>=57344?i+=3:(r++,i+=4);return i}(t):Math.ceil(1.33*(t.byteLength||t.size))),i>0&&n>this.P)return this.writeBuffer.slice(0,i);n+=2}return this.writeBuffer},r.Z=function(){var t=this;if(!this.I)return!0;var n=Date.now()>this.I;return n&&(this.I=0,L((function(){t.V("ping timeout")}),this.setTimeoutFn)),n},r.write=function(t,n,i){return this.J("message",t,n,i),this},r.send=function(t,n,i){return this.J("message",t,n,i),this},r.J=function(t,n,i,r){if("function"==typeof n&&(r=n,n=void 0),"function"==typeof i&&(r=i,i=null),"closing"!==this.readyState&&"closed"!==this.readyState){(i=i||{}).compress=!1!==i.compress;var e={type:t,data:n,options:i};this.emitReserved("packetCreate",e),this.writeBuffer.push(e),r&&this.once("flush",r),this.flush()}},r.close=function(){var t=this,n=function(){t.V("forced close"),t.transport.close()},i=function i(){t.off("upgrade",i),t.off("upgradeError",i),n()},r=function(){t.once("upgrade",i),t.once("upgradeError",i)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(function(){t.upgrading?r():n()})):this.upgrading?r():n()),this},r.O=function(t){if(n.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this.H();this.emitReserved("error",t),this.V("transport error",t)},r.V=function(t,n){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this.K),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),ft&&(this.q&&removeEventListener("beforeunload",this.q,!1),this.N)){var i=ht.indexOf(this.N);-1!==i&&ht.splice(i,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.L=0}},n}(C);ct.protocol=4;var at=function(t){function n(){var n;return(n=t.apply(this,arguments)||this)._=[],n}e(n,t);var i=n.prototype;return i.onOpen=function(){if(t.prototype.onOpen.call(this),"open"===this.readyState&&this.opts.upgrade)for(var n=0;n<this._.length;n++)this.tt(this._[n])},i.tt=function(t){var n=this,i=this.createTransport(t),r=!1;ct.priorWebsocketSuccess=!1;var e=function(){r||(i.send([{type:"ping",data:"probe"}]),i.once("packet",(function(t){if(!r)if("pong"===t.type&&"probe"===t.data){if(n.upgrading=!0,n.emitReserved("upgrading",i),!i)return;ct.priorWebsocketSuccess="websocket"===i.name,n.transport.pause((function(){r||"closed"!==n.readyState&&(c(),n.setTransport(i),i.send([{type:"upgrade"}]),n.emitReserved("upgrade",i),i=null,n.upgrading=!1,n.flush())}))}else{var e=new Error("probe error");e.transport=i.name,n.emitReserved("upgradeError",e)}})))};function o(){r||(r=!0,c(),i.close(),i=null)}var s=function(t){var r=new Error("probe error: "+t);r.transport=i.name,o(),n.emitReserved("upgradeError",r)};function u(){s("transport closed")}function f(){s("socket closed")}function h(t){i&&t.name!==i.name&&o()}var c=function(){i.removeListener("open",e),i.removeListener("error",s),i.removeListener("close",u),n.off("close",f),n.off("upgrading",h)};i.once("open",e),i.once("error",s),i.once("close",u),this.once("close",f),this.once("upgrading",h),-1!==this._.indexOf("webtransport")&&"webtransport"!==t?this.setTimeoutFn((function(){r||i.open()}),200):i.open()},i.onHandshake=function(n){this._=this.nt(n.upgrades),t.prototype.onHandshake.call(this,n)},i.nt=function(t){for(var n=[],i=0;i<t.length;i++)~this.transports.indexOf(t[i])&&n.push(t[i]);return n},n}(ct),pt=function(t){function n(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r="object"===f(n)?n:i;return(!r.transports||r.transports&&"string"==typeof r.transports[0])&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map((function(t){return et[t]})).filter((function(t){return!!t}))),t.call(this,n,r)||this}return e(n,t),n}(at);return function(t,n){return new pt(t,n)}}));
|
|
18651
18888
|
//# sourceMappingURL=engine.io.min.js.map
|
|
18652
18889
|
;
|
|
18653
18890
|
function BindingHelper(handlerContext) {
|
|
@@ -18749,9 +18986,12 @@ define( 'helpers/binding',[],function() { return BindingHelper });
|
|
|
18749
18986
|
* file that was distributed with this source code.
|
|
18750
18987
|
*/
|
|
18751
18988
|
|
|
18989
|
+
|
|
18752
18990
|
// nodejs dependencies
|
|
18753
18991
|
if ( typeof(module) !== 'undefined' && module.exports) {
|
|
18754
18992
|
var fs = require('fs');
|
|
18993
|
+
var os = require('os');
|
|
18994
|
+
var dns = require('dns');
|
|
18755
18995
|
var execSync = require('child_process').execSync;
|
|
18756
18996
|
var util = require('util');
|
|
18757
18997
|
var promisify = util.promisify;
|
|
@@ -19028,6 +19268,59 @@ function Domain(options, cb) {
|
|
|
19028
19268
|
loadPSL(self.options, cb);
|
|
19029
19269
|
}
|
|
19030
19270
|
|
|
19271
|
+
/**
|
|
19272
|
+
* Usage : await domainInstance.getFQDN()
|
|
19273
|
+
* @param {string} hostname (one that can be resolved)
|
|
19274
|
+
*
|
|
19275
|
+
* @return {string} fqdn
|
|
19276
|
+
*/
|
|
19277
|
+
var getFQDN = async function(hostname) {
|
|
19278
|
+
var host = (
|
|
19279
|
+
typeof(hostname) != 'undefined'
|
|
19280
|
+
&& hostname != ''
|
|
19281
|
+
) ? hostname : os.hostname();
|
|
19282
|
+
if ( /\./.test(host) ) {
|
|
19283
|
+
return host
|
|
19284
|
+
}
|
|
19285
|
+
|
|
19286
|
+
console.debug('[DOMAIN][getFQDN] FQDN: ' + host);
|
|
19287
|
+
var ipObj = null
|
|
19288
|
+
, err = null
|
|
19289
|
+
;
|
|
19290
|
+
ipObj = await promisify(dns.lookup)(host, { hints: dns.ADDRCONFIG || dns.V4MAPPED })
|
|
19291
|
+
.then( function onIP(result) {
|
|
19292
|
+
console.debug('[DOMAIN][getFQDN] IP: ' + result.address);
|
|
19293
|
+
console.debug('[DOMAIN][getFQDN] FAMILY: ' + result.family);
|
|
19294
|
+
|
|
19295
|
+
return result;
|
|
19296
|
+
})
|
|
19297
|
+
.catch( function onIPErr(_err) {
|
|
19298
|
+
err = _err;
|
|
19299
|
+
});
|
|
19300
|
+
if (err) {
|
|
19301
|
+
throw err;
|
|
19302
|
+
}
|
|
19303
|
+
host = await promisify(dns.lookupService)(ipObj.address, 0)
|
|
19304
|
+
.then( function onLookupService(result) {
|
|
19305
|
+
console.debug('[DOMAIN][getFQDN] FQDN: ' + result.hostname);
|
|
19306
|
+
console.debug('[DOMAIN][getFQDN] Service: ' + result.service);
|
|
19307
|
+
|
|
19308
|
+
return result.hostname;
|
|
19309
|
+
})
|
|
19310
|
+
.catch( function onLookupServiceErr(err) {
|
|
19311
|
+
err = _err;
|
|
19312
|
+
});
|
|
19313
|
+
if (err) {
|
|
19314
|
+
throw err;
|
|
19315
|
+
}
|
|
19316
|
+
|
|
19317
|
+
if ( !/\./.test(host) ) {
|
|
19318
|
+
throw new Error('[DOMAIN][getFQDN] `'+ host +'` is not a FQDN !');
|
|
19319
|
+
}
|
|
19320
|
+
|
|
19321
|
+
return host;
|
|
19322
|
+
}
|
|
19323
|
+
|
|
19031
19324
|
|
|
19032
19325
|
/**
|
|
19033
19326
|
* Load a json file and removing comments if found
|
|
@@ -19039,6 +19332,7 @@ function Domain(options, cb) {
|
|
|
19039
19332
|
if ( typeof(jsonFormat) == 'undefined' ) {
|
|
19040
19333
|
jsonFormat = false
|
|
19041
19334
|
}
|
|
19335
|
+
urlOrHostname = urlOrHostname.trim();
|
|
19042
19336
|
var isSLD = false
|
|
19043
19337
|
, isRegisteredTldOrSld = false
|
|
19044
19338
|
, rootDomain = urlOrHostname.replace(/^(.*)\:\/\/|\/(.*)/g, '')
|
|
@@ -19138,7 +19432,8 @@ function Domain(options, cb) {
|
|
|
19138
19432
|
};
|
|
19139
19433
|
// Backend proto only
|
|
19140
19434
|
if (!isGFFCtx) {
|
|
19141
|
-
_proto.updatePSL
|
|
19435
|
+
_proto.updatePSL = updatePSL;
|
|
19436
|
+
_proto.getFQDN = getFQDN;
|
|
19142
19437
|
}
|
|
19143
19438
|
// Frontend only
|
|
19144
19439
|
else {
|