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