native-fn 1.0.88 → 1.0.90
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 +4 -33
- package/dist/native.cjs +2742 -47
- package/dist/native.min.cjs +1 -1
- package/dist/native.min.mjs +1 -1
- package/dist/native.mjs +2742 -47
- package/dist/native.umd.js +2742 -47
- 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/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 +13 -0
- package/dist/src/plugin/app/cores/index.d.ts +11 -2
- package/dist/src/plugin/app/index.d.ts +2 -11
- package/dist/src/plugin/app/types/app.d.ts +25 -3
- package/dist/src/plugin/app/types/index.d.ts +0 -15
- package/dist/src/plugin/appearance/cores/index.d.ts +2 -2
- package/dist/src/plugin/appearance/index.d.ts +2 -7
- package/dist/src/plugin/appearance/types/appearance.d.ts +6 -3
- package/dist/src/plugin/appearance/types/index.d.ts +0 -12
- package/dist/src/plugin/clipboard/cores/index.d.ts +2 -2
- package/dist/src/plugin/clipboard/index.d.ts +2 -4
- package/dist/src/plugin/clipboard/types/clipboard.d.ts +3 -1
- package/dist/src/plugin/clipboard/types/index.d.ts +0 -10
- package/dist/src/plugin/dimension/cores/index.d.ts +2 -2
- package/dist/src/plugin/dimension/index.d.ts +3 -4
- package/dist/src/plugin/dimension/types/dimensions.d.ts +4 -2
- package/dist/src/plugin/dimension/types/index.d.ts +0 -12
- package/dist/src/plugin/fullscreen/cores/index.d.ts +2 -2
- package/dist/src/plugin/fullscreen/index.d.ts +2 -4
- package/dist/src/plugin/fullscreen/types/fullscreen.d.ts +6 -4
- package/dist/src/plugin/fullscreen/types/index.d.ts +0 -10
- 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/platform/constants/index.d.ts +6 -6
- package/dist/src/plugin/platform/cores/index.d.ts +24 -6
- 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 +23 -15
- package/dist/src/plugin/theme/cores/index.d.ts +2 -2
- 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 +3 -1
- package/dist/src/types/native.d.ts +16 -26
- package/package.json +1 -1
|
@@ -23,6 +23,33 @@ function compareVersion(lhs, rhs) {
|
|
|
23
23
|
return 0;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
function resolveWindowsVersion(string) {
|
|
27
|
+
if (typeof string === 'undefined')
|
|
28
|
+
return '';
|
|
29
|
+
var mapped = {
|
|
30
|
+
'4.90': 'ME',
|
|
31
|
+
'NT3.51': 'NT 3.11',
|
|
32
|
+
'NT4.0': 'NT 4.0',
|
|
33
|
+
'NT 5.0': '2000',
|
|
34
|
+
'NT 5.1': 'XP',
|
|
35
|
+
'NT 5.2': 'XP',
|
|
36
|
+
'NT 6.0': 'Vista',
|
|
37
|
+
'NT 6.1': '7',
|
|
38
|
+
'NT 6.2': '8',
|
|
39
|
+
'NT 6.3': '8.1',
|
|
40
|
+
'NT 6.4': '10',
|
|
41
|
+
'NT 10.0': '10',
|
|
42
|
+
'ARM': 'RT'
|
|
43
|
+
}[string];
|
|
44
|
+
if (typeof mapped !== 'undefined')
|
|
45
|
+
return mapped;
|
|
46
|
+
return string;
|
|
47
|
+
}
|
|
48
|
+
function resolveUnderscoreVersion(string) {
|
|
49
|
+
if (typeof string === 'undefined')
|
|
50
|
+
return '';
|
|
51
|
+
return string.replace(/_/g, '.');
|
|
52
|
+
}
|
|
26
53
|
var OS;
|
|
27
54
|
(function (OS) {
|
|
28
55
|
OS["Unknown"] = "Unknown";
|
|
@@ -62,13 +89,6 @@ var Browsers;
|
|
|
62
89
|
Browsers["IE"] = "IE";
|
|
63
90
|
Browsers["SamsungInternet"] = "SamsungInternet";
|
|
64
91
|
})(Browsers || (Browsers = {}));
|
|
65
|
-
var CrossPlatformFramework;
|
|
66
|
-
(function (CrossPlatformFramework) {
|
|
67
|
-
CrossPlatformFramework["Unknown"] = "Unknown";
|
|
68
|
-
CrossPlatformFramework["ReactNative"] = "ReactNative";
|
|
69
|
-
CrossPlatformFramework["Electron"] = "Electron";
|
|
70
|
-
CrossPlatformFramework["Cordova"] = "Cordova";
|
|
71
|
-
})(CrossPlatformFramework || (CrossPlatformFramework = {}));
|
|
72
92
|
var USER_AGENT = typeof globalThis.navigator !== 'undefined' && typeof globalThis.navigator.userAgent === 'string' ? globalThis.navigator.userAgent : '';
|
|
73
93
|
var HIGH_ENTROPY_BRAND_NAME_MAP = {
|
|
74
94
|
'Google Chrome': 'Chrome',
|
|
@@ -78,82 +98,7 @@ var HIGH_ENTROPY_BRAND_NAME_MAP = {
|
|
|
78
98
|
'HeadlessChrome': 'Chrome Headless',
|
|
79
99
|
'OperaMobile': 'Opera Mobi',
|
|
80
100
|
};
|
|
81
|
-
|
|
82
|
-
var readyState = 'loading';
|
|
83
|
-
var readyCallback = [];
|
|
84
|
-
var pendingTasks = 0;
|
|
85
|
-
var Platform = {
|
|
86
|
-
os: { name: OS.Unknown, version: '' },
|
|
87
|
-
engine: { name: Engines.Unknown, version: '' },
|
|
88
|
-
browser: { name: Browsers.Unknown, version: '' },
|
|
89
|
-
crossPlatformFramework: CrossPlatformFramework.Unknown,
|
|
90
|
-
userAgent: USER_AGENT,
|
|
91
|
-
get locale() {
|
|
92
|
-
return getLocale();
|
|
93
|
-
},
|
|
94
|
-
get device() {
|
|
95
|
-
if (this.os.name === OS.iOS || this.os.name === OS.Android)
|
|
96
|
-
return Devices.Mobile;
|
|
97
|
-
if (this.os.name === OS.Windows || this.os.name === OS.MacOS)
|
|
98
|
-
return Devices.Desktop;
|
|
99
|
-
return Devices.Unknown;
|
|
100
|
-
},
|
|
101
|
-
get renderer() {
|
|
102
|
-
return getRenderer();
|
|
103
|
-
},
|
|
104
|
-
get isWebview() {
|
|
105
|
-
return /; ?wv|applewebkit(?!.*safari)/i.test(this.userAgent);
|
|
106
|
-
},
|
|
107
|
-
get isNode() {
|
|
108
|
-
return typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && typeof globalThis.process.versions.node !== 'undefined';
|
|
109
|
-
},
|
|
110
|
-
get isStandalone() {
|
|
111
|
-
if (this.os.name === OS.iOS)
|
|
112
|
-
return 'standalone' in globalThis.navigator && !!globalThis.navigator.standalone;
|
|
113
|
-
if (!('matchMedia' in globalThis))
|
|
114
|
-
return false;
|
|
115
|
-
return globalThis.matchMedia('(display-mode: standalone)').matches;
|
|
116
|
-
},
|
|
117
|
-
onready: function (callback) {
|
|
118
|
-
if (readyState === 'complete') {
|
|
119
|
-
try {
|
|
120
|
-
callback(this);
|
|
121
|
-
}
|
|
122
|
-
catch (_) {
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
else {
|
|
126
|
-
readyCallback.push(callback);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
function resolveWindowsVersion(string) {
|
|
131
|
-
if (typeof string === 'undefined')
|
|
132
|
-
return '';
|
|
133
|
-
var mapped = {
|
|
134
|
-
'4.90': 'ME',
|
|
135
|
-
'NT3.51': 'NT 3.11',
|
|
136
|
-
'NT4.0': 'NT 4.0',
|
|
137
|
-
'NT 5.0': '2000',
|
|
138
|
-
'NT 5.1': 'XP',
|
|
139
|
-
'NT 5.2': 'XP',
|
|
140
|
-
'NT 6.0': 'Vista',
|
|
141
|
-
'NT 6.1': '7',
|
|
142
|
-
'NT 6.2': '8',
|
|
143
|
-
'NT 6.3': '8.1',
|
|
144
|
-
'NT 6.4': '10',
|
|
145
|
-
'NT 10.0': '10',
|
|
146
|
-
'ARM': 'RT'
|
|
147
|
-
}[string];
|
|
148
|
-
if (typeof mapped !== 'undefined')
|
|
149
|
-
return mapped;
|
|
150
|
-
return string;
|
|
151
|
-
}
|
|
152
|
-
function resolveUnderscoreVersion(string) {
|
|
153
|
-
if (typeof string === 'undefined')
|
|
154
|
-
return '';
|
|
155
|
-
return string.replace(/_/g, '.');
|
|
156
|
-
}
|
|
101
|
+
var RTL_LANGUAGES = ['ae', 'ar', 'arc', 'bcc', 'bqi', 'ckb', 'dv', 'fa', 'glk', 'he', 'iw', 'ku', 'mzn', 'nqo', 'pnb', 'ps', 'sd', 'ug', 'ur', 'yi'];
|
|
157
102
|
var OS_RESOLVER_MAP = [
|
|
158
103
|
[/windows nt (6\.[23]); arm/i, OS.Windows, resolveWindowsVersion],
|
|
159
104
|
[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i, OS.Windows, resolveWindowsVersion],
|
|
@@ -212,157 +157,237 @@ var BROWSER_RESOLVER_MAP = [
|
|
|
212
157
|
[/mobile vr; rv:([\w.]+)\).+firefox/i, Browsers.Firefox],
|
|
213
158
|
[/firefox\/([\w.]+)/i, Browsers.Firefox],
|
|
214
159
|
];
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
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
|
-
|
|
160
|
+
var BOT_REGEXP = [
|
|
161
|
+
/ daum[ /]/i,
|
|
162
|
+
/ deusu\//i,
|
|
163
|
+
/(?:^|[^g])news(?!sapphire)/i,
|
|
164
|
+
/(?<! (?:channel\/|google\/))google(?!(app|\/google| pixel))/i,
|
|
165
|
+
/(?<! cu)bots?(?:\b|_)/i,
|
|
166
|
+
/(?<!lib)http/i,
|
|
167
|
+
/(?<![hg]m)score/i,
|
|
168
|
+
/(?<!cam)scan/i,
|
|
169
|
+
/24x7/i,
|
|
170
|
+
/@[a-z][\w-]+\./i,
|
|
171
|
+
/\(\)/i,
|
|
172
|
+
/\.com\b/i,
|
|
173
|
+
/\b\w+\.ai/i,
|
|
174
|
+
/\bmanus-user\//i,
|
|
175
|
+
/\bort\//i,
|
|
176
|
+
/\bperl\b/i,
|
|
177
|
+
/\bsecurityheaders\b/i,
|
|
178
|
+
/\btime\//i,
|
|
179
|
+
/\|/i,
|
|
180
|
+
/^[\w .\-(?:)%]+(?:\/v?\d+(?:\.\d+)?(?:\.\d{1,10})*?)?(?:,|$)/i,
|
|
181
|
+
/^[^ ]{50,}$/i,
|
|
182
|
+
/^\d+\b/i,
|
|
183
|
+
/^\W/i,
|
|
184
|
+
/^\w*search\b/i,
|
|
185
|
+
/^\w+\/[\w()]*$/i,
|
|
186
|
+
/^\w+\/\d\.\d\s\([\w@]+\)$/i,
|
|
187
|
+
/^active/i,
|
|
188
|
+
/^ad muncher/i,
|
|
189
|
+
/^amaya/i,
|
|
190
|
+
/^apache\//i,
|
|
191
|
+
/^avsdevicesdk\//i,
|
|
192
|
+
/^azure/i,
|
|
193
|
+
/^biglotron/i,
|
|
194
|
+
/^bot/i,
|
|
195
|
+
/^bw\//i,
|
|
196
|
+
/^clamav[ /]/i,
|
|
197
|
+
/^client\//i,
|
|
198
|
+
/^cobweb\//i,
|
|
199
|
+
/^custom/i,
|
|
200
|
+
/^ddg[_-]android/i,
|
|
201
|
+
/^discourse/i,
|
|
202
|
+
/^dispatch\/\d/i,
|
|
203
|
+
/^downcast\//i,
|
|
204
|
+
/^duckduckgo/i,
|
|
205
|
+
/^email/i,
|
|
206
|
+
/^facebook/i,
|
|
207
|
+
/^getright\//i,
|
|
208
|
+
/^gozilla\//i,
|
|
209
|
+
/^hobbit/i,
|
|
210
|
+
/^hotzonu/i,
|
|
211
|
+
/^hwcdn\//i,
|
|
212
|
+
/^igetter\//i,
|
|
213
|
+
/^jeode\//i,
|
|
214
|
+
/^jetty\//i,
|
|
215
|
+
/^jigsaw/i,
|
|
216
|
+
/^microsoft bits/i,
|
|
217
|
+
/^movabletype/i,
|
|
218
|
+
/^mozilla\/\d\.\d\s[\w.-]+$/i,
|
|
219
|
+
/^mozilla\/\d\.\d\s\(compatible;?(?:\s[\w-.]+\/\d+\.\d+)?\)$/i,
|
|
220
|
+
/^navermailapp/i,
|
|
221
|
+
/^netsurf/i,
|
|
222
|
+
/^offline/i,
|
|
223
|
+
/^openai\//i,
|
|
224
|
+
/^owler/i,
|
|
225
|
+
/^php/i,
|
|
226
|
+
/^postman/i,
|
|
227
|
+
/^python/i,
|
|
228
|
+
/^rank/i,
|
|
229
|
+
/^read/i,
|
|
230
|
+
/^reed/i,
|
|
231
|
+
/^rest/i,
|
|
232
|
+
/^rss/i,
|
|
233
|
+
/^snapchat/i,
|
|
234
|
+
/^space bison/i,
|
|
235
|
+
/^svn/i,
|
|
236
|
+
/^swcd /i,
|
|
237
|
+
/^taringa/i,
|
|
238
|
+
/^thumbor\//i,
|
|
239
|
+
/^track/i,
|
|
240
|
+
/^w3c/i,
|
|
241
|
+
/^webbandit\//i,
|
|
242
|
+
/^webcopier/i,
|
|
243
|
+
/^wget/i,
|
|
244
|
+
/^whatsapp/i,
|
|
245
|
+
/^wordpress/i,
|
|
246
|
+
/^xenu link sleuth/i,
|
|
247
|
+
/^yahoo/i,
|
|
248
|
+
/^yandex/i,
|
|
249
|
+
/^zdm\/\d/i,
|
|
250
|
+
/^zoom marketplace\//i,
|
|
251
|
+
/advisor/i,
|
|
252
|
+
/agent\b/i,
|
|
253
|
+
/analyzer/i,
|
|
254
|
+
/archive/i,
|
|
255
|
+
/ask jeeves\/teoma/i,
|
|
256
|
+
/audit/i,
|
|
257
|
+
/bit\.ly\//i,
|
|
258
|
+
/bluecoat drtr/i,
|
|
259
|
+
/browsex/i,
|
|
260
|
+
/burpcollaborator/i,
|
|
261
|
+
/capture/i,
|
|
262
|
+
/catch/i,
|
|
263
|
+
/check\b/i,
|
|
264
|
+
/checker/i,
|
|
265
|
+
/chrome-lighthouse/i,
|
|
266
|
+
/chromeframe/i,
|
|
267
|
+
/classifier/i,
|
|
268
|
+
/cloudflare/i,
|
|
269
|
+
/convertify/i,
|
|
270
|
+
/crawl/i,
|
|
271
|
+
/cypress\//i,
|
|
272
|
+
/dareboost/i,
|
|
273
|
+
/datanyze/i,
|
|
274
|
+
/dejaclick/i,
|
|
275
|
+
/detect/i,
|
|
276
|
+
/dmbrowser/i,
|
|
277
|
+
/download/i,
|
|
278
|
+
/exaleadcloudview/i,
|
|
279
|
+
/feed/i,
|
|
280
|
+
/fetcher/i,
|
|
281
|
+
/firephp/i,
|
|
282
|
+
/functionize/i,
|
|
283
|
+
/grab/i,
|
|
284
|
+
/headless/i,
|
|
285
|
+
/httrack/i,
|
|
286
|
+
/hubspot marketing grader/i,
|
|
287
|
+
/ibisbrowser/i,
|
|
288
|
+
/infrawatch/i,
|
|
289
|
+
/insight/i,
|
|
290
|
+
/inspect/i,
|
|
291
|
+
/iplabel/i,
|
|
292
|
+
/java(?!;)/i,
|
|
293
|
+
/library/i,
|
|
294
|
+
/linkcheck/i,
|
|
295
|
+
/mail\.ru\//i,
|
|
296
|
+
/manager/i,
|
|
297
|
+
/measure/i,
|
|
298
|
+
/neustar wpm/i,
|
|
299
|
+
/node\b/i,
|
|
300
|
+
/nutch/i,
|
|
301
|
+
/offbyone/i,
|
|
302
|
+
/onetrust/i,
|
|
303
|
+
/optimize/i,
|
|
304
|
+
/pageburst/i,
|
|
305
|
+
/pagespeed/i,
|
|
306
|
+
/parser/i,
|
|
307
|
+
/phantomjs/i,
|
|
308
|
+
/pingdom/i,
|
|
309
|
+
/powermarks/i,
|
|
310
|
+
/preview/i,
|
|
311
|
+
/proxy/i,
|
|
312
|
+
/ptst[ /]\d/i,
|
|
313
|
+
/retriever/i,
|
|
314
|
+
/rexx;/i,
|
|
315
|
+
/rigor/i,
|
|
316
|
+
/rss\b/i,
|
|
317
|
+
/scrape/i,
|
|
318
|
+
/server/i,
|
|
319
|
+
/sogou/i,
|
|
320
|
+
/sparkler\//i,
|
|
321
|
+
/speedcurve/i,
|
|
322
|
+
/spider/i,
|
|
323
|
+
/splash/i,
|
|
324
|
+
/statuscake/i,
|
|
325
|
+
/supercleaner/i,
|
|
326
|
+
/synapse/i,
|
|
327
|
+
/synthetic/i,
|
|
328
|
+
/tools/i,
|
|
329
|
+
/torrent/i,
|
|
330
|
+
/transcoder/i,
|
|
331
|
+
/url/i,
|
|
332
|
+
/validator/i,
|
|
333
|
+
/virtuoso/i,
|
|
334
|
+
/wappalyzer/i,
|
|
335
|
+
/webglance/i,
|
|
336
|
+
/webkit2png/i,
|
|
337
|
+
/whatcms\//i,
|
|
338
|
+
/xtate\//i
|
|
339
|
+
];
|
|
340
|
+
|
|
341
|
+
var userAgent = USER_AGENT;
|
|
342
|
+
var Platform = {
|
|
343
|
+
get os() {
|
|
344
|
+
return getOS();
|
|
345
|
+
},
|
|
346
|
+
get engine() {
|
|
347
|
+
return getEngine();
|
|
348
|
+
},
|
|
349
|
+
get browser() {
|
|
350
|
+
return getBrowser();
|
|
351
|
+
},
|
|
352
|
+
get userAgent() {
|
|
353
|
+
return userAgent;
|
|
354
|
+
},
|
|
355
|
+
set userAgent(value) {
|
|
356
|
+
userAgent = value;
|
|
357
|
+
},
|
|
358
|
+
get locale() {
|
|
359
|
+
return getLocale();
|
|
360
|
+
},
|
|
361
|
+
get device() {
|
|
362
|
+
return getDevice();
|
|
363
|
+
},
|
|
364
|
+
get renderer() {
|
|
365
|
+
return getRenderer();
|
|
366
|
+
},
|
|
367
|
+
get isWebview() {
|
|
368
|
+
return getIsWebview();
|
|
369
|
+
},
|
|
370
|
+
get isNode() {
|
|
371
|
+
return getIsNode();
|
|
372
|
+
},
|
|
373
|
+
get isStandalone() {
|
|
374
|
+
return getIsStandalone();
|
|
375
|
+
},
|
|
376
|
+
get isBot() {
|
|
377
|
+
return getIsBot();
|
|
378
|
+
},
|
|
379
|
+
Constants: {
|
|
380
|
+
OS: OS,
|
|
381
|
+
Engines: Engines,
|
|
382
|
+
Browsers: Browsers,
|
|
383
|
+
Devices: Devices,
|
|
384
|
+
},
|
|
385
|
+
Errors: {},
|
|
386
|
+
};
|
|
387
|
+
var parsedFromHighEntropyValuesOS = {};
|
|
388
|
+
var parsedFromHighEntropyValuesBrowser = {};
|
|
389
|
+
var parsedFromHighEntropyValuesEngine = {};
|
|
390
|
+
var parsedFromHighEntropyValuesDevice = null;
|
|
366
391
|
function resolveVersion(string, resolver) {
|
|
367
392
|
if (typeof resolver === 'function')
|
|
368
393
|
return resolver(string);
|
|
@@ -379,54 +404,6 @@ function normalizeBrand(entry) {
|
|
|
379
404
|
return { brand: entry, version: '' };
|
|
380
405
|
return { brand: entry.brand, version: entry.version };
|
|
381
406
|
}
|
|
382
|
-
function getSemanticVersion(string) {
|
|
383
|
-
var parts = string.split('.');
|
|
384
|
-
return {
|
|
385
|
-
major: parseInt(parts[0] || '0'),
|
|
386
|
-
minor: parseInt(parts[1] || '0'),
|
|
387
|
-
build: parseInt(parts[2] || '0')
|
|
388
|
-
};
|
|
389
|
-
}
|
|
390
|
-
function parseOSFromCordova() {
|
|
391
|
-
Platform.crossPlatformFramework = CrossPlatformFramework.Cordova;
|
|
392
|
-
if (typeof globalThis.device !== 'undefined') {
|
|
393
|
-
switch (globalThis.device.platform) {
|
|
394
|
-
case 'Android':
|
|
395
|
-
Platform.os = {
|
|
396
|
-
name: OS.Android,
|
|
397
|
-
version: globalThis.device.version,
|
|
398
|
-
};
|
|
399
|
-
break;
|
|
400
|
-
case 'iOS':
|
|
401
|
-
Platform.os = {
|
|
402
|
-
name: OS.iOS,
|
|
403
|
-
version: globalThis.device.version,
|
|
404
|
-
};
|
|
405
|
-
break;
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
decrementPendingTasks();
|
|
409
|
-
}
|
|
410
|
-
function getRenderer() {
|
|
411
|
-
if (typeof globalThis.document === 'undefined')
|
|
412
|
-
return '';
|
|
413
|
-
var canvas = globalThis.document.createElement('canvas');
|
|
414
|
-
if (typeof canvas.getContext !== 'function')
|
|
415
|
-
return '';
|
|
416
|
-
var context = canvas.getContext('webgl2') || canvas.getContext('experimental-webgl') || canvas.getContext('webgl');
|
|
417
|
-
if (context === null)
|
|
418
|
-
return '';
|
|
419
|
-
if (context instanceof WebGLRenderingContext || 'getParameter' in context && typeof context.getParameter === 'function') {
|
|
420
|
-
var extension = context.getExtension('WEBGL_debug_renderer_info');
|
|
421
|
-
if (extension === null)
|
|
422
|
-
return context.getParameter(context.RENDERER);
|
|
423
|
-
else
|
|
424
|
-
return context.getParameter(extension.UNMASKED_RENDERER_WEBGL);
|
|
425
|
-
}
|
|
426
|
-
else {
|
|
427
|
-
return '';
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
407
|
function normalizeLocale(locale) {
|
|
431
408
|
if (locale === null || typeof locale === 'undefined')
|
|
432
409
|
return locale;
|
|
@@ -449,13 +426,35 @@ function normalizeLocale(locale) {
|
|
|
449
426
|
parts[1] = parts[1].charAt(0).toUpperCase() + parts[1].slice(1).toLowerCase();
|
|
450
427
|
return parts.join('-');
|
|
451
428
|
}
|
|
429
|
+
function getRenderer() {
|
|
430
|
+
if (typeof globalThis.document === 'undefined')
|
|
431
|
+
return '';
|
|
432
|
+
var canvas = globalThis.document.createElement('canvas');
|
|
433
|
+
if (typeof canvas.getContext !== 'function')
|
|
434
|
+
return '';
|
|
435
|
+
var context = canvas.getContext('webgl2') || canvas.getContext('experimental-webgl') || canvas.getContext('webgl');
|
|
436
|
+
if (context === null)
|
|
437
|
+
return '';
|
|
438
|
+
if (context instanceof WebGLRenderingContext || 'getParameter' in context && typeof context.getParameter === 'function') {
|
|
439
|
+
var extension = context.getExtension('WEBGL_debug_renderer_info');
|
|
440
|
+
if (extension === null)
|
|
441
|
+
return context.getParameter(context.RENDERER);
|
|
442
|
+
else
|
|
443
|
+
return context.getParameter(extension.UNMASKED_RENDERER_WEBGL);
|
|
444
|
+
}
|
|
445
|
+
else {
|
|
446
|
+
return '';
|
|
447
|
+
}
|
|
448
|
+
}
|
|
452
449
|
function getLocale() {
|
|
453
450
|
var locale = {
|
|
454
451
|
language: null,
|
|
455
452
|
languages: [],
|
|
456
453
|
timezone: null,
|
|
457
454
|
timezoneOffset: 0,
|
|
455
|
+
isRTL: false,
|
|
458
456
|
};
|
|
457
|
+
var isRTL = null;
|
|
459
458
|
function addLanguages(language) {
|
|
460
459
|
for (var i = 0; i < language.length; i++)
|
|
461
460
|
addLanguage(language[i]);
|
|
@@ -468,53 +467,6 @@ function getLocale() {
|
|
|
468
467
|
locale.languages.push(language);
|
|
469
468
|
}
|
|
470
469
|
}
|
|
471
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.ReactNative) {
|
|
472
|
-
try {
|
|
473
|
-
var reactNative = require('react-native');
|
|
474
|
-
var nativeModules = reactNative.NativeModules;
|
|
475
|
-
if (typeof nativeModules.SettingsManager !== 'undefined') {
|
|
476
|
-
var settingManager = nativeModules.SettingsManager;
|
|
477
|
-
if (typeof settingManager !== 'undefined') {
|
|
478
|
-
var constant = typeof settingManager.getConstants === 'function'
|
|
479
|
-
? settingManager.getConstants()
|
|
480
|
-
: settingManager;
|
|
481
|
-
if (typeof constant !== 'undefined' && typeof constant.settings !== 'undefined') {
|
|
482
|
-
var settings = constant.settings;
|
|
483
|
-
if (typeof settings.AppleLocale === 'string')
|
|
484
|
-
addLanguage(settings.AppleLocale);
|
|
485
|
-
if (Array.isArray(settings.AppleLanguages) && settings.AppleLanguages.length > 0)
|
|
486
|
-
addLanguages(settings.AppleLanguages);
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
if (typeof nativeModules.I18nManager !== 'undefined') {
|
|
491
|
-
var i18nManager = nativeModules.I18nManager;
|
|
492
|
-
if (typeof i18nManager !== 'undefined') {
|
|
493
|
-
var constant = typeof i18nManager.getConstants === 'function'
|
|
494
|
-
? i18nManager.getConstants()
|
|
495
|
-
: i18nManager;
|
|
496
|
-
if (typeof constant !== 'undefined' && typeof constant.localeIdentifier !== 'undefined')
|
|
497
|
-
addLanguage(constant.localeIdentifier);
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
catch (_) {
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
|
|
505
|
-
try {
|
|
506
|
-
var electron = require('electron');
|
|
507
|
-
var app = electron.app;
|
|
508
|
-
if (typeof app.getLocale !== 'undefined')
|
|
509
|
-
addLanguage(app.getLocale());
|
|
510
|
-
if (typeof app.getSystemLocale !== 'undefined')
|
|
511
|
-
addLanguage(app.getSystemLocale());
|
|
512
|
-
if (typeof app.getPreferredSystemLanguages !== 'undefined')
|
|
513
|
-
addLanguages(app.getPreferredSystemLanguages());
|
|
514
|
-
}
|
|
515
|
-
catch (_) {
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
470
|
if (typeof Intl !== 'undefined') {
|
|
519
471
|
try {
|
|
520
472
|
addLanguage(Intl.DateTimeFormat().resolvedOptions().locale);
|
|
@@ -544,13 +496,37 @@ function getLocale() {
|
|
|
544
496
|
}
|
|
545
497
|
catch (_) {
|
|
546
498
|
}
|
|
499
|
+
if (typeof locale.language === 'string') {
|
|
500
|
+
if (typeof Intl !== 'undefined' && typeof Intl.Locale !== 'undefined') {
|
|
501
|
+
try {
|
|
502
|
+
var intlLocale = new Intl.Locale(locale.language);
|
|
503
|
+
if (typeof intlLocale.getTextInfo === 'function')
|
|
504
|
+
isRTL = intlLocale.getTextInfo().direction === 'rtl';
|
|
505
|
+
else if (typeof intlLocale.textInfo !== 'undefined')
|
|
506
|
+
isRTL = intlLocale.textInfo.direction === 'rtl';
|
|
507
|
+
}
|
|
508
|
+
catch (_) {
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
if (typeof isRTL !== 'boolean') {
|
|
512
|
+
var matched = /^([A-Za-z]{1,8})(?:[-_][A-Za-z0-9]{1,8})*$/.exec(locale.language);
|
|
513
|
+
if (matched !== null) {
|
|
514
|
+
var language = matched[1].toLowerCase();
|
|
515
|
+
for (var i = 0; i < RTL_LANGUAGES.length; i++) {
|
|
516
|
+
if (RTL_LANGUAGES[i] === language) {
|
|
517
|
+
isRTL = true;
|
|
518
|
+
break;
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
if (typeof isRTL === 'boolean')
|
|
525
|
+
locale.isRTL = isRTL;
|
|
547
526
|
return locale;
|
|
548
527
|
}
|
|
549
|
-
function
|
|
550
|
-
|
|
551
|
-
Platform.crossPlatformFramework = CrossPlatformFramework.Electron;
|
|
552
|
-
if (typeof globalThis.navigator !== 'undefined' && globalThis.navigator.product === 'ReactNative')
|
|
553
|
-
Platform.crossPlatformFramework = CrossPlatformFramework.ReactNative;
|
|
528
|
+
function getOS() {
|
|
529
|
+
var result = { name: OS.Unknown, version: '' };
|
|
554
530
|
for (var i = 0; i < OS_RESOLVER_MAP.length; i++) {
|
|
555
531
|
var map = OS_RESOLVER_MAP[i];
|
|
556
532
|
var regexp = map[0];
|
|
@@ -558,18 +534,26 @@ function init() {
|
|
|
558
534
|
var resolver = map[2];
|
|
559
535
|
var matched = Platform.userAgent.match(regexp);
|
|
560
536
|
if (matched !== null) {
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
version: resolveVersion(matched[1], resolver),
|
|
564
|
-
};
|
|
537
|
+
result.name = os;
|
|
538
|
+
result.version = resolveVersion(matched[1], resolver);
|
|
565
539
|
break;
|
|
566
540
|
}
|
|
567
541
|
}
|
|
568
|
-
if (
|
|
542
|
+
if (result.name === OS.iOS && compareVersion(result.version, '18.6') === 0) {
|
|
569
543
|
var version = /\) Version\/([\d.]+)/.exec(Platform.userAgent);
|
|
570
544
|
if (version !== null && parseInt(version[1].substring(0, 2), 10) >= 26)
|
|
571
|
-
|
|
545
|
+
result.version = version[1];
|
|
546
|
+
}
|
|
547
|
+
if (Platform.userAgent === USER_AGENT) {
|
|
548
|
+
if (typeof parsedFromHighEntropyValuesOS.name !== 'undefined')
|
|
549
|
+
result.name = parsedFromHighEntropyValuesOS.name;
|
|
550
|
+
if (typeof parsedFromHighEntropyValuesOS.version !== 'undefined')
|
|
551
|
+
result.version = parsedFromHighEntropyValuesOS.version;
|
|
572
552
|
}
|
|
553
|
+
return result;
|
|
554
|
+
}
|
|
555
|
+
function getEngine() {
|
|
556
|
+
var result = { name: Engines.Unknown, version: '' };
|
|
573
557
|
for (var i = 0; i < ENGINE_RESOLVER_MAP.length; i++) {
|
|
574
558
|
var map = ENGINE_RESOLVER_MAP[i];
|
|
575
559
|
var regexp = map[0];
|
|
@@ -577,13 +561,21 @@ function init() {
|
|
|
577
561
|
var resolver = map[2];
|
|
578
562
|
var matched = Platform.userAgent.match(regexp);
|
|
579
563
|
if (matched !== null) {
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
version: resolveVersion(matched[1], resolver),
|
|
583
|
-
};
|
|
564
|
+
result.name = engine;
|
|
565
|
+
result.version = resolveVersion(matched[1], resolver);
|
|
584
566
|
break;
|
|
585
567
|
}
|
|
586
568
|
}
|
|
569
|
+
if (Platform.userAgent === USER_AGENT) {
|
|
570
|
+
if (typeof parsedFromHighEntropyValuesEngine.name !== 'undefined')
|
|
571
|
+
result.name = parsedFromHighEntropyValuesEngine.name;
|
|
572
|
+
if (typeof parsedFromHighEntropyValuesEngine.version !== 'undefined')
|
|
573
|
+
result.version = parsedFromHighEntropyValuesEngine.version;
|
|
574
|
+
}
|
|
575
|
+
return result;
|
|
576
|
+
}
|
|
577
|
+
function getBrowser() {
|
|
578
|
+
var result = { name: Browsers.Unknown, version: '' };
|
|
587
579
|
for (var i = 0; i < BROWSER_RESOLVER_MAP.length; i++) {
|
|
588
580
|
var map = BROWSER_RESOLVER_MAP[i];
|
|
589
581
|
var regexp = map[0];
|
|
@@ -591,102 +583,49 @@ function init() {
|
|
|
591
583
|
var resolver = map[2];
|
|
592
584
|
var matched = Platform.userAgent.match(regexp);
|
|
593
585
|
if (matched !== null) {
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
version: resolveVersion(matched[1], resolver),
|
|
597
|
-
};
|
|
586
|
+
result.name = browser;
|
|
587
|
+
result.version = resolveVersion(matched[1], resolver);
|
|
598
588
|
break;
|
|
599
589
|
}
|
|
600
590
|
}
|
|
601
|
-
if (Platform.
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
var release = '' + platform.Version;
|
|
607
|
-
var version = getSemanticVersion(release);
|
|
608
|
-
switch (os) {
|
|
609
|
-
case 'android':
|
|
610
|
-
Platform.os = {
|
|
611
|
-
name: OS.Android,
|
|
612
|
-
version: resolveSemanticAndroidVersion(version, release),
|
|
613
|
-
};
|
|
614
|
-
break;
|
|
615
|
-
case 'ios':
|
|
616
|
-
Platform.os = {
|
|
617
|
-
name: OS.iOS,
|
|
618
|
-
version: release,
|
|
619
|
-
};
|
|
620
|
-
break;
|
|
621
|
-
case 'windows':
|
|
622
|
-
Platform.os = {
|
|
623
|
-
name: OS.Windows,
|
|
624
|
-
version: resolveSemanticWindowsVersion(version, release),
|
|
625
|
-
};
|
|
626
|
-
break;
|
|
627
|
-
case 'macos':
|
|
628
|
-
Platform.os = {
|
|
629
|
-
name: OS.MacOS,
|
|
630
|
-
version: release,
|
|
631
|
-
};
|
|
632
|
-
break;
|
|
633
|
-
}
|
|
634
|
-
}
|
|
635
|
-
catch (_) {
|
|
636
|
-
}
|
|
637
|
-
finally {
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
if (Platform.isNode) {
|
|
641
|
-
try {
|
|
642
|
-
var os = require('os');
|
|
643
|
-
var platform = os.platform();
|
|
644
|
-
var release = os.release();
|
|
645
|
-
var version = getSemanticVersion(release);
|
|
646
|
-
switch (platform) {
|
|
647
|
-
case 'win32':
|
|
648
|
-
Platform.os = {
|
|
649
|
-
name: OS.Windows,
|
|
650
|
-
version: resolveSemanticWindowsVersion(version, release),
|
|
651
|
-
};
|
|
652
|
-
break;
|
|
653
|
-
case 'darwin':
|
|
654
|
-
Platform.os = {
|
|
655
|
-
name: OS.MacOS,
|
|
656
|
-
version: resolveSemanticDarwinVersion(version, release),
|
|
657
|
-
};
|
|
658
|
-
break;
|
|
659
|
-
case 'android':
|
|
660
|
-
Platform.os = {
|
|
661
|
-
name: OS.Android,
|
|
662
|
-
version: release,
|
|
663
|
-
};
|
|
664
|
-
break;
|
|
665
|
-
case 'linux':
|
|
666
|
-
if (/android/i.test(release)) {
|
|
667
|
-
Platform.os = {
|
|
668
|
-
name: OS.Android,
|
|
669
|
-
version: release,
|
|
670
|
-
};
|
|
671
|
-
}
|
|
672
|
-
break;
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
catch (_) {
|
|
676
|
-
}
|
|
677
|
-
finally {
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
if (typeof globalThis.document !== 'undefined') {
|
|
681
|
-
if (typeof globalThis.device !== 'undefined') {
|
|
682
|
-
parseOSFromCordova();
|
|
683
|
-
}
|
|
684
|
-
else {
|
|
685
|
-
globalThis.document.addEventListener("deviceready", parseOSFromCordova, false);
|
|
686
|
-
}
|
|
591
|
+
if (Platform.userAgent === USER_AGENT) {
|
|
592
|
+
if (typeof parsedFromHighEntropyValuesBrowser.name !== 'undefined')
|
|
593
|
+
result.name = parsedFromHighEntropyValuesBrowser.name;
|
|
594
|
+
if (typeof parsedFromHighEntropyValuesBrowser.version !== 'undefined')
|
|
595
|
+
result.version = parsedFromHighEntropyValuesBrowser.version;
|
|
687
596
|
}
|
|
597
|
+
return result;
|
|
598
|
+
}
|
|
599
|
+
function getDevice() {
|
|
600
|
+
if (Platform.userAgent === USER_AGENT && parsedFromHighEntropyValuesDevice !== null)
|
|
601
|
+
return parsedFromHighEntropyValuesDevice;
|
|
602
|
+
if (Platform.os.name === OS.iOS || Platform.os.name === OS.Android)
|
|
603
|
+
return Devices.Mobile;
|
|
604
|
+
if (Platform.os.name === OS.Windows || Platform.os.name === OS.MacOS)
|
|
605
|
+
return Devices.Desktop;
|
|
606
|
+
return Devices.Unknown;
|
|
607
|
+
}
|
|
608
|
+
function getIsWebview() {
|
|
609
|
+
return /; ?wv|applewebkit(?!.*safari)/i.test(Platform.userAgent);
|
|
610
|
+
}
|
|
611
|
+
function getIsNode() {
|
|
612
|
+
return typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && typeof globalThis.process.versions.node !== 'undefined';
|
|
613
|
+
}
|
|
614
|
+
function getIsStandalone() {
|
|
615
|
+
if (Platform.os.name === OS.iOS)
|
|
616
|
+
return 'standalone' in globalThis.navigator && !!globalThis.navigator.standalone;
|
|
617
|
+
if (!('matchMedia' in globalThis))
|
|
618
|
+
return false;
|
|
619
|
+
return globalThis.matchMedia('(display-mode: standalone)').matches;
|
|
620
|
+
}
|
|
621
|
+
function getIsBot() {
|
|
622
|
+
for (var i = 0; i < BOT_REGEXP.length; i++)
|
|
623
|
+
if (BOT_REGEXP[i].test(Platform.userAgent))
|
|
624
|
+
return true;
|
|
625
|
+
return false;
|
|
626
|
+
}
|
|
627
|
+
function parseFromHighEntropyValues() {
|
|
688
628
|
if (typeof globalThis.navigator !== 'undefined' && typeof globalThis.navigator.userAgentData !== 'undefined' && typeof globalThis.navigator.userAgentData.getHighEntropyValues !== 'undefined') {
|
|
689
|
-
incrementPendingTasks();
|
|
690
629
|
globalThis.navigator.userAgentData.getHighEntropyValues(['brands', 'fullVersionList', 'mobile', 'model', 'platform', 'platformVersion', 'architecture', 'formFactors', 'bitness', 'uaFullVersion', 'wow64'])
|
|
691
630
|
.then(function (result) {
|
|
692
631
|
try {
|
|
@@ -707,47 +646,43 @@ function init() {
|
|
|
707
646
|
if (prevBrandName === null || /Chrom/.test(prevBrandName) || !/Chrom/.test(brandName)) {
|
|
708
647
|
browserName = brandName;
|
|
709
648
|
if (browserName === 'Chrome' || browserName === 'Chrome WebView' || browserName === 'Chrome Headless')
|
|
710
|
-
|
|
649
|
+
parsedFromHighEntropyValuesBrowser.name = Browsers.Chrome;
|
|
711
650
|
else if (browserName === 'Edge' || browserName === 'Edge WebView2')
|
|
712
|
-
|
|
651
|
+
parsedFromHighEntropyValuesBrowser.name = Browsers.Edge;
|
|
713
652
|
else if (browserName === 'Opera Mobi')
|
|
714
|
-
|
|
715
|
-
|
|
653
|
+
parsedFromHighEntropyValuesBrowser.name = Browsers.Opera;
|
|
654
|
+
parsedFromHighEntropyValuesBrowser.version = brandVersion;
|
|
716
655
|
}
|
|
717
656
|
prevBrandName = brandName;
|
|
718
657
|
}
|
|
719
658
|
if (brandName === 'Chromium')
|
|
720
|
-
|
|
659
|
+
parsedFromHighEntropyValuesEngine.version = brandVersion;
|
|
721
660
|
}
|
|
722
661
|
if (typeof platformVersion === 'string') {
|
|
723
662
|
if (Platform.os.name === OS.Windows)
|
|
724
|
-
|
|
663
|
+
parsedFromHighEntropyValuesOS.version = parseInt(platformVersion.split('.')[0], 10) >= 13 ? '11' : '10';
|
|
725
664
|
else
|
|
726
|
-
|
|
665
|
+
parsedFromHighEntropyValuesOS.version = platformVersion;
|
|
727
666
|
}
|
|
728
667
|
if (typeof platform === 'string') {
|
|
729
668
|
if (/android/i.test(platform))
|
|
730
|
-
|
|
669
|
+
parsedFromHighEntropyValuesOS.name = OS.Android;
|
|
731
670
|
else if (/ios|iphone|ipad/i.test(platform))
|
|
732
|
-
|
|
671
|
+
parsedFromHighEntropyValuesOS.name = OS.iOS;
|
|
733
672
|
else if (/windows|win32/i.test(platform))
|
|
734
|
-
|
|
673
|
+
parsedFromHighEntropyValuesOS.name = OS.Windows;
|
|
735
674
|
else if (/macos|macintel/i.test(platform))
|
|
736
|
-
|
|
675
|
+
parsedFromHighEntropyValuesOS.name = OS.MacOS;
|
|
737
676
|
}
|
|
738
677
|
if (result.mobile === true)
|
|
739
|
-
|
|
678
|
+
parsedFromHighEntropyValuesDevice = Devices.Mobile;
|
|
740
679
|
}
|
|
741
680
|
catch (_) {
|
|
742
681
|
}
|
|
743
|
-
finally {
|
|
744
|
-
decrementPendingTasks();
|
|
745
|
-
}
|
|
746
682
|
});
|
|
747
683
|
}
|
|
748
|
-
checkReady();
|
|
749
684
|
}
|
|
750
|
-
|
|
685
|
+
parseFromHighEntropyValues();
|
|
751
686
|
|
|
752
687
|
var Fullscreen = {
|
|
753
688
|
get enabled() {
|
|
@@ -764,12 +699,11 @@ var Fullscreen = {
|
|
|
764
699
|
toggle: toggle,
|
|
765
700
|
onchange: onchange,
|
|
766
701
|
onerror: onerror,
|
|
702
|
+
Constants: {},
|
|
703
|
+
Errors: {},
|
|
767
704
|
};
|
|
768
705
|
var lastIOSVideo = null;
|
|
769
|
-
var lastElectronBrowserWindow = null;
|
|
770
|
-
var lastElectronBrowserWindowOptions = null;
|
|
771
706
|
var eventsBridged = false;
|
|
772
|
-
var api = detectApi();
|
|
773
707
|
var API_VARIANTS = {
|
|
774
708
|
standard: {
|
|
775
709
|
enabled: 'fullscreenEnabled',
|
|
@@ -800,9 +734,8 @@ var API_VARIANTS = {
|
|
|
800
734
|
events: { change: 'MSFullscreenChange', error: 'MSFullscreenError' },
|
|
801
735
|
},
|
|
802
736
|
};
|
|
737
|
+
var api = detectApi();
|
|
803
738
|
function detectApi() {
|
|
804
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron)
|
|
805
|
-
return null;
|
|
806
739
|
var element = globalThis.document.documentElement;
|
|
807
740
|
if ('fullscreenEnabled' in globalThis.document || 'exitFullscreen' in globalThis.document) {
|
|
808
741
|
return API_VARIANTS.standard;
|
|
@@ -832,14 +765,6 @@ function detectApi() {
|
|
|
832
765
|
return null;
|
|
833
766
|
}
|
|
834
767
|
function getDefaultTarget() {
|
|
835
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
|
|
836
|
-
var electron = require('electron');
|
|
837
|
-
var browserWindow = electron.BrowserWindow;
|
|
838
|
-
var focusedWindow = browserWindow.getFocusedWindow() || browserWindow.getAllWindows()[0];
|
|
839
|
-
if (typeof focusedWindow === 'undefined')
|
|
840
|
-
throw new Error();
|
|
841
|
-
return focusedWindow;
|
|
842
|
-
}
|
|
843
768
|
if (Platform.os.name === OS.iOS) {
|
|
844
769
|
var video = globalThis.document.querySelector('video');
|
|
845
770
|
if (video === null)
|
|
@@ -848,16 +773,6 @@ function getDefaultTarget() {
|
|
|
848
773
|
}
|
|
849
774
|
return globalThis.document.documentElement;
|
|
850
775
|
}
|
|
851
|
-
function restoreElectronBrowserWindowOptions() {
|
|
852
|
-
if (lastElectronBrowserWindowOptions !== null) {
|
|
853
|
-
if (lastElectronBrowserWindow !== null) {
|
|
854
|
-
lastElectronBrowserWindow.fullScreenable = lastElectronBrowserWindowOptions.fullScreenable;
|
|
855
|
-
lastElectronBrowserWindow.autoHideMenuBar = lastElectronBrowserWindowOptions.autoHideMenuBar;
|
|
856
|
-
}
|
|
857
|
-
lastElectronBrowserWindowOptions = null;
|
|
858
|
-
}
|
|
859
|
-
lastElectronBrowserWindow = null;
|
|
860
|
-
}
|
|
861
776
|
function bridgeEvents() {
|
|
862
777
|
if (eventsBridged)
|
|
863
778
|
return;
|
|
@@ -879,41 +794,6 @@ function bridgeEvents() {
|
|
|
879
794
|
function emitError() {
|
|
880
795
|
emit('fullscreenerror');
|
|
881
796
|
}
|
|
882
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
|
|
883
|
-
try {
|
|
884
|
-
var electron = require('electron');
|
|
885
|
-
var browserWindow = electron.BrowserWindow;
|
|
886
|
-
var allWindows = browserWindow.getAllWindows();
|
|
887
|
-
var _loop_1 = function (i) {
|
|
888
|
-
var currentWindow = allWindows[i];
|
|
889
|
-
currentWindow.on('enter-full-screen', function () {
|
|
890
|
-
lastElectronBrowserWindow = currentWindow;
|
|
891
|
-
emitChange();
|
|
892
|
-
});
|
|
893
|
-
currentWindow.on('leave-full-screen', function () {
|
|
894
|
-
restoreElectronBrowserWindowOptions();
|
|
895
|
-
emitChange();
|
|
896
|
-
});
|
|
897
|
-
};
|
|
898
|
-
for (var i = 0; i < allWindows.length; i++) {
|
|
899
|
-
_loop_1(i);
|
|
900
|
-
}
|
|
901
|
-
if (typeof browserWindow.on === 'function') {
|
|
902
|
-
browserWindow.on('browser-window-created', function (_, currentWindow) {
|
|
903
|
-
currentWindow.on('enter-full-screen', function () {
|
|
904
|
-
lastElectronBrowserWindow = currentWindow;
|
|
905
|
-
emitChange();
|
|
906
|
-
});
|
|
907
|
-
currentWindow.on('leave-full-screen', function () {
|
|
908
|
-
restoreElectronBrowserWindowOptions();
|
|
909
|
-
emitChange();
|
|
910
|
-
});
|
|
911
|
-
});
|
|
912
|
-
}
|
|
913
|
-
}
|
|
914
|
-
catch (_) {
|
|
915
|
-
}
|
|
916
|
-
}
|
|
917
797
|
var changeEvents = ['webkitfullscreenchange', 'mozfullscreenchange', 'MSFullscreenChange'];
|
|
918
798
|
var errorEvents = ['webkitfullscreenerror', 'mozfullscreenerror', 'MSFullscreenError'];
|
|
919
799
|
for (var i = 0; i < changeEvents.length; i++) {
|
|
@@ -950,16 +830,6 @@ function bridgeIOSVideoEvents() {
|
|
|
950
830
|
}
|
|
951
831
|
}
|
|
952
832
|
function getEnabled() {
|
|
953
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
|
|
954
|
-
try {
|
|
955
|
-
var electron = require('electron');
|
|
956
|
-
var browserWindow = electron.BrowserWindow;
|
|
957
|
-
return typeof browserWindow.prototype.setFullScreen === 'function';
|
|
958
|
-
}
|
|
959
|
-
catch (_) {
|
|
960
|
-
return false;
|
|
961
|
-
}
|
|
962
|
-
}
|
|
963
833
|
if (api === null) {
|
|
964
834
|
if (Platform.os.name !== OS.iOS)
|
|
965
835
|
return false;
|
|
@@ -977,24 +847,6 @@ function getEnabled() {
|
|
|
977
847
|
return typeof globalThis.document[api.element] !== 'undefined';
|
|
978
848
|
}
|
|
979
849
|
function getElement() {
|
|
980
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
|
|
981
|
-
if (lastElectronBrowserWindow !== null)
|
|
982
|
-
return lastElectronBrowserWindow;
|
|
983
|
-
try {
|
|
984
|
-
var electron = require('electron');
|
|
985
|
-
var browserWindow = electron.BrowserWindow;
|
|
986
|
-
var allWindows = browserWindow.getAllWindows();
|
|
987
|
-
for (var i = 0; i < allWindows.length; i++) {
|
|
988
|
-
var currentWindow = allWindows[i];
|
|
989
|
-
if (currentWindow.isFullScreen() || (Platform.os.name === OS.MacOS && typeof currentWindow.isSimpleFullScreen === 'function' && currentWindow.isSimpleFullScreen()))
|
|
990
|
-
return currentWindow;
|
|
991
|
-
}
|
|
992
|
-
return null;
|
|
993
|
-
}
|
|
994
|
-
catch (_) {
|
|
995
|
-
return null;
|
|
996
|
-
}
|
|
997
|
-
}
|
|
998
850
|
if (api === null) {
|
|
999
851
|
if (lastIOSVideo && lastIOSVideo.webkitDisplayingFullscreen)
|
|
1000
852
|
return lastIOSVideo;
|
|
@@ -1010,28 +862,6 @@ function getIsFullscreen() {
|
|
|
1010
862
|
}
|
|
1011
863
|
function request(target, options) {
|
|
1012
864
|
if (target === void 0) { target = getDefaultTarget(); }
|
|
1013
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
|
|
1014
|
-
var browserWindow_1 = target;
|
|
1015
|
-
return new Promise(function (resolve, reject) {
|
|
1016
|
-
try {
|
|
1017
|
-
if (lastElectronBrowserWindow === null) {
|
|
1018
|
-
lastElectronBrowserWindowOptions = {
|
|
1019
|
-
fullScreenable: browserWindow_1.fullScreenable,
|
|
1020
|
-
autoHideMenuBar: browserWindow_1.autoHideMenuBar,
|
|
1021
|
-
};
|
|
1022
|
-
browserWindow_1.fullScreenable = true;
|
|
1023
|
-
browserWindow_1.autoHideMenuBar = true;
|
|
1024
|
-
}
|
|
1025
|
-
browserWindow_1.setFullScreen(true);
|
|
1026
|
-
lastElectronBrowserWindow = browserWindow_1;
|
|
1027
|
-
resolve();
|
|
1028
|
-
return;
|
|
1029
|
-
}
|
|
1030
|
-
catch (_) {
|
|
1031
|
-
reject();
|
|
1032
|
-
}
|
|
1033
|
-
});
|
|
1034
|
-
}
|
|
1035
865
|
return new Promise(function (resolve, reject) {
|
|
1036
866
|
if (api !== null) {
|
|
1037
867
|
var method = target[api.request];
|
|
@@ -1082,25 +912,6 @@ function request(target, options) {
|
|
|
1082
912
|
});
|
|
1083
913
|
}
|
|
1084
914
|
function exit() {
|
|
1085
|
-
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
|
|
1086
|
-
return new Promise(function (resolve, reject) {
|
|
1087
|
-
try {
|
|
1088
|
-
if (lastElectronBrowserWindow !== null) {
|
|
1089
|
-
lastElectronBrowserWindow.setFullScreen(false);
|
|
1090
|
-
restoreElectronBrowserWindowOptions();
|
|
1091
|
-
}
|
|
1092
|
-
else {
|
|
1093
|
-
var browserWindow = getElement();
|
|
1094
|
-
if (browserWindow !== null)
|
|
1095
|
-
browserWindow.setFullScreen(false);
|
|
1096
|
-
}
|
|
1097
|
-
resolve();
|
|
1098
|
-
}
|
|
1099
|
-
catch (_) {
|
|
1100
|
-
reject();
|
|
1101
|
-
}
|
|
1102
|
-
});
|
|
1103
|
-
}
|
|
1104
915
|
return new Promise(function (resolve, reject) {
|
|
1105
916
|
if (api !== null) {
|
|
1106
917
|
var method = globalThis.document[api.exit];
|
|
@@ -1194,12 +1005,4 @@ function onerror(handler) {
|
|
|
1194
1005
|
}
|
|
1195
1006
|
bridgeEvents();
|
|
1196
1007
|
|
|
1197
|
-
|
|
1198
|
-
installed: false,
|
|
1199
|
-
name: 'Fullscreen',
|
|
1200
|
-
module: Fullscreen,
|
|
1201
|
-
Constants: {},
|
|
1202
|
-
Errors: {}
|
|
1203
|
-
};
|
|
1204
|
-
|
|
1205
|
-
module.exports = NativeFullscreenPlugin;
|
|
1008
|
+
module.exports = Fullscreen;
|