native-fn 1.0.89 → 1.1.0
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/dist/index.d.ts +747 -29
- package/dist/native.cjs +4283 -74
- package/dist/native.min.cjs +1 -1
- package/dist/native.min.mjs +1 -1
- package/dist/native.mjs +4283 -74
- package/dist/native.umd.js +4283 -74
- package/dist/native.umd.min.js +1 -1
- package/dist/plugin/app/index.cjs +637 -663
- package/dist/plugin/app/index.d.ts +4 -114
- package/dist/plugin/app/index.min.cjs +1 -1
- package/dist/plugin/app/index.min.mjs +1 -1
- package/dist/plugin/app/index.mjs +637 -663
- package/dist/plugin/app/index.umd.js +637 -663
- package/dist/plugin/app/index.umd.min.js +1 -1
- package/dist/plugin/app/src/plugin/app/constants/index.d.ts +13 -0
- package/dist/plugin/app/src/plugin/app/cores/index.d.ts +3 -2
- package/dist/plugin/app/src/plugin/app/index.d.ts +2 -11
- package/dist/plugin/app/src/plugin/app/types/app.d.ts +13 -3
- package/dist/plugin/app/src/plugin/app/types/index.d.ts +0 -15
- package/dist/plugin/app/src/plugin/appearance/cores/index.d.ts +2 -2
- package/dist/plugin/app/src/plugin/appearance/index.d.ts +2 -7
- package/dist/plugin/app/src/plugin/appearance/types/appearance.d.ts +6 -3
- package/dist/plugin/app/src/plugin/appearance/types/index.d.ts +0 -12
- package/dist/plugin/app/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/app/src/plugin/clipboard/index.d.ts +2 -4
- package/dist/plugin/app/src/plugin/clipboard/types/clipboard.d.ts +3 -1
- package/dist/plugin/app/src/plugin/clipboard/types/index.d.ts +0 -10
- package/dist/plugin/app/src/plugin/dimension/cores/index.d.ts +2 -2
- package/dist/plugin/app/src/plugin/dimension/index.d.ts +3 -4
- package/dist/plugin/app/src/plugin/dimension/types/dimensions.d.ts +4 -2
- package/dist/plugin/app/src/plugin/dimension/types/index.d.ts +0 -12
- package/dist/plugin/app/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/app/src/plugin/fullscreen/index.d.ts +2 -4
- package/dist/plugin/app/src/plugin/fullscreen/types/fullscreen.d.ts +6 -4
- package/dist/plugin/app/src/plugin/fullscreen/types/index.d.ts +0 -10
- package/dist/plugin/app/src/plugin/platform/constants/index.d.ts +6 -6
- package/dist/plugin/app/src/plugin/platform/cores/index.d.ts +24 -6
- package/dist/plugin/app/src/plugin/platform/index.d.ts +2 -11
- package/dist/plugin/app/src/plugin/platform/types/index.d.ts +0 -10
- package/dist/plugin/app/src/plugin/platform/types/platform.d.ts +22 -14
- package/dist/plugin/app/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/app/src/plugin/theme/index.d.ts +2 -4
- package/dist/plugin/app/src/plugin/theme/types/index.d.ts +0 -10
- package/dist/plugin/app/src/plugin/theme/types/theme.d.ts +3 -1
- package/dist/plugin/app/src/types/native.d.ts +16 -26
- package/dist/plugin/appearance/index.cjs +392 -585
- package/dist/plugin/appearance/index.d.ts +4 -37
- package/dist/plugin/appearance/index.min.cjs +1 -1
- package/dist/plugin/appearance/index.min.mjs +1 -1
- package/dist/plugin/appearance/index.mjs +392 -585
- package/dist/plugin/appearance/index.umd.js +392 -585
- package/dist/plugin/appearance/index.umd.min.js +1 -1
- package/dist/plugin/appearance/src/plugin/app/constants/index.d.ts +13 -0
- package/dist/plugin/appearance/src/plugin/app/cores/index.d.ts +3 -2
- package/dist/plugin/appearance/src/plugin/app/index.d.ts +2 -11
- package/dist/plugin/appearance/src/plugin/app/types/app.d.ts +13 -3
- package/dist/plugin/appearance/src/plugin/app/types/index.d.ts +0 -15
- package/dist/plugin/appearance/src/plugin/appearance/cores/index.d.ts +2 -2
- package/dist/plugin/appearance/src/plugin/appearance/index.d.ts +2 -7
- package/dist/plugin/appearance/src/plugin/appearance/types/appearance.d.ts +6 -3
- package/dist/plugin/appearance/src/plugin/appearance/types/index.d.ts +0 -12
- package/dist/plugin/appearance/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/appearance/src/plugin/clipboard/index.d.ts +2 -4
- package/dist/plugin/appearance/src/plugin/clipboard/types/clipboard.d.ts +3 -1
- package/dist/plugin/appearance/src/plugin/clipboard/types/index.d.ts +0 -10
- package/dist/plugin/appearance/src/plugin/dimension/cores/index.d.ts +2 -2
- package/dist/plugin/appearance/src/plugin/dimension/index.d.ts +3 -4
- package/dist/plugin/appearance/src/plugin/dimension/types/dimensions.d.ts +4 -2
- package/dist/plugin/appearance/src/plugin/dimension/types/index.d.ts +0 -12
- package/dist/plugin/appearance/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/appearance/src/plugin/fullscreen/index.d.ts +2 -4
- package/dist/plugin/appearance/src/plugin/fullscreen/types/fullscreen.d.ts +6 -4
- package/dist/plugin/appearance/src/plugin/fullscreen/types/index.d.ts +0 -10
- package/dist/plugin/appearance/src/plugin/platform/constants/index.d.ts +6 -6
- package/dist/plugin/appearance/src/plugin/platform/cores/index.d.ts +24 -6
- package/dist/plugin/appearance/src/plugin/platform/index.d.ts +2 -11
- package/dist/plugin/appearance/src/plugin/platform/types/index.d.ts +0 -10
- package/dist/plugin/appearance/src/plugin/platform/types/platform.d.ts +22 -14
- package/dist/plugin/appearance/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/appearance/src/plugin/theme/index.d.ts +2 -4
- package/dist/plugin/appearance/src/plugin/theme/types/index.d.ts +0 -10
- package/dist/plugin/appearance/src/plugin/theme/types/theme.d.ts +3 -1
- package/dist/plugin/appearance/src/types/native.d.ts +16 -26
- package/dist/plugin/clipboard/index.cjs +48 -822
- package/dist/plugin/clipboard/index.d.ts +4 -27
- package/dist/plugin/clipboard/index.min.cjs +1 -1
- package/dist/plugin/clipboard/index.min.mjs +1 -1
- package/dist/plugin/clipboard/index.mjs +48 -822
- package/dist/plugin/clipboard/index.umd.js +48 -822
- package/dist/plugin/clipboard/index.umd.min.js +1 -1
- package/dist/plugin/clipboard/src/plugin/app/constants/index.d.ts +13 -0
- package/dist/plugin/clipboard/src/plugin/app/cores/index.d.ts +3 -2
- package/dist/plugin/clipboard/src/plugin/app/index.d.ts +2 -11
- package/dist/plugin/clipboard/src/plugin/app/types/app.d.ts +13 -3
- package/dist/plugin/clipboard/src/plugin/app/types/index.d.ts +0 -15
- package/dist/plugin/clipboard/src/plugin/appearance/cores/index.d.ts +2 -2
- package/dist/plugin/clipboard/src/plugin/appearance/index.d.ts +2 -7
- package/dist/plugin/clipboard/src/plugin/appearance/types/appearance.d.ts +6 -3
- package/dist/plugin/clipboard/src/plugin/appearance/types/index.d.ts +0 -12
- package/dist/plugin/clipboard/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/clipboard/src/plugin/clipboard/index.d.ts +2 -4
- package/dist/plugin/clipboard/src/plugin/clipboard/types/clipboard.d.ts +3 -1
- package/dist/plugin/clipboard/src/plugin/clipboard/types/index.d.ts +0 -10
- package/dist/plugin/clipboard/src/plugin/dimension/cores/index.d.ts +2 -2
- package/dist/plugin/clipboard/src/plugin/dimension/index.d.ts +3 -4
- package/dist/plugin/clipboard/src/plugin/dimension/types/dimensions.d.ts +4 -2
- package/dist/plugin/clipboard/src/plugin/dimension/types/index.d.ts +0 -12
- package/dist/plugin/clipboard/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/clipboard/src/plugin/fullscreen/index.d.ts +2 -4
- package/dist/plugin/clipboard/src/plugin/fullscreen/types/fullscreen.d.ts +6 -4
- package/dist/plugin/clipboard/src/plugin/fullscreen/types/index.d.ts +0 -10
- package/dist/plugin/clipboard/src/plugin/platform/constants/index.d.ts +6 -6
- package/dist/plugin/clipboard/src/plugin/platform/cores/index.d.ts +24 -6
- package/dist/plugin/clipboard/src/plugin/platform/index.d.ts +2 -11
- package/dist/plugin/clipboard/src/plugin/platform/types/index.d.ts +0 -10
- package/dist/plugin/clipboard/src/plugin/platform/types/platform.d.ts +22 -14
- package/dist/plugin/clipboard/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/clipboard/src/plugin/theme/index.d.ts +2 -4
- package/dist/plugin/clipboard/src/plugin/theme/types/index.d.ts +0 -10
- package/dist/plugin/clipboard/src/plugin/theme/types/theme.d.ts +3 -1
- package/dist/plugin/clipboard/src/types/native.d.ts +16 -26
- package/dist/plugin/dimension/index.cjs +3 -883
- package/dist/plugin/dimension/index.d.ts +4 -36
- package/dist/plugin/dimension/index.min.cjs +1 -1
- package/dist/plugin/dimension/index.min.mjs +1 -1
- package/dist/plugin/dimension/index.mjs +3 -883
- package/dist/plugin/dimension/index.umd.js +3 -883
- package/dist/plugin/dimension/index.umd.min.js +1 -1
- package/dist/plugin/dimension/src/plugin/app/constants/index.d.ts +13 -0
- package/dist/plugin/dimension/src/plugin/app/cores/index.d.ts +3 -2
- package/dist/plugin/dimension/src/plugin/app/index.d.ts +2 -11
- package/dist/plugin/dimension/src/plugin/app/types/app.d.ts +13 -3
- package/dist/plugin/dimension/src/plugin/app/types/index.d.ts +0 -15
- package/dist/plugin/dimension/src/plugin/appearance/cores/index.d.ts +2 -2
- package/dist/plugin/dimension/src/plugin/appearance/index.d.ts +2 -7
- package/dist/plugin/dimension/src/plugin/appearance/types/appearance.d.ts +6 -3
- package/dist/plugin/dimension/src/plugin/appearance/types/index.d.ts +0 -12
- package/dist/plugin/dimension/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/dimension/src/plugin/clipboard/index.d.ts +2 -4
- package/dist/plugin/dimension/src/plugin/clipboard/types/clipboard.d.ts +3 -1
- package/dist/plugin/dimension/src/plugin/clipboard/types/index.d.ts +0 -10
- package/dist/plugin/dimension/src/plugin/dimension/cores/index.d.ts +2 -2
- package/dist/plugin/dimension/src/plugin/dimension/index.d.ts +3 -4
- package/dist/plugin/dimension/src/plugin/dimension/types/dimensions.d.ts +4 -2
- package/dist/plugin/dimension/src/plugin/dimension/types/index.d.ts +0 -12
- package/dist/plugin/dimension/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/dimension/src/plugin/fullscreen/index.d.ts +2 -4
- package/dist/plugin/dimension/src/plugin/fullscreen/types/fullscreen.d.ts +6 -4
- package/dist/plugin/dimension/src/plugin/fullscreen/types/index.d.ts +0 -10
- package/dist/plugin/dimension/src/plugin/platform/constants/index.d.ts +6 -6
- package/dist/plugin/dimension/src/plugin/platform/cores/index.d.ts +24 -6
- package/dist/plugin/dimension/src/plugin/platform/index.d.ts +2 -11
- package/dist/plugin/dimension/src/plugin/platform/types/index.d.ts +0 -10
- package/dist/plugin/dimension/src/plugin/platform/types/platform.d.ts +22 -14
- package/dist/plugin/dimension/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/dimension/src/plugin/theme/index.d.ts +2 -4
- package/dist/plugin/dimension/src/plugin/theme/types/index.d.ts +0 -10
- package/dist/plugin/dimension/src/plugin/theme/types/theme.d.ts +3 -1
- package/dist/plugin/dimension/src/types/native.d.ts +16 -26
- package/dist/plugin/fullscreen/index.cjs +391 -588
- package/dist/plugin/fullscreen/index.d.ts +4 -33
- package/dist/plugin/fullscreen/index.min.cjs +1 -1
- package/dist/plugin/fullscreen/index.min.mjs +1 -1
- package/dist/plugin/fullscreen/index.mjs +391 -588
- package/dist/plugin/fullscreen/index.umd.js +391 -588
- package/dist/plugin/fullscreen/index.umd.min.js +1 -1
- package/dist/plugin/fullscreen/src/plugin/app/constants/index.d.ts +13 -0
- package/dist/plugin/fullscreen/src/plugin/app/cores/index.d.ts +3 -2
- package/dist/plugin/fullscreen/src/plugin/app/index.d.ts +2 -11
- package/dist/plugin/fullscreen/src/plugin/app/types/app.d.ts +13 -3
- package/dist/plugin/fullscreen/src/plugin/app/types/index.d.ts +0 -15
- package/dist/plugin/fullscreen/src/plugin/appearance/cores/index.d.ts +2 -2
- package/dist/plugin/fullscreen/src/plugin/appearance/index.d.ts +2 -7
- package/dist/plugin/fullscreen/src/plugin/appearance/types/appearance.d.ts +6 -3
- package/dist/plugin/fullscreen/src/plugin/appearance/types/index.d.ts +0 -12
- package/dist/plugin/fullscreen/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/fullscreen/src/plugin/clipboard/index.d.ts +2 -4
- package/dist/plugin/fullscreen/src/plugin/clipboard/types/clipboard.d.ts +3 -1
- package/dist/plugin/fullscreen/src/plugin/clipboard/types/index.d.ts +0 -10
- package/dist/plugin/fullscreen/src/plugin/dimension/cores/index.d.ts +2 -2
- package/dist/plugin/fullscreen/src/plugin/dimension/index.d.ts +3 -4
- package/dist/plugin/fullscreen/src/plugin/dimension/types/dimensions.d.ts +4 -2
- package/dist/plugin/fullscreen/src/plugin/dimension/types/index.d.ts +0 -12
- package/dist/plugin/fullscreen/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/fullscreen/src/plugin/fullscreen/index.d.ts +2 -4
- package/dist/plugin/fullscreen/src/plugin/fullscreen/types/fullscreen.d.ts +6 -4
- package/dist/plugin/fullscreen/src/plugin/fullscreen/types/index.d.ts +0 -10
- package/dist/plugin/fullscreen/src/plugin/platform/constants/index.d.ts +6 -6
- package/dist/plugin/fullscreen/src/plugin/platform/cores/index.d.ts +24 -6
- package/dist/plugin/fullscreen/src/plugin/platform/index.d.ts +2 -11
- package/dist/plugin/fullscreen/src/plugin/platform/types/index.d.ts +0 -10
- package/dist/plugin/fullscreen/src/plugin/platform/types/platform.d.ts +22 -14
- package/dist/plugin/fullscreen/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/fullscreen/src/plugin/theme/index.d.ts +2 -4
- package/dist/plugin/fullscreen/src/plugin/theme/types/index.d.ts +0 -10
- package/dist/plugin/fullscreen/src/plugin/theme/types/theme.d.ts +3 -1
- package/dist/plugin/fullscreen/src/types/native.d.ts +16 -26
- package/dist/plugin/platform/index.cjs +409 -488
- package/dist/plugin/platform/index.d.ts +4 -96
- package/dist/plugin/platform/index.min.cjs +1 -1
- package/dist/plugin/platform/index.min.mjs +1 -1
- package/dist/plugin/platform/index.mjs +409 -488
- package/dist/plugin/platform/index.umd.js +409 -488
- package/dist/plugin/platform/index.umd.min.js +1 -1
- package/dist/plugin/platform/src/plugin/app/constants/index.d.ts +13 -0
- package/dist/plugin/platform/src/plugin/app/cores/index.d.ts +3 -2
- package/dist/plugin/platform/src/plugin/app/index.d.ts +2 -11
- package/dist/plugin/platform/src/plugin/app/types/app.d.ts +13 -3
- package/dist/plugin/platform/src/plugin/app/types/index.d.ts +0 -15
- package/dist/plugin/platform/src/plugin/appearance/cores/index.d.ts +2 -2
- package/dist/plugin/platform/src/plugin/appearance/index.d.ts +2 -7
- package/dist/plugin/platform/src/plugin/appearance/types/appearance.d.ts +6 -3
- package/dist/plugin/platform/src/plugin/appearance/types/index.d.ts +0 -12
- package/dist/plugin/platform/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/platform/src/plugin/clipboard/index.d.ts +2 -4
- package/dist/plugin/platform/src/plugin/clipboard/types/clipboard.d.ts +3 -1
- package/dist/plugin/platform/src/plugin/clipboard/types/index.d.ts +0 -10
- package/dist/plugin/platform/src/plugin/dimension/cores/index.d.ts +2 -2
- package/dist/plugin/platform/src/plugin/dimension/index.d.ts +3 -4
- package/dist/plugin/platform/src/plugin/dimension/types/dimensions.d.ts +4 -2
- package/dist/plugin/platform/src/plugin/dimension/types/index.d.ts +0 -12
- package/dist/plugin/platform/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/platform/src/plugin/fullscreen/index.d.ts +2 -4
- package/dist/plugin/platform/src/plugin/fullscreen/types/fullscreen.d.ts +6 -4
- package/dist/plugin/platform/src/plugin/fullscreen/types/index.d.ts +0 -10
- package/dist/plugin/platform/src/plugin/platform/constants/index.d.ts +6 -6
- package/dist/plugin/platform/src/plugin/platform/cores/index.d.ts +24 -6
- package/dist/plugin/platform/src/plugin/platform/index.d.ts +2 -11
- package/dist/plugin/platform/src/plugin/platform/types/index.d.ts +0 -10
- package/dist/plugin/platform/src/plugin/platform/types/platform.d.ts +22 -14
- package/dist/plugin/platform/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/platform/src/plugin/theme/index.d.ts +2 -4
- package/dist/plugin/platform/src/plugin/theme/types/index.d.ts +0 -10
- package/dist/plugin/platform/src/plugin/theme/types/theme.d.ts +3 -1
- package/dist/plugin/platform/src/types/native.d.ts +16 -26
- package/dist/plugin/theme/index.cjs +390 -461
- package/dist/plugin/theme/index.d.ts +4 -27
- package/dist/plugin/theme/index.min.cjs +1 -1
- package/dist/plugin/theme/index.min.mjs +1 -1
- package/dist/plugin/theme/index.mjs +390 -461
- package/dist/plugin/theme/index.umd.js +390 -461
- package/dist/plugin/theme/index.umd.min.js +1 -1
- package/dist/plugin/theme/src/plugin/app/constants/index.d.ts +13 -0
- package/dist/plugin/theme/src/plugin/app/cores/index.d.ts +3 -2
- package/dist/plugin/theme/src/plugin/app/index.d.ts +2 -11
- package/dist/plugin/theme/src/plugin/app/types/app.d.ts +13 -3
- package/dist/plugin/theme/src/plugin/app/types/index.d.ts +0 -15
- package/dist/plugin/theme/src/plugin/appearance/cores/index.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/appearance/index.d.ts +2 -7
- package/dist/plugin/theme/src/plugin/appearance/types/appearance.d.ts +6 -3
- package/dist/plugin/theme/src/plugin/appearance/types/index.d.ts +0 -12
- package/dist/plugin/theme/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/clipboard/index.d.ts +2 -4
- package/dist/plugin/theme/src/plugin/clipboard/types/clipboard.d.ts +3 -1
- package/dist/plugin/theme/src/plugin/clipboard/types/index.d.ts +0 -10
- package/dist/plugin/theme/src/plugin/dimension/cores/index.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/dimension/index.d.ts +3 -4
- package/dist/plugin/theme/src/plugin/dimension/types/dimensions.d.ts +4 -2
- package/dist/plugin/theme/src/plugin/dimension/types/index.d.ts +0 -12
- package/dist/plugin/theme/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/fullscreen/index.d.ts +2 -4
- package/dist/plugin/theme/src/plugin/fullscreen/types/fullscreen.d.ts +6 -4
- package/dist/plugin/theme/src/plugin/fullscreen/types/index.d.ts +0 -10
- package/dist/plugin/theme/src/plugin/platform/constants/index.d.ts +6 -6
- package/dist/plugin/theme/src/plugin/platform/cores/index.d.ts +24 -6
- package/dist/plugin/theme/src/plugin/platform/index.d.ts +2 -11
- package/dist/plugin/theme/src/plugin/platform/types/index.d.ts +0 -10
- package/dist/plugin/theme/src/plugin/platform/types/platform.d.ts +22 -14
- package/dist/plugin/theme/src/plugin/theme/cores/index.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/theme/index.d.ts +2 -4
- package/dist/plugin/theme/src/plugin/theme/types/index.d.ts +0 -10
- package/dist/plugin/theme/src/plugin/theme/types/theme.d.ts +3 -1
- package/dist/plugin/theme/src/types/native.d.ts +16 -26
- package/dist/src/constants/index.d.ts +1 -0
- package/dist/src/errors/not-supported-error.d.ts +2 -0
- package/dist/src/errors/permission-not-granted-error.d.ts +2 -0
- package/dist/src/plugin/Display/constants/index.d.ts +4 -0
- package/dist/src/plugin/Display/cores/index.d.ts +3 -0
- package/dist/src/plugin/Display/index.d.ts +3 -0
- package/dist/src/plugin/Display/types/display.d.ts +13 -0
- package/dist/src/plugin/Display/types/index.d.ts +1 -0
- package/dist/src/plugin/app/constants/index.d.ts +21 -0
- package/dist/src/plugin/app/cores/index.d.ts +10 -2
- package/dist/src/plugin/app/index.d.ts +2 -11
- package/dist/src/plugin/app/types/app.d.ts +73 -3
- package/dist/src/plugin/app/types/index.d.ts +0 -15
- package/dist/src/plugin/appearance/constants/index.d.ts +1 -4
- package/dist/src/plugin/appearance/index.d.ts +2 -7
- package/dist/src/plugin/appearance/types/appearance.d.ts +5 -2
- package/dist/src/plugin/appearance/types/appearanceInstance.d.ts +9 -0
- package/dist/src/plugin/appearance/types/index.d.ts +0 -12
- package/dist/src/plugin/badge/cores/index.d.ts +3 -0
- package/dist/src/plugin/badge/index.d.ts +3 -0
- package/dist/src/plugin/badge/types/badge.d.ts +10 -0
- package/dist/src/plugin/badge/types/index.d.ts +1 -0
- package/dist/src/plugin/battery/cores/index.d.ts +3 -0
- package/dist/src/plugin/battery/index.d.ts +3 -0
- package/dist/src/plugin/battery/types/battery.d.ts +26 -0
- package/dist/src/plugin/battery/types/index.d.ts +1 -0
- package/dist/src/plugin/clipboard/index.d.ts +2 -4
- package/dist/src/plugin/clipboard/types/clipboard.d.ts +2 -0
- package/dist/src/plugin/clipboard/types/index.d.ts +0 -10
- package/dist/src/plugin/dimension/constants/index.d.ts +42 -2
- package/dist/src/plugin/dimension/index.d.ts +3 -4
- package/dist/src/plugin/dimension/types/dimensions.d.ts +24 -1
- package/dist/src/plugin/dimension/types/index.d.ts +0 -12
- package/dist/src/plugin/dimension/utils/create-env-observer.d.ts +24 -0
- package/dist/src/plugin/fullscreen/cores/index.d.ts +3 -1
- package/dist/src/plugin/fullscreen/index.d.ts +2 -4
- package/dist/src/plugin/fullscreen/types/fullscreen.d.ts +11 -6
- package/dist/src/plugin/fullscreen/types/index.d.ts +0 -10
- package/dist/src/plugin/geolocation/constants/index.d.ts +2 -0
- package/dist/src/plugin/geolocation/cores/index.d.ts +3 -0
- package/dist/src/plugin/geolocation/index.d.ts +3 -0
- package/dist/src/plugin/geolocation/types/geolocation.d.ts +12 -0
- package/dist/src/plugin/geolocation/types/index.d.ts +1 -0
- package/dist/src/plugin/network/cores/index.d.ts +15 -0
- package/dist/src/plugin/network/index.d.ts +3 -0
- package/dist/src/plugin/network/types/index.d.ts +1 -0
- package/dist/src/plugin/network/types/network.d.ts +4 -0
- package/dist/src/plugin/notification/cores/index.d.ts +3 -0
- package/dist/src/plugin/notification/index.d.ts +3 -0
- package/dist/src/plugin/notification/types/index.d.ts +1 -0
- package/dist/src/plugin/notification/types/notification.d.ts +27 -0
- package/dist/src/plugin/open/constants/index.d.ts +28 -0
- package/dist/src/plugin/open/cores/index.d.ts +55 -0
- package/dist/src/plugin/open/errors/not-supported-error.d.ts +2 -0
- package/dist/src/plugin/open/errors/url-open-error.d.ts +2 -0
- package/dist/src/plugin/open/errors/user-cancel-error.d.ts +2 -0
- package/dist/src/plugin/open/index.d.ts +3 -0
- package/dist/src/plugin/open/types/index.d.ts +1 -0
- package/dist/src/plugin/open/types/open.d.ts +187 -0
- package/dist/src/plugin/permission/constants/index.d.ts +22 -0
- package/dist/src/plugin/permission/cores/index.d.ts +3 -0
- package/dist/src/plugin/permission/index.d.ts +3 -0
- package/dist/src/plugin/permission/types/index.d.ts +1 -0
- package/dist/src/plugin/permission/types/permission.d.ts +10 -0
- package/dist/src/plugin/pip/cores/index.d.ts +12 -0
- package/dist/src/plugin/pip/index.d.ts +3 -0
- package/dist/src/plugin/pip/types/index.d.ts +1 -0
- package/dist/src/plugin/pip/types/pip.d.ts +15 -0
- package/dist/src/plugin/platform/constants/index.d.ts +5 -6
- package/dist/src/plugin/platform/cores/index.d.ts +36 -5
- package/dist/src/plugin/platform/index.d.ts +2 -11
- package/dist/src/plugin/platform/types/index.d.ts +0 -10
- package/dist/src/plugin/platform/types/platform.d.ts +31 -14
- package/dist/src/plugin/pwa/cores/index.d.ts +3 -0
- package/dist/src/plugin/pwa/index.d.ts +3 -0
- package/dist/src/plugin/pwa/types/index.d.ts +1 -0
- package/dist/src/plugin/pwa/types/pwa.d.ts +8 -0
- package/dist/src/plugin/speech/cores/index.d.ts +53 -0
- package/dist/src/plugin/speech/index.d.ts +3 -0
- package/dist/src/plugin/speech/types/index.d.ts +1 -0
- package/dist/src/plugin/speech/types/speech.d.ts +9 -0
- package/dist/src/plugin/theme/index.d.ts +2 -4
- package/dist/src/plugin/theme/types/index.d.ts +0 -10
- package/dist/src/plugin/theme/types/theme.d.ts +2 -0
- package/dist/src/plugin/vibration/cores/index.d.ts +3 -0
- package/dist/src/plugin/vibration/index.d.ts +3 -0
- package/dist/src/plugin/vibration/types/index.d.ts +1 -0
- package/dist/src/plugin/vibration/types/vibration.d.ts +9 -0
- package/dist/src/types/event-listener.d.ts +35 -0
- package/dist/src/types/index.d.ts +3 -0
- package/dist/src/types/listener-entry.d.ts +0 -1
- package/dist/src/types/native.d.ts +30 -26
- package/dist/src/types/subscription-manager.d.ts +4 -0
- package/dist/src/utils/create-env-observer.d.ts +8 -0
- package/dist/src/utils/create-hidden-element.d.ts +1 -1
- package/dist/src/utils/create-subscription-manager.d.ts +2 -0
- package/dist/src/utils/defer.d.ts +1 -0
- package/dist/src/utils/event-listener.d.ts +3 -0
- package/dist/src/utils/keys.d.ts +1 -0
- package/dist/src/utils/now.d.ts +1 -0
- package/dist/src/utils/pad-start.d.ts +1 -0
- package/dist/src/utils/random-string.d.ts +1 -0
- package/dist/src/utils/set-style.d.ts +3 -0
- package/package.json +1 -1
|
@@ -55,6 +55,33 @@
|
|
|
55
55
|
return 0;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
function resolveWindowsVersion(string) {
|
|
59
|
+
if (typeof string === 'undefined')
|
|
60
|
+
return '';
|
|
61
|
+
var mapped = {
|
|
62
|
+
'4.90': 'ME',
|
|
63
|
+
'NT3.51': 'NT 3.11',
|
|
64
|
+
'NT4.0': 'NT 4.0',
|
|
65
|
+
'NT 5.0': '2000',
|
|
66
|
+
'NT 5.1': 'XP',
|
|
67
|
+
'NT 5.2': 'XP',
|
|
68
|
+
'NT 6.0': 'Vista',
|
|
69
|
+
'NT 6.1': '7',
|
|
70
|
+
'NT 6.2': '8',
|
|
71
|
+
'NT 6.3': '8.1',
|
|
72
|
+
'NT 6.4': '10',
|
|
73
|
+
'NT 10.0': '10',
|
|
74
|
+
'ARM': 'RT'
|
|
75
|
+
}[string];
|
|
76
|
+
if (typeof mapped !== 'undefined')
|
|
77
|
+
return mapped;
|
|
78
|
+
return string;
|
|
79
|
+
}
|
|
80
|
+
function resolveUnderscoreVersion(string) {
|
|
81
|
+
if (typeof string === 'undefined')
|
|
82
|
+
return '';
|
|
83
|
+
return string.replace(/_/g, '.');
|
|
84
|
+
}
|
|
58
85
|
var OS;
|
|
59
86
|
(function (OS) {
|
|
60
87
|
OS["Unknown"] = "Unknown";
|
|
@@ -94,13 +121,6 @@
|
|
|
94
121
|
Browsers["IE"] = "IE";
|
|
95
122
|
Browsers["SamsungInternet"] = "SamsungInternet";
|
|
96
123
|
})(Browsers || (Browsers = {}));
|
|
97
|
-
var CrossPlatformFramework;
|
|
98
|
-
(function (CrossPlatformFramework) {
|
|
99
|
-
CrossPlatformFramework["Unknown"] = "Unknown";
|
|
100
|
-
CrossPlatformFramework["ReactNative"] = "ReactNative";
|
|
101
|
-
CrossPlatformFramework["Electron"] = "Electron";
|
|
102
|
-
CrossPlatformFramework["Cordova"] = "Cordova";
|
|
103
|
-
})(CrossPlatformFramework || (CrossPlatformFramework = {}));
|
|
104
124
|
var USER_AGENT = typeof globalThis.navigator !== 'undefined' && typeof globalThis.navigator.userAgent === 'string' ? globalThis.navigator.userAgent : '';
|
|
105
125
|
var HIGH_ENTROPY_BRAND_NAME_MAP = {
|
|
106
126
|
'Google Chrome': 'Chrome',
|
|
@@ -110,82 +130,7 @@
|
|
|
110
130
|
'HeadlessChrome': 'Chrome Headless',
|
|
111
131
|
'OperaMobile': 'Opera Mobi',
|
|
112
132
|
};
|
|
113
|
-
|
|
114
|
-
var readyState = 'loading';
|
|
115
|
-
var readyCallback = [];
|
|
116
|
-
var pendingTasks = 0;
|
|
117
|
-
var Platform = {
|
|
118
|
-
os: { name: OS.Unknown, version: '' },
|
|
119
|
-
engine: { name: Engines.Unknown, version: '' },
|
|
120
|
-
browser: { name: Browsers.Unknown, version: '' },
|
|
121
|
-
crossPlatformFramework: CrossPlatformFramework.Unknown,
|
|
122
|
-
userAgent: USER_AGENT,
|
|
123
|
-
get locale() {
|
|
124
|
-
return getLocale();
|
|
125
|
-
},
|
|
126
|
-
get device() {
|
|
127
|
-
if (this.os.name === OS.iOS || this.os.name === OS.Android)
|
|
128
|
-
return Devices.Mobile;
|
|
129
|
-
if (this.os.name === OS.Windows || this.os.name === OS.MacOS)
|
|
130
|
-
return Devices.Desktop;
|
|
131
|
-
return Devices.Unknown;
|
|
132
|
-
},
|
|
133
|
-
get renderer() {
|
|
134
|
-
return getRenderer();
|
|
135
|
-
},
|
|
136
|
-
get isWebview() {
|
|
137
|
-
return /; ?wv|applewebkit(?!.*safari)/i.test(this.userAgent);
|
|
138
|
-
},
|
|
139
|
-
get isNode() {
|
|
140
|
-
return typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && typeof globalThis.process.versions.node !== 'undefined';
|
|
141
|
-
},
|
|
142
|
-
get isStandalone() {
|
|
143
|
-
if (this.os.name === OS.iOS)
|
|
144
|
-
return 'standalone' in globalThis.navigator && !!globalThis.navigator.standalone;
|
|
145
|
-
if (!('matchMedia' in globalThis))
|
|
146
|
-
return false;
|
|
147
|
-
return globalThis.matchMedia('(display-mode: standalone)').matches;
|
|
148
|
-
},
|
|
149
|
-
onready: function (callback) {
|
|
150
|
-
if (readyState === 'complete') {
|
|
151
|
-
try {
|
|
152
|
-
callback(this);
|
|
153
|
-
}
|
|
154
|
-
catch (_) {
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
else {
|
|
158
|
-
readyCallback.push(callback);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
};
|
|
162
|
-
function resolveWindowsVersion(string) {
|
|
163
|
-
if (typeof string === 'undefined')
|
|
164
|
-
return '';
|
|
165
|
-
var mapped = {
|
|
166
|
-
'4.90': 'ME',
|
|
167
|
-
'NT3.51': 'NT 3.11',
|
|
168
|
-
'NT4.0': 'NT 4.0',
|
|
169
|
-
'NT 5.0': '2000',
|
|
170
|
-
'NT 5.1': 'XP',
|
|
171
|
-
'NT 5.2': 'XP',
|
|
172
|
-
'NT 6.0': 'Vista',
|
|
173
|
-
'NT 6.1': '7',
|
|
174
|
-
'NT 6.2': '8',
|
|
175
|
-
'NT 6.3': '8.1',
|
|
176
|
-
'NT 6.4': '10',
|
|
177
|
-
'NT 10.0': '10',
|
|
178
|
-
'ARM': 'RT'
|
|
179
|
-
}[string];
|
|
180
|
-
if (typeof mapped !== 'undefined')
|
|
181
|
-
return mapped;
|
|
182
|
-
return string;
|
|
183
|
-
}
|
|
184
|
-
function resolveUnderscoreVersion(string) {
|
|
185
|
-
if (typeof string === 'undefined')
|
|
186
|
-
return '';
|
|
187
|
-
return string.replace(/_/g, '.');
|
|
188
|
-
}
|
|
133
|
+
var RTL_LANGUAGES = ['ae', 'ar', 'arc', 'bcc', 'bqi', 'ckb', 'dv', 'fa', 'glk', 'he', 'iw', 'ku', 'mzn', 'nqo', 'pnb', 'ps', 'sd', 'ug', 'ur', 'yi'];
|
|
189
134
|
var OS_RESOLVER_MAP = [
|
|
190
135
|
[/windows nt (6\.[23]); arm/i, OS.Windows, resolveWindowsVersion],
|
|
191
136
|
[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i, OS.Windows, resolveWindowsVersion],
|
|
@@ -244,157 +189,237 @@
|
|
|
244
189
|
[/mobile vr; rv:([\w.]+)\).+firefox/i, Browsers.Firefox],
|
|
245
190
|
[/firefox\/([\w.]+)/i, Browsers.Firefox],
|
|
246
191
|
];
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
192
|
+
var BOT_REGEXP = [
|
|
193
|
+
/ daum[ /]/i,
|
|
194
|
+
/ deusu\//i,
|
|
195
|
+
/(?:^|[^g])news(?!sapphire)/i,
|
|
196
|
+
/(?<! (?:channel\/|google\/))google(?!(app|\/google| pixel))/i,
|
|
197
|
+
/(?<! cu)bots?(?:\b|_)/i,
|
|
198
|
+
/(?<!lib)http/i,
|
|
199
|
+
/(?<![hg]m)score/i,
|
|
200
|
+
/(?<!cam)scan/i,
|
|
201
|
+
/24x7/i,
|
|
202
|
+
/@[a-z][\w-]+\./i,
|
|
203
|
+
/\(\)/i,
|
|
204
|
+
/\.com\b/i,
|
|
205
|
+
/\b\w+\.ai/i,
|
|
206
|
+
/\bmanus-user\//i,
|
|
207
|
+
/\bort\//i,
|
|
208
|
+
/\bperl\b/i,
|
|
209
|
+
/\bsecurityheaders\b/i,
|
|
210
|
+
/\btime\//i,
|
|
211
|
+
/\|/i,
|
|
212
|
+
/^[\w .\-(?:)%]+(?:\/v?\d+(?:\.\d+)?(?:\.\d{1,10})*?)?(?:,|$)/i,
|
|
213
|
+
/^[^ ]{50,}$/i,
|
|
214
|
+
/^\d+\b/i,
|
|
215
|
+
/^\W/i,
|
|
216
|
+
/^\w*search\b/i,
|
|
217
|
+
/^\w+\/[\w()]*$/i,
|
|
218
|
+
/^\w+\/\d\.\d\s\([\w@]+\)$/i,
|
|
219
|
+
/^active/i,
|
|
220
|
+
/^ad muncher/i,
|
|
221
|
+
/^amaya/i,
|
|
222
|
+
/^apache\//i,
|
|
223
|
+
/^avsdevicesdk\//i,
|
|
224
|
+
/^azure/i,
|
|
225
|
+
/^biglotron/i,
|
|
226
|
+
/^bot/i,
|
|
227
|
+
/^bw\//i,
|
|
228
|
+
/^clamav[ /]/i,
|
|
229
|
+
/^client\//i,
|
|
230
|
+
/^cobweb\//i,
|
|
231
|
+
/^custom/i,
|
|
232
|
+
/^ddg[_-]android/i,
|
|
233
|
+
/^discourse/i,
|
|
234
|
+
/^dispatch\/\d/i,
|
|
235
|
+
/^downcast\//i,
|
|
236
|
+
/^duckduckgo/i,
|
|
237
|
+
/^email/i,
|
|
238
|
+
/^facebook/i,
|
|
239
|
+
/^getright\//i,
|
|
240
|
+
/^gozilla\//i,
|
|
241
|
+
/^hobbit/i,
|
|
242
|
+
/^hotzonu/i,
|
|
243
|
+
/^hwcdn\//i,
|
|
244
|
+
/^igetter\//i,
|
|
245
|
+
/^jeode\//i,
|
|
246
|
+
/^jetty\//i,
|
|
247
|
+
/^jigsaw/i,
|
|
248
|
+
/^microsoft bits/i,
|
|
249
|
+
/^movabletype/i,
|
|
250
|
+
/^mozilla\/\d\.\d\s[\w.-]+$/i,
|
|
251
|
+
/^mozilla\/\d\.\d\s\(compatible;?(?:\s[\w-.]+\/\d+\.\d+)?\)$/i,
|
|
252
|
+
/^navermailapp/i,
|
|
253
|
+
/^netsurf/i,
|
|
254
|
+
/^offline/i,
|
|
255
|
+
/^openai\//i,
|
|
256
|
+
/^owler/i,
|
|
257
|
+
/^php/i,
|
|
258
|
+
/^postman/i,
|
|
259
|
+
/^python/i,
|
|
260
|
+
/^rank/i,
|
|
261
|
+
/^read/i,
|
|
262
|
+
/^reed/i,
|
|
263
|
+
/^rest/i,
|
|
264
|
+
/^rss/i,
|
|
265
|
+
/^snapchat/i,
|
|
266
|
+
/^space bison/i,
|
|
267
|
+
/^svn/i,
|
|
268
|
+
/^swcd /i,
|
|
269
|
+
/^taringa/i,
|
|
270
|
+
/^thumbor\//i,
|
|
271
|
+
/^track/i,
|
|
272
|
+
/^w3c/i,
|
|
273
|
+
/^webbandit\//i,
|
|
274
|
+
/^webcopier/i,
|
|
275
|
+
/^wget/i,
|
|
276
|
+
/^whatsapp/i,
|
|
277
|
+
/^wordpress/i,
|
|
278
|
+
/^xenu link sleuth/i,
|
|
279
|
+
/^yahoo/i,
|
|
280
|
+
/^yandex/i,
|
|
281
|
+
/^zdm\/\d/i,
|
|
282
|
+
/^zoom marketplace\//i,
|
|
283
|
+
/advisor/i,
|
|
284
|
+
/agent\b/i,
|
|
285
|
+
/analyzer/i,
|
|
286
|
+
/archive/i,
|
|
287
|
+
/ask jeeves\/teoma/i,
|
|
288
|
+
/audit/i,
|
|
289
|
+
/bit\.ly\//i,
|
|
290
|
+
/bluecoat drtr/i,
|
|
291
|
+
/browsex/i,
|
|
292
|
+
/burpcollaborator/i,
|
|
293
|
+
/capture/i,
|
|
294
|
+
/catch/i,
|
|
295
|
+
/check\b/i,
|
|
296
|
+
/checker/i,
|
|
297
|
+
/chrome-lighthouse/i,
|
|
298
|
+
/chromeframe/i,
|
|
299
|
+
/classifier/i,
|
|
300
|
+
/cloudflare/i,
|
|
301
|
+
/convertify/i,
|
|
302
|
+
/crawl/i,
|
|
303
|
+
/cypress\//i,
|
|
304
|
+
/dareboost/i,
|
|
305
|
+
/datanyze/i,
|
|
306
|
+
/dejaclick/i,
|
|
307
|
+
/detect/i,
|
|
308
|
+
/dmbrowser/i,
|
|
309
|
+
/download/i,
|
|
310
|
+
/exaleadcloudview/i,
|
|
311
|
+
/feed/i,
|
|
312
|
+
/fetcher/i,
|
|
313
|
+
/firephp/i,
|
|
314
|
+
/functionize/i,
|
|
315
|
+
/grab/i,
|
|
316
|
+
/headless/i,
|
|
317
|
+
/httrack/i,
|
|
318
|
+
/hubspot marketing grader/i,
|
|
319
|
+
/ibisbrowser/i,
|
|
320
|
+
/infrawatch/i,
|
|
321
|
+
/insight/i,
|
|
322
|
+
/inspect/i,
|
|
323
|
+
/iplabel/i,
|
|
324
|
+
/java(?!;)/i,
|
|
325
|
+
/library/i,
|
|
326
|
+
/linkcheck/i,
|
|
327
|
+
/mail\.ru\//i,
|
|
328
|
+
/manager/i,
|
|
329
|
+
/measure/i,
|
|
330
|
+
/neustar wpm/i,
|
|
331
|
+
/node\b/i,
|
|
332
|
+
/nutch/i,
|
|
333
|
+
/offbyone/i,
|
|
334
|
+
/onetrust/i,
|
|
335
|
+
/optimize/i,
|
|
336
|
+
/pageburst/i,
|
|
337
|
+
/pagespeed/i,
|
|
338
|
+
/parser/i,
|
|
339
|
+
/phantomjs/i,
|
|
340
|
+
/pingdom/i,
|
|
341
|
+
/powermarks/i,
|
|
342
|
+
/preview/i,
|
|
343
|
+
/proxy/i,
|
|
344
|
+
/ptst[ /]\d/i,
|
|
345
|
+
/retriever/i,
|
|
346
|
+
/rexx;/i,
|
|
347
|
+
/rigor/i,
|
|
348
|
+
/rss\b/i,
|
|
349
|
+
/scrape/i,
|
|
350
|
+
/server/i,
|
|
351
|
+
/sogou/i,
|
|
352
|
+
/sparkler\//i,
|
|
353
|
+
/speedcurve/i,
|
|
354
|
+
/spider/i,
|
|
355
|
+
/splash/i,
|
|
356
|
+
/statuscake/i,
|
|
357
|
+
/supercleaner/i,
|
|
358
|
+
/synapse/i,
|
|
359
|
+
/synthetic/i,
|
|
360
|
+
/tools/i,
|
|
361
|
+
/torrent/i,
|
|
362
|
+
/transcoder/i,
|
|
363
|
+
/url/i,
|
|
364
|
+
/validator/i,
|
|
365
|
+
/virtuoso/i,
|
|
366
|
+
/wappalyzer/i,
|
|
367
|
+
/webglance/i,
|
|
368
|
+
/webkit2png/i,
|
|
369
|
+
/whatcms\//i,
|
|
370
|
+
/xtate\//i
|
|
371
|
+
];
|
|
372
|
+
|
|
373
|
+
var userAgent = USER_AGENT;
|
|
374
|
+
var Platform = {
|
|
375
|
+
get os() {
|
|
376
|
+
return getOS();
|
|
377
|
+
},
|
|
378
|
+
get engine() {
|
|
379
|
+
return getEngine();
|
|
380
|
+
},
|
|
381
|
+
get browser() {
|
|
382
|
+
return getBrowser();
|
|
383
|
+
},
|
|
384
|
+
get userAgent() {
|
|
385
|
+
return userAgent;
|
|
386
|
+
},
|
|
387
|
+
set userAgent(value) {
|
|
388
|
+
userAgent = value;
|
|
389
|
+
},
|
|
390
|
+
get locale() {
|
|
391
|
+
return getLocale();
|
|
392
|
+
},
|
|
393
|
+
get device() {
|
|
394
|
+
return getDevice();
|
|
395
|
+
},
|
|
396
|
+
get renderer() {
|
|
397
|
+
return getRenderer();
|
|
398
|
+
},
|
|
399
|
+
get isWebview() {
|
|
400
|
+
return getIsWebview();
|
|
401
|
+
},
|
|
402
|
+
get isNode() {
|
|
403
|
+
return getIsNode();
|
|
404
|
+
},
|
|
405
|
+
get isStandalone() {
|
|
406
|
+
return getIsStandalone();
|
|
407
|
+
},
|
|
408
|
+
get isBot() {
|
|
409
|
+
return getIsBot();
|
|
410
|
+
},
|
|
411
|
+
Constants: {
|
|
412
|
+
OS: OS,
|
|
413
|
+
Engines: Engines,
|
|
414
|
+
Browsers: Browsers,
|
|
415
|
+
Devices: Devices,
|
|
416
|
+
},
|
|
417
|
+
Errors: {},
|
|
418
|
+
};
|
|
419
|
+
var parsedFromHighEntropyValuesOS = {};
|
|
420
|
+
var parsedFromHighEntropyValuesBrowser = {};
|
|
421
|
+
var parsedFromHighEntropyValuesEngine = {};
|
|
422
|
+
var parsedFromHighEntropyValuesDevice = null;
|
|
398
423
|
function resolveVersion(string, resolver) {
|
|
399
424
|
if (typeof resolver === 'function')
|
|
400
425
|
return resolver(string);
|
|
@@ -411,54 +436,6 @@
|
|
|
411
436
|
return { brand: entry, version: '' };
|
|
412
437
|
return { brand: entry.brand, version: entry.version };
|
|
413
438
|
}
|
|
414
|
-
function getSemanticVersion(string) {
|
|
415
|
-
var parts = string.split('.');
|
|
416
|
-
return {
|
|
417
|
-
major: parseInt(parts[0] || '0'),
|
|
418
|
-
minor: parseInt(parts[1] || '0'),
|
|
419
|
-
build: parseInt(parts[2] || '0')
|
|
420
|
-
};
|
|
421
|
-
}
|
|
422
|
-
function parseOSFromCordova() {
|
|
423
|
-
Platform.crossPlatformFramework = CrossPlatformFramework.Cordova;
|
|
424
|
-
if (typeof globalThis.device !== 'undefined') {
|
|
425
|
-
switch (globalThis.device.platform) {
|
|
426
|
-
case 'Android':
|
|
427
|
-
Platform.os = {
|
|
428
|
-
name: OS.Android,
|
|
429
|
-
version: globalThis.device.version,
|
|
430
|
-
};
|
|
431
|
-
break;
|
|
432
|
-
case 'iOS':
|
|
433
|
-
Platform.os = {
|
|
434
|
-
name: OS.iOS,
|
|
435
|
-
version: globalThis.device.version,
|
|
436
|
-
};
|
|
437
|
-
break;
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
decrementPendingTasks();
|
|
441
|
-
}
|
|
442
|
-
function getRenderer() {
|
|
443
|
-
if (typeof globalThis.document === 'undefined')
|
|
444
|
-
return '';
|
|
445
|
-
var canvas = globalThis.document.createElement('canvas');
|
|
446
|
-
if (typeof canvas.getContext !== 'function')
|
|
447
|
-
return '';
|
|
448
|
-
var context = canvas.getContext('webgl2') || canvas.getContext('experimental-webgl') || canvas.getContext('webgl');
|
|
449
|
-
if (context === null)
|
|
450
|
-
return '';
|
|
451
|
-
if (context instanceof WebGLRenderingContext || 'getParameter' in context && typeof context.getParameter === 'function') {
|
|
452
|
-
var extension = context.getExtension('WEBGL_debug_renderer_info');
|
|
453
|
-
if (extension === null)
|
|
454
|
-
return context.getParameter(context.RENDERER);
|
|
455
|
-
else
|
|
456
|
-
return context.getParameter(extension.UNMASKED_RENDERER_WEBGL);
|
|
457
|
-
}
|
|
458
|
-
else {
|
|
459
|
-
return '';
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
439
|
function normalizeLocale(locale) {
|
|
463
440
|
if (locale === null || typeof locale === 'undefined')
|
|
464
441
|
return locale;
|
|
@@ -481,13 +458,35 @@
|
|
|
481
458
|
parts[1] = parts[1].charAt(0).toUpperCase() + parts[1].slice(1).toLowerCase();
|
|
482
459
|
return parts.join('-');
|
|
483
460
|
}
|
|
461
|
+
function getRenderer() {
|
|
462
|
+
if (typeof globalThis.document === 'undefined')
|
|
463
|
+
return '';
|
|
464
|
+
var canvas = globalThis.document.createElement('canvas');
|
|
465
|
+
if (typeof canvas.getContext !== 'function')
|
|
466
|
+
return '';
|
|
467
|
+
var context = canvas.getContext('webgl2') || canvas.getContext('experimental-webgl') || canvas.getContext('webgl');
|
|
468
|
+
if (context === null)
|
|
469
|
+
return '';
|
|
470
|
+
if (context instanceof WebGLRenderingContext || 'getParameter' in context && typeof context.getParameter === 'function') {
|
|
471
|
+
var extension = context.getExtension('WEBGL_debug_renderer_info');
|
|
472
|
+
if (extension === null)
|
|
473
|
+
return context.getParameter(context.RENDERER);
|
|
474
|
+
else
|
|
475
|
+
return context.getParameter(extension.UNMASKED_RENDERER_WEBGL);
|
|
476
|
+
}
|
|
477
|
+
else {
|
|
478
|
+
return '';
|
|
479
|
+
}
|
|
480
|
+
}
|
|
484
481
|
function getLocale() {
|
|
485
482
|
var locale = {
|
|
486
483
|
language: null,
|
|
487
484
|
languages: [],
|
|
488
485
|
timezone: null,
|
|
489
486
|
timezoneOffset: 0,
|
|
487
|
+
isRTL: false,
|
|
490
488
|
};
|
|
489
|
+
var isRTL = null;
|
|
491
490
|
function addLanguages(language) {
|
|
492
491
|
for (var i = 0; i < language.length; i++)
|
|
493
492
|
addLanguage(language[i]);
|
|
@@ -500,53 +499,6 @@
|
|
|
500
499
|
locale.languages.push(language);
|
|
501
500
|
}
|
|
502
501
|
}
|
|
503
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.ReactNative) {
|
|
504
|
-
try {
|
|
505
|
-
var reactNative = require('react-native');
|
|
506
|
-
var nativeModules = reactNative.NativeModules;
|
|
507
|
-
if (typeof nativeModules.SettingsManager !== 'undefined') {
|
|
508
|
-
var settingManager = nativeModules.SettingsManager;
|
|
509
|
-
if (typeof settingManager !== 'undefined') {
|
|
510
|
-
var constant = typeof settingManager.getConstants === 'function'
|
|
511
|
-
? settingManager.getConstants()
|
|
512
|
-
: settingManager;
|
|
513
|
-
if (typeof constant !== 'undefined' && typeof constant.settings !== 'undefined') {
|
|
514
|
-
var settings = constant.settings;
|
|
515
|
-
if (typeof settings.AppleLocale === 'string')
|
|
516
|
-
addLanguage(settings.AppleLocale);
|
|
517
|
-
if (Array.isArray(settings.AppleLanguages) && settings.AppleLanguages.length > 0)
|
|
518
|
-
addLanguages(settings.AppleLanguages);
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
if (typeof nativeModules.I18nManager !== 'undefined') {
|
|
523
|
-
var i18nManager = nativeModules.I18nManager;
|
|
524
|
-
if (typeof i18nManager !== 'undefined') {
|
|
525
|
-
var constant = typeof i18nManager.getConstants === 'function'
|
|
526
|
-
? i18nManager.getConstants()
|
|
527
|
-
: i18nManager;
|
|
528
|
-
if (typeof constant !== 'undefined' && typeof constant.localeIdentifier !== 'undefined')
|
|
529
|
-
addLanguage(constant.localeIdentifier);
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
catch (_) {
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
|
|
537
|
-
try {
|
|
538
|
-
var electron = require('electron');
|
|
539
|
-
var app = electron.app;
|
|
540
|
-
if (typeof app.getLocale !== 'undefined')
|
|
541
|
-
addLanguage(app.getLocale());
|
|
542
|
-
if (typeof app.getSystemLocale !== 'undefined')
|
|
543
|
-
addLanguage(app.getSystemLocale());
|
|
544
|
-
if (typeof app.getPreferredSystemLanguages !== 'undefined')
|
|
545
|
-
addLanguages(app.getPreferredSystemLanguages());
|
|
546
|
-
}
|
|
547
|
-
catch (_) {
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
502
|
if (typeof Intl !== 'undefined') {
|
|
551
503
|
try {
|
|
552
504
|
addLanguage(Intl.DateTimeFormat().resolvedOptions().locale);
|
|
@@ -576,13 +528,37 @@
|
|
|
576
528
|
}
|
|
577
529
|
catch (_) {
|
|
578
530
|
}
|
|
531
|
+
if (typeof locale.language === 'string') {
|
|
532
|
+
if (typeof Intl !== 'undefined' && typeof Intl.Locale !== 'undefined') {
|
|
533
|
+
try {
|
|
534
|
+
var intlLocale = new Intl.Locale(locale.language);
|
|
535
|
+
if (typeof intlLocale.getTextInfo === 'function')
|
|
536
|
+
isRTL = intlLocale.getTextInfo().direction === 'rtl';
|
|
537
|
+
else if (typeof intlLocale.textInfo !== 'undefined')
|
|
538
|
+
isRTL = intlLocale.textInfo.direction === 'rtl';
|
|
539
|
+
}
|
|
540
|
+
catch (_) {
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
if (typeof isRTL !== 'boolean') {
|
|
544
|
+
var matched = /^([A-Za-z]{1,8})(?:[-_][A-Za-z0-9]{1,8})*$/.exec(locale.language);
|
|
545
|
+
if (matched !== null) {
|
|
546
|
+
var language = matched[1].toLowerCase();
|
|
547
|
+
for (var i = 0; i < RTL_LANGUAGES.length; i++) {
|
|
548
|
+
if (RTL_LANGUAGES[i] === language) {
|
|
549
|
+
isRTL = true;
|
|
550
|
+
break;
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
if (typeof isRTL === 'boolean')
|
|
557
|
+
locale.isRTL = isRTL;
|
|
579
558
|
return locale;
|
|
580
559
|
}
|
|
581
|
-
function
|
|
582
|
-
|
|
583
|
-
Platform.crossPlatformFramework = CrossPlatformFramework.Electron;
|
|
584
|
-
if (typeof globalThis.navigator !== 'undefined' && globalThis.navigator.product === 'ReactNative')
|
|
585
|
-
Platform.crossPlatformFramework = CrossPlatformFramework.ReactNative;
|
|
560
|
+
function getOS() {
|
|
561
|
+
var result = { name: OS.Unknown, version: '' };
|
|
586
562
|
for (var i = 0; i < OS_RESOLVER_MAP.length; i++) {
|
|
587
563
|
var map = OS_RESOLVER_MAP[i];
|
|
588
564
|
var regexp = map[0];
|
|
@@ -590,18 +566,26 @@
|
|
|
590
566
|
var resolver = map[2];
|
|
591
567
|
var matched = Platform.userAgent.match(regexp);
|
|
592
568
|
if (matched !== null) {
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
version: resolveVersion(matched[1], resolver),
|
|
596
|
-
};
|
|
569
|
+
result.name = os;
|
|
570
|
+
result.version = resolveVersion(matched[1], resolver);
|
|
597
571
|
break;
|
|
598
572
|
}
|
|
599
573
|
}
|
|
600
|
-
if (
|
|
574
|
+
if (result.name === OS.iOS && compareVersion(result.version, '18.6') === 0) {
|
|
601
575
|
var version = /\) Version\/([\d.]+)/.exec(Platform.userAgent);
|
|
602
576
|
if (version !== null && parseInt(version[1].substring(0, 2), 10) >= 26)
|
|
603
|
-
|
|
577
|
+
result.version = version[1];
|
|
604
578
|
}
|
|
579
|
+
if (Platform.userAgent === USER_AGENT) {
|
|
580
|
+
if (typeof parsedFromHighEntropyValuesOS.name !== 'undefined')
|
|
581
|
+
result.name = parsedFromHighEntropyValuesOS.name;
|
|
582
|
+
if (typeof parsedFromHighEntropyValuesOS.version !== 'undefined')
|
|
583
|
+
result.version = parsedFromHighEntropyValuesOS.version;
|
|
584
|
+
}
|
|
585
|
+
return result;
|
|
586
|
+
}
|
|
587
|
+
function getEngine() {
|
|
588
|
+
var result = { name: Engines.Unknown, version: '' };
|
|
605
589
|
for (var i = 0; i < ENGINE_RESOLVER_MAP.length; i++) {
|
|
606
590
|
var map = ENGINE_RESOLVER_MAP[i];
|
|
607
591
|
var regexp = map[0];
|
|
@@ -609,13 +593,21 @@
|
|
|
609
593
|
var resolver = map[2];
|
|
610
594
|
var matched = Platform.userAgent.match(regexp);
|
|
611
595
|
if (matched !== null) {
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
version: resolveVersion(matched[1], resolver),
|
|
615
|
-
};
|
|
596
|
+
result.name = engine;
|
|
597
|
+
result.version = resolveVersion(matched[1], resolver);
|
|
616
598
|
break;
|
|
617
599
|
}
|
|
618
600
|
}
|
|
601
|
+
if (Platform.userAgent === USER_AGENT) {
|
|
602
|
+
if (typeof parsedFromHighEntropyValuesEngine.name !== 'undefined')
|
|
603
|
+
result.name = parsedFromHighEntropyValuesEngine.name;
|
|
604
|
+
if (typeof parsedFromHighEntropyValuesEngine.version !== 'undefined')
|
|
605
|
+
result.version = parsedFromHighEntropyValuesEngine.version;
|
|
606
|
+
}
|
|
607
|
+
return result;
|
|
608
|
+
}
|
|
609
|
+
function getBrowser() {
|
|
610
|
+
var result = { name: Browsers.Unknown, version: '' };
|
|
619
611
|
for (var i = 0; i < BROWSER_RESOLVER_MAP.length; i++) {
|
|
620
612
|
var map = BROWSER_RESOLVER_MAP[i];
|
|
621
613
|
var regexp = map[0];
|
|
@@ -623,102 +615,49 @@
|
|
|
623
615
|
var resolver = map[2];
|
|
624
616
|
var matched = Platform.userAgent.match(regexp);
|
|
625
617
|
if (matched !== null) {
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
version: resolveVersion(matched[1], resolver),
|
|
629
|
-
};
|
|
618
|
+
result.name = browser;
|
|
619
|
+
result.version = resolveVersion(matched[1], resolver);
|
|
630
620
|
break;
|
|
631
621
|
}
|
|
632
622
|
}
|
|
633
|
-
if (Platform.
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
var release = '' + platform.Version;
|
|
639
|
-
var version = getSemanticVersion(release);
|
|
640
|
-
switch (os) {
|
|
641
|
-
case 'android':
|
|
642
|
-
Platform.os = {
|
|
643
|
-
name: OS.Android,
|
|
644
|
-
version: resolveSemanticAndroidVersion(version, release),
|
|
645
|
-
};
|
|
646
|
-
break;
|
|
647
|
-
case 'ios':
|
|
648
|
-
Platform.os = {
|
|
649
|
-
name: OS.iOS,
|
|
650
|
-
version: release,
|
|
651
|
-
};
|
|
652
|
-
break;
|
|
653
|
-
case 'windows':
|
|
654
|
-
Platform.os = {
|
|
655
|
-
name: OS.Windows,
|
|
656
|
-
version: resolveSemanticWindowsVersion(version, release),
|
|
657
|
-
};
|
|
658
|
-
break;
|
|
659
|
-
case 'macos':
|
|
660
|
-
Platform.os = {
|
|
661
|
-
name: OS.MacOS,
|
|
662
|
-
version: release,
|
|
663
|
-
};
|
|
664
|
-
break;
|
|
665
|
-
}
|
|
666
|
-
}
|
|
667
|
-
catch (_) {
|
|
668
|
-
}
|
|
669
|
-
finally {
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
if (Platform.isNode) {
|
|
673
|
-
try {
|
|
674
|
-
var os = require('os');
|
|
675
|
-
var platform = os.platform();
|
|
676
|
-
var release = os.release();
|
|
677
|
-
var version = getSemanticVersion(release);
|
|
678
|
-
switch (platform) {
|
|
679
|
-
case 'win32':
|
|
680
|
-
Platform.os = {
|
|
681
|
-
name: OS.Windows,
|
|
682
|
-
version: resolveSemanticWindowsVersion(version, release),
|
|
683
|
-
};
|
|
684
|
-
break;
|
|
685
|
-
case 'darwin':
|
|
686
|
-
Platform.os = {
|
|
687
|
-
name: OS.MacOS,
|
|
688
|
-
version: resolveSemanticDarwinVersion(version, release),
|
|
689
|
-
};
|
|
690
|
-
break;
|
|
691
|
-
case 'android':
|
|
692
|
-
Platform.os = {
|
|
693
|
-
name: OS.Android,
|
|
694
|
-
version: release,
|
|
695
|
-
};
|
|
696
|
-
break;
|
|
697
|
-
case 'linux':
|
|
698
|
-
if (/android/i.test(release)) {
|
|
699
|
-
Platform.os = {
|
|
700
|
-
name: OS.Android,
|
|
701
|
-
version: release,
|
|
702
|
-
};
|
|
703
|
-
}
|
|
704
|
-
break;
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
|
-
catch (_) {
|
|
708
|
-
}
|
|
709
|
-
finally {
|
|
710
|
-
}
|
|
711
|
-
}
|
|
712
|
-
if (typeof globalThis.document !== 'undefined') {
|
|
713
|
-
if (typeof globalThis.device !== 'undefined') {
|
|
714
|
-
parseOSFromCordova();
|
|
715
|
-
}
|
|
716
|
-
else {
|
|
717
|
-
globalThis.document.addEventListener("deviceready", parseOSFromCordova, false);
|
|
718
|
-
}
|
|
623
|
+
if (Platform.userAgent === USER_AGENT) {
|
|
624
|
+
if (typeof parsedFromHighEntropyValuesBrowser.name !== 'undefined')
|
|
625
|
+
result.name = parsedFromHighEntropyValuesBrowser.name;
|
|
626
|
+
if (typeof parsedFromHighEntropyValuesBrowser.version !== 'undefined')
|
|
627
|
+
result.version = parsedFromHighEntropyValuesBrowser.version;
|
|
719
628
|
}
|
|
629
|
+
return result;
|
|
630
|
+
}
|
|
631
|
+
function getDevice() {
|
|
632
|
+
if (Platform.userAgent === USER_AGENT && parsedFromHighEntropyValuesDevice !== null)
|
|
633
|
+
return parsedFromHighEntropyValuesDevice;
|
|
634
|
+
if (Platform.os.name === OS.iOS || Platform.os.name === OS.Android)
|
|
635
|
+
return Devices.Mobile;
|
|
636
|
+
if (Platform.os.name === OS.Windows || Platform.os.name === OS.MacOS)
|
|
637
|
+
return Devices.Desktop;
|
|
638
|
+
return Devices.Unknown;
|
|
639
|
+
}
|
|
640
|
+
function getIsWebview() {
|
|
641
|
+
return /; ?wv|applewebkit(?!.*safari)/i.test(Platform.userAgent);
|
|
642
|
+
}
|
|
643
|
+
function getIsNode() {
|
|
644
|
+
return typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && typeof globalThis.process.versions.node !== 'undefined';
|
|
645
|
+
}
|
|
646
|
+
function getIsStandalone() {
|
|
647
|
+
if (Platform.os.name === OS.iOS)
|
|
648
|
+
return 'standalone' in globalThis.navigator && !!globalThis.navigator.standalone;
|
|
649
|
+
if (!('matchMedia' in globalThis))
|
|
650
|
+
return false;
|
|
651
|
+
return globalThis.matchMedia('(display-mode: standalone)').matches;
|
|
652
|
+
}
|
|
653
|
+
function getIsBot() {
|
|
654
|
+
for (var i = 0; i < BOT_REGEXP.length; i++)
|
|
655
|
+
if (BOT_REGEXP[i].test(Platform.userAgent))
|
|
656
|
+
return true;
|
|
657
|
+
return false;
|
|
658
|
+
}
|
|
659
|
+
function parseFromHighEntropyValues() {
|
|
720
660
|
if (typeof globalThis.navigator !== 'undefined' && typeof globalThis.navigator.userAgentData !== 'undefined' && typeof globalThis.navigator.userAgentData.getHighEntropyValues !== 'undefined') {
|
|
721
|
-
incrementPendingTasks();
|
|
722
661
|
globalThis.navigator.userAgentData.getHighEntropyValues(['brands', 'fullVersionList', 'mobile', 'model', 'platform', 'platformVersion', 'architecture', 'formFactors', 'bitness', 'uaFullVersion', 'wow64'])
|
|
723
662
|
.then(function (result) {
|
|
724
663
|
try {
|
|
@@ -739,47 +678,43 @@
|
|
|
739
678
|
if (prevBrandName === null || /Chrom/.test(prevBrandName) || !/Chrom/.test(brandName)) {
|
|
740
679
|
browserName = brandName;
|
|
741
680
|
if (browserName === 'Chrome' || browserName === 'Chrome WebView' || browserName === 'Chrome Headless')
|
|
742
|
-
|
|
681
|
+
parsedFromHighEntropyValuesBrowser.name = Browsers.Chrome;
|
|
743
682
|
else if (browserName === 'Edge' || browserName === 'Edge WebView2')
|
|
744
|
-
|
|
683
|
+
parsedFromHighEntropyValuesBrowser.name = Browsers.Edge;
|
|
745
684
|
else if (browserName === 'Opera Mobi')
|
|
746
|
-
|
|
747
|
-
|
|
685
|
+
parsedFromHighEntropyValuesBrowser.name = Browsers.Opera;
|
|
686
|
+
parsedFromHighEntropyValuesBrowser.version = brandVersion;
|
|
748
687
|
}
|
|
749
688
|
prevBrandName = brandName;
|
|
750
689
|
}
|
|
751
690
|
if (brandName === 'Chromium')
|
|
752
|
-
|
|
691
|
+
parsedFromHighEntropyValuesEngine.version = brandVersion;
|
|
753
692
|
}
|
|
754
693
|
if (typeof platformVersion === 'string') {
|
|
755
694
|
if (Platform.os.name === OS.Windows)
|
|
756
|
-
|
|
695
|
+
parsedFromHighEntropyValuesOS.version = parseInt(platformVersion.split('.')[0], 10) >= 13 ? '11' : '10';
|
|
757
696
|
else
|
|
758
|
-
|
|
697
|
+
parsedFromHighEntropyValuesOS.version = platformVersion;
|
|
759
698
|
}
|
|
760
699
|
if (typeof platform === 'string') {
|
|
761
700
|
if (/android/i.test(platform))
|
|
762
|
-
|
|
701
|
+
parsedFromHighEntropyValuesOS.name = OS.Android;
|
|
763
702
|
else if (/ios|iphone|ipad/i.test(platform))
|
|
764
|
-
|
|
703
|
+
parsedFromHighEntropyValuesOS.name = OS.iOS;
|
|
765
704
|
else if (/windows|win32/i.test(platform))
|
|
766
|
-
|
|
705
|
+
parsedFromHighEntropyValuesOS.name = OS.Windows;
|
|
767
706
|
else if (/macos|macintel/i.test(platform))
|
|
768
|
-
|
|
707
|
+
parsedFromHighEntropyValuesOS.name = OS.MacOS;
|
|
769
708
|
}
|
|
770
709
|
if (result.mobile === true)
|
|
771
|
-
|
|
710
|
+
parsedFromHighEntropyValuesDevice = Devices.Mobile;
|
|
772
711
|
}
|
|
773
712
|
catch (_) {
|
|
774
713
|
}
|
|
775
|
-
finally {
|
|
776
|
-
decrementPendingTasks();
|
|
777
|
-
}
|
|
778
714
|
});
|
|
779
715
|
}
|
|
780
|
-
checkReady();
|
|
781
716
|
}
|
|
782
|
-
|
|
717
|
+
parseFromHighEntropyValues();
|
|
783
718
|
|
|
784
719
|
var currentAppearance = null;
|
|
785
720
|
var appearanceIntervalId = null;
|
|
@@ -787,10 +722,11 @@
|
|
|
787
722
|
get value() {
|
|
788
723
|
return getAppearance();
|
|
789
724
|
},
|
|
790
|
-
set value(appearance) {
|
|
791
|
-
setAppearance(appearance);
|
|
792
|
-
},
|
|
793
725
|
onchange: onchange,
|
|
726
|
+
Constants: {
|
|
727
|
+
Appearances: Appearances
|
|
728
|
+
},
|
|
729
|
+
Errors: {}
|
|
794
730
|
};
|
|
795
731
|
function getAppearanceFromEngine() {
|
|
796
732
|
var img = new Image();
|
|
@@ -811,53 +747,11 @@
|
|
|
811
747
|
return Appearances.Dark;
|
|
812
748
|
return Appearances.Light;
|
|
813
749
|
}
|
|
814
|
-
function getAppearanceFromReactNative() {
|
|
815
|
-
try {
|
|
816
|
-
var reactNative = require('react-native');
|
|
817
|
-
return reactNative.Appearance.getColorScheme() || Appearances.Unknown;
|
|
818
|
-
}
|
|
819
|
-
catch (_) {
|
|
820
|
-
return Appearances.Unknown;
|
|
821
|
-
}
|
|
822
|
-
}
|
|
823
|
-
function getAppearanceFromElectron() {
|
|
824
|
-
try {
|
|
825
|
-
var electron = require('electron');
|
|
826
|
-
return electron.nativeTheme.shouldUseDarkColors ? Appearances.Dark : Appearances.Light;
|
|
827
|
-
}
|
|
828
|
-
catch (_) {
|
|
829
|
-
return Appearances.Unknown;
|
|
830
|
-
}
|
|
831
|
-
}
|
|
832
750
|
function getAppearance() {
|
|
833
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.ReactNative)
|
|
834
|
-
return getAppearanceFromReactNative();
|
|
835
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron)
|
|
836
|
-
return getAppearanceFromElectron();
|
|
837
751
|
if (Platform.browser.name === Browsers.SamsungInternet)
|
|
838
752
|
return getAppearanceFromEngine();
|
|
839
753
|
return getAppearanceFromMediaQuery();
|
|
840
754
|
}
|
|
841
|
-
function setAppearance(appearance) {
|
|
842
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.ReactNative) {
|
|
843
|
-
try {
|
|
844
|
-
var reactNative = require('react-native');
|
|
845
|
-
reactNative.Appearance.setColorScheme(appearance);
|
|
846
|
-
return;
|
|
847
|
-
}
|
|
848
|
-
catch (_) {
|
|
849
|
-
}
|
|
850
|
-
}
|
|
851
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
|
|
852
|
-
try {
|
|
853
|
-
var electron = require('electron');
|
|
854
|
-
electron.nativeTheme.themeSource = appearance || 'system';
|
|
855
|
-
return;
|
|
856
|
-
}
|
|
857
|
-
catch (_) {
|
|
858
|
-
}
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
755
|
function startPolling() {
|
|
862
756
|
currentAppearance = getAppearanceFromEngine();
|
|
863
757
|
appearanceIntervalId = globalThis.setInterval(function () {
|
|
@@ -923,79 +817,6 @@
|
|
|
923
817
|
return i;
|
|
924
818
|
return -1;
|
|
925
819
|
}
|
|
926
|
-
function onchangeReactNative(entry) {
|
|
927
|
-
try {
|
|
928
|
-
var reactNative = require('react-native');
|
|
929
|
-
var isRemoved_1 = false;
|
|
930
|
-
var listener = function (preferences) {
|
|
931
|
-
if (isRemoved_1)
|
|
932
|
-
return;
|
|
933
|
-
entry.fn(preferences.colorScheme || Appearances.Unknown);
|
|
934
|
-
if (entry.once)
|
|
935
|
-
cleanup_1();
|
|
936
|
-
};
|
|
937
|
-
var cleanup_1 = function () {
|
|
938
|
-
if (isRemoved_1)
|
|
939
|
-
return;
|
|
940
|
-
if (typeof entry.signal !== 'undefined')
|
|
941
|
-
entry.signal.removeEventListener('abort', cleanup_1);
|
|
942
|
-
isRemoved_1 = true;
|
|
943
|
-
subscription_1.remove();
|
|
944
|
-
};
|
|
945
|
-
if (typeof entry.signal !== 'undefined') {
|
|
946
|
-
if (entry.signal.aborted) {
|
|
947
|
-
return function () {
|
|
948
|
-
};
|
|
949
|
-
}
|
|
950
|
-
entry.signal.addEventListener('abort', cleanup_1);
|
|
951
|
-
}
|
|
952
|
-
var subscription_1 = reactNative.Appearance.addChangeListener(listener);
|
|
953
|
-
return function () {
|
|
954
|
-
subscription_1.remove();
|
|
955
|
-
};
|
|
956
|
-
}
|
|
957
|
-
catch (_) {
|
|
958
|
-
}
|
|
959
|
-
return function () {
|
|
960
|
-
};
|
|
961
|
-
}
|
|
962
|
-
function onchangeElectron(entry) {
|
|
963
|
-
try {
|
|
964
|
-
var electron = require('electron');
|
|
965
|
-
var nativeTheme_1 = electron.nativeTheme;
|
|
966
|
-
var isRemoved_2 = false;
|
|
967
|
-
var listener_1 = function () {
|
|
968
|
-
if (isRemoved_2)
|
|
969
|
-
return;
|
|
970
|
-
entry.fn(getAppearanceFromElectron());
|
|
971
|
-
if (entry.once)
|
|
972
|
-
cleanup_2();
|
|
973
|
-
};
|
|
974
|
-
var cleanup_2 = function () {
|
|
975
|
-
if (isRemoved_2)
|
|
976
|
-
return;
|
|
977
|
-
if (typeof entry.signal !== 'undefined')
|
|
978
|
-
entry.signal.removeEventListener('abort', cleanup_2);
|
|
979
|
-
isRemoved_2 = true;
|
|
980
|
-
nativeTheme_1.removeListener('updated', listener_1);
|
|
981
|
-
};
|
|
982
|
-
if (typeof entry.signal !== 'undefined') {
|
|
983
|
-
if (entry.signal.aborted) {
|
|
984
|
-
return function () {
|
|
985
|
-
};
|
|
986
|
-
}
|
|
987
|
-
entry.signal.addEventListener('abort', cleanup_2);
|
|
988
|
-
}
|
|
989
|
-
nativeTheme_1.on('updated', listener_1);
|
|
990
|
-
return function () {
|
|
991
|
-
nativeTheme_1.removeListener('updated', listener_1);
|
|
992
|
-
};
|
|
993
|
-
}
|
|
994
|
-
catch (_) {
|
|
995
|
-
}
|
|
996
|
-
return function () {
|
|
997
|
-
};
|
|
998
|
-
}
|
|
999
820
|
function onchange(listener, options) {
|
|
1000
821
|
if (options === void 0) { options = false; }
|
|
1001
822
|
var entry = { fn: listener, capture: false, once: false };
|
|
@@ -1007,10 +828,6 @@
|
|
|
1007
828
|
entry.once = options.once;
|
|
1008
829
|
if (typeof options.signal !== 'undefined')
|
|
1009
830
|
entry.signal = options.signal;
|
|
1010
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.ReactNative)
|
|
1011
|
-
return onchangeReactNative(entry);
|
|
1012
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron)
|
|
1013
|
-
return onchangeElectron(entry);
|
|
1014
831
|
var index = indexOfEntry(entry);
|
|
1015
832
|
if (index === -1) {
|
|
1016
833
|
ENTRIES.push(entry);
|
|
@@ -1041,16 +858,6 @@
|
|
|
1041
858
|
};
|
|
1042
859
|
}
|
|
1043
860
|
|
|
1044
|
-
|
|
1045
|
-
installed: false,
|
|
1046
|
-
name: 'Appearance',
|
|
1047
|
-
module: Appearance,
|
|
1048
|
-
Constants: {
|
|
1049
|
-
Appearances: Appearances,
|
|
1050
|
-
},
|
|
1051
|
-
Errors: {}
|
|
1052
|
-
};
|
|
1053
|
-
|
|
1054
|
-
return NativeAppearancePlugin;
|
|
861
|
+
return Appearance;
|
|
1055
862
|
|
|
1056
863
|
}));
|