native-fn 1.0.38 → 1.0.39
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 +7 -1
- package/dist/native.cjs +23 -2
- package/dist/native.min.cjs +1 -1
- package/dist/native.min.mjs +1 -1
- package/dist/native.mjs +23 -2
- package/dist/native.umd.js +23 -2
- package/dist/native.umd.min.js +1 -1
- package/dist/plugin/app/index.cjs +352 -192
- package/dist/plugin/app/index.d.ts +12 -18
- package/dist/plugin/app/index.min.cjs +1 -1
- package/dist/plugin/app/index.min.mjs +1 -1
- package/dist/plugin/app/index.mjs +352 -192
- package/dist/plugin/app/index.umd.js +352 -192
- package/dist/plugin/app/index.umd.min.js +1 -1
- package/dist/plugin/app/src/constants/platform.d.ts +17 -2
- package/dist/plugin/app/src/errors/plugin-not-extended-error.d.ts +2 -0
- package/dist/plugin/app/src/plugin/app/constants/app.d.ts +1 -2
- package/dist/plugin/app/src/plugin/app/cores/app.d.ts +1 -1
- package/dist/plugin/app/src/plugin/app/index.d.ts +5 -5
- package/dist/plugin/app/src/plugin/app/types/app.d.ts +7 -16
- package/dist/plugin/app/src/plugin/app/types/index.d.ts +4 -4
- package/dist/plugin/app/src/plugin/camera/constants/camera.d.ts +4 -0
- package/dist/plugin/app/src/plugin/camera/cores/camera.d.ts +3 -0
- package/dist/plugin/app/src/plugin/camera/index.d.ts +8 -0
- package/dist/plugin/app/src/plugin/camera/types/camera.d.ts +4 -0
- package/dist/plugin/app/src/plugin/camera/types/index.d.ts +13 -0
- package/dist/plugin/app/src/plugin/camera/utils/try-open-camera.d.ts +2 -0
- package/dist/plugin/app/src/plugin/clipboard/constants/clipboard.d.ts +4 -0
- package/dist/plugin/app/src/plugin/clipboard/cores/clipboard.d.ts +3 -0
- package/dist/plugin/app/src/plugin/clipboard/errors/unsupported-color-error.d.ts +2 -0
- package/dist/plugin/app/src/plugin/clipboard/index.d.ts +5 -0
- package/dist/plugin/app/src/plugin/clipboard/types/clipboard.d.ts +4 -0
- package/dist/plugin/app/src/plugin/clipboard/types/index.d.ts +11 -0
- package/dist/plugin/app/src/plugin/clipboard/utils/copy.d.ts +1 -0
- package/dist/plugin/app/src/plugin/clipboard/utils/html-string-to-plain-string.d.ts +1 -0
- package/dist/plugin/app/src/plugin/fullscreen/cores/fullscreen.d.ts +3 -0
- package/dist/plugin/app/src/plugin/fullscreen/index.d.ts +5 -0
- package/dist/plugin/app/src/plugin/fullscreen/types/fullscreen.d.ts +10 -0
- package/dist/plugin/app/src/plugin/fullscreen/types/index.d.ts +11 -0
- package/dist/plugin/app/src/plugin/media/constants/media.d.ts +5 -0
- package/dist/plugin/app/src/plugin/media/cores/media.d.ts +3 -0
- package/dist/plugin/app/src/plugin/media/index.d.ts +5 -0
- package/dist/plugin/app/src/plugin/media/types/index.d.ts +13 -0
- package/dist/plugin/app/src/plugin/media/types/media.d.ts +4 -0
- package/dist/plugin/app/src/plugin/media/utils/try-open-camera.d.ts +2 -0
- package/dist/plugin/app/src/plugin/platform/cores/platform.d.ts +1 -1
- package/dist/plugin/app/src/plugin/platform/index.d.ts +9 -3
- package/dist/plugin/app/src/plugin/platform/types/index.d.ts +2 -2
- package/dist/plugin/app/src/plugin/platform/types/platform.d.ts +3 -1
- package/dist/plugin/app/src/plugin/theme/constants/theme.d.ts +1 -3
- package/dist/plugin/app/src/plugin/theme/cores/theme.d.ts +1 -1
- package/dist/plugin/app/src/plugin/theme/index.d.ts +5 -5
- package/dist/plugin/app/src/plugin/theme/types/index.d.ts +4 -4
- package/dist/plugin/app/src/plugin/theme/types/theme.d.ts +7 -7
- package/dist/plugin/app/src/plugin/theme/utils/parse-color.d.ts +1 -1
- package/dist/plugin/app/src/plugin/theme/utils/parse-easing-function.d.ts +1 -1
- package/dist/plugin/app/src/types/clipboard-utils.d.ts +4 -0
- package/dist/plugin/app/src/types/event-listener-util.d.ts +11 -0
- package/dist/plugin/app/src/types/index.d.ts +1 -1
- package/dist/plugin/app/src/types/native.d.ts +5 -0
- package/dist/plugin/app/src/utils/clipboard-utils.d.ts +4 -0
- package/dist/plugin/app/src/utils/compare-version.d.ts +1 -0
- package/dist/plugin/app/src/utils/create-hidden-element.d.ts +1 -0
- package/dist/plugin/app/src/utils/dispatch-click-event.d.ts +1 -0
- package/dist/plugin/app/src/utils/event-listener-utils.d.ts +3 -0
- package/dist/plugin/app/src/utils/fullscreen-utils.d.ts +44 -0
- package/dist/plugin/app/src/utils/get-tag-name.d.ts +1 -0
- package/dist/plugin/app/src/utils/get-topmost-window.d.ts +1 -0
- package/dist/plugin/app/src/utils/is-secure-context.d.ts +1 -0
- package/dist/plugin/camera/index.cjs +377 -0
- package/dist/plugin/camera/index.d.ts +34 -0
- package/dist/plugin/camera/index.min.cjs +1 -0
- package/dist/plugin/camera/index.min.mjs +1 -0
- package/dist/plugin/camera/index.mjs +375 -0
- package/dist/plugin/camera/index.umd.js +383 -0
- package/dist/plugin/camera/index.umd.min.js +1 -0
- package/dist/plugin/camera/src/constants/platform.d.ts +50 -0
- package/dist/plugin/camera/src/constants/user-agent.d.ts +1 -0
- package/dist/plugin/camera/src/errors/plugin-not-extended-error.d.ts +2 -0
- package/dist/plugin/camera/src/errors/url-open-error.d.ts +2 -0
- package/dist/plugin/camera/src/plugin/app/constants/app.d.ts +12 -0
- package/dist/plugin/camera/src/plugin/app/cores/app.d.ts +3 -0
- package/dist/plugin/camera/src/plugin/app/errors/url-open-error.d.ts +2 -0
- package/dist/plugin/camera/src/plugin/app/index.d.ts +12 -0
- package/dist/plugin/camera/src/plugin/app/types/app.d.ts +45 -0
- package/dist/plugin/camera/src/plugin/app/types/index.d.ts +16 -0
- package/dist/plugin/camera/src/plugin/app/utils/try-open-url.d.ts +1 -0
- package/dist/plugin/camera/src/plugin/camera/constants/camera.d.ts +4 -0
- package/dist/plugin/camera/src/plugin/camera/cores/camera.d.ts +3 -0
- package/dist/plugin/camera/src/plugin/camera/index.d.ts +8 -0
- package/dist/plugin/camera/src/plugin/camera/types/camera.d.ts +4 -0
- package/dist/plugin/camera/src/plugin/camera/types/index.d.ts +13 -0
- package/dist/plugin/camera/src/plugin/camera/utils/try-open-camera.d.ts +2 -0
- package/dist/plugin/camera/src/plugin/clipboard/constants/clipboard.d.ts +4 -0
- package/dist/plugin/camera/src/plugin/clipboard/cores/clipboard.d.ts +3 -0
- package/dist/plugin/camera/src/plugin/clipboard/errors/unsupported-color-error.d.ts +2 -0
- package/dist/plugin/camera/src/plugin/clipboard/index.d.ts +5 -0
- package/dist/plugin/camera/src/plugin/clipboard/types/clipboard.d.ts +4 -0
- package/dist/plugin/camera/src/plugin/clipboard/types/index.d.ts +11 -0
- package/dist/plugin/camera/src/plugin/clipboard/utils/copy.d.ts +1 -0
- package/dist/plugin/camera/src/plugin/clipboard/utils/html-string-to-plain-string.d.ts +1 -0
- package/dist/plugin/camera/src/plugin/fullscreen/cores/fullscreen.d.ts +3 -0
- package/dist/plugin/camera/src/plugin/fullscreen/index.d.ts +5 -0
- package/dist/plugin/camera/src/plugin/fullscreen/types/fullscreen.d.ts +10 -0
- package/dist/plugin/camera/src/plugin/fullscreen/types/index.d.ts +11 -0
- package/dist/plugin/camera/src/plugin/platform/cores/platform.d.ts +3 -0
- package/dist/plugin/camera/src/plugin/platform/index.d.ts +11 -0
- package/dist/plugin/camera/src/plugin/platform/types/index.d.ts +7 -0
- package/dist/plugin/camera/src/plugin/platform/types/platform.d.ts +15 -0
- package/dist/plugin/camera/src/plugin/theme/constants/theme.d.ts +14 -0
- package/dist/plugin/camera/src/plugin/theme/cores/theme.d.ts +3 -0
- package/dist/plugin/camera/src/plugin/theme/errors/easing-error.d.ts +6 -0
- package/dist/plugin/camera/src/plugin/theme/errors/unsupported-color-error.d.ts +2 -0
- package/dist/plugin/camera/src/plugin/theme/index.d.ts +17 -0
- package/dist/plugin/camera/src/plugin/theme/types/color.d.ts +17 -0
- package/dist/plugin/camera/src/plugin/theme/types/easing-syntax.d.ts +16 -0
- package/dist/plugin/camera/src/plugin/theme/types/index.d.ts +23 -0
- package/dist/plugin/camera/src/plugin/theme/types/theme.d.ts +23 -0
- package/dist/plugin/camera/src/plugin/theme/utils/parse-color.d.ts +2 -0
- package/dist/plugin/camera/src/plugin/theme/utils/parse-easing-function.d.ts +2 -0
- package/dist/plugin/camera/src/types/clipboard-utils.d.ts +4 -0
- package/dist/plugin/camera/src/types/event-listener-util.d.ts +11 -0
- package/dist/plugin/camera/src/types/index.d.ts +1 -0
- package/dist/plugin/camera/src/types/native.d.ts +27 -0
- package/dist/plugin/camera/src/utils/assign.d.ts +1 -0
- package/dist/plugin/camera/src/utils/clipboard-utils.d.ts +4 -0
- package/dist/plugin/camera/src/utils/compare-version.d.ts +1 -0
- package/dist/plugin/camera/src/utils/create-custom-error.d.ts +1 -0
- package/dist/plugin/camera/src/utils/create-hidden-element.d.ts +1 -0
- package/dist/plugin/camera/src/utils/dispatch-click-event.d.ts +1 -0
- package/dist/plugin/camera/src/utils/event-listener-utils.d.ts +3 -0
- package/dist/plugin/camera/src/utils/fullscreen-utils.d.ts +44 -0
- package/dist/plugin/camera/src/utils/get-tag-name.d.ts +1 -0
- package/dist/plugin/camera/src/utils/get-topmost-window.d.ts +1 -0
- package/dist/plugin/camera/src/utils/is-secure-context.d.ts +1 -0
- package/dist/plugin/clipboard/index.cjs +491 -0
- package/dist/plugin/clipboard/index.d.ts +27 -0
- package/dist/plugin/clipboard/index.min.cjs +1 -0
- package/dist/plugin/clipboard/index.min.mjs +1 -0
- package/dist/plugin/clipboard/index.mjs +489 -0
- package/dist/plugin/clipboard/index.umd.js +497 -0
- package/dist/plugin/clipboard/index.umd.min.js +1 -0
- package/dist/plugin/clipboard/src/constants/platform.d.ts +50 -0
- package/dist/plugin/clipboard/src/constants/user-agent.d.ts +1 -0
- package/dist/plugin/clipboard/src/errors/plugin-not-extended-error.d.ts +2 -0
- package/dist/plugin/clipboard/src/errors/url-open-error.d.ts +2 -0
- package/dist/plugin/clipboard/src/plugin/app/constants/app.d.ts +12 -0
- package/dist/plugin/clipboard/src/plugin/app/cores/app.d.ts +3 -0
- package/dist/plugin/clipboard/src/plugin/app/errors/url-open-error.d.ts +2 -0
- package/dist/plugin/clipboard/src/plugin/app/index.d.ts +12 -0
- package/dist/plugin/clipboard/src/plugin/app/types/app.d.ts +45 -0
- package/dist/plugin/clipboard/src/plugin/app/types/index.d.ts +16 -0
- package/dist/plugin/clipboard/src/plugin/app/utils/try-open-url.d.ts +1 -0
- package/dist/plugin/clipboard/src/plugin/camera/constants/camera.d.ts +4 -0
- package/dist/plugin/clipboard/src/plugin/camera/cores/camera.d.ts +3 -0
- package/dist/plugin/clipboard/src/plugin/camera/index.d.ts +8 -0
- package/dist/plugin/clipboard/src/plugin/camera/types/camera.d.ts +4 -0
- package/dist/plugin/clipboard/src/plugin/camera/types/index.d.ts +13 -0
- package/dist/plugin/clipboard/src/plugin/camera/utils/try-open-camera.d.ts +2 -0
- package/dist/plugin/clipboard/src/plugin/clipboard/constants/clipboard.d.ts +4 -0
- package/dist/plugin/clipboard/src/plugin/clipboard/cores/clipboard.d.ts +3 -0
- package/dist/plugin/clipboard/src/plugin/clipboard/errors/unsupported-color-error.d.ts +2 -0
- package/dist/plugin/clipboard/src/plugin/clipboard/index.d.ts +5 -0
- package/dist/plugin/clipboard/src/plugin/clipboard/types/clipboard.d.ts +4 -0
- package/dist/plugin/clipboard/src/plugin/clipboard/types/index.d.ts +11 -0
- package/dist/plugin/clipboard/src/plugin/clipboard/utils/copy.d.ts +1 -0
- package/dist/plugin/clipboard/src/plugin/clipboard/utils/html-string-to-plain-string.d.ts +1 -0
- package/dist/plugin/clipboard/src/plugin/fullscreen/cores/fullscreen.d.ts +3 -0
- package/dist/plugin/clipboard/src/plugin/fullscreen/index.d.ts +5 -0
- package/dist/plugin/clipboard/src/plugin/fullscreen/types/fullscreen.d.ts +10 -0
- package/dist/plugin/clipboard/src/plugin/fullscreen/types/index.d.ts +11 -0
- package/dist/plugin/clipboard/src/plugin/platform/cores/platform.d.ts +3 -0
- package/dist/plugin/clipboard/src/plugin/platform/index.d.ts +11 -0
- package/dist/plugin/clipboard/src/plugin/platform/types/index.d.ts +7 -0
- package/dist/plugin/clipboard/src/plugin/platform/types/platform.d.ts +15 -0
- package/dist/plugin/clipboard/src/plugin/theme/constants/theme.d.ts +14 -0
- package/dist/plugin/clipboard/src/plugin/theme/cores/theme.d.ts +3 -0
- package/dist/plugin/clipboard/src/plugin/theme/errors/easing-error.d.ts +6 -0
- package/dist/plugin/clipboard/src/plugin/theme/errors/unsupported-color-error.d.ts +2 -0
- package/dist/plugin/clipboard/src/plugin/theme/index.d.ts +17 -0
- package/dist/plugin/clipboard/src/plugin/theme/types/color.d.ts +17 -0
- package/dist/plugin/clipboard/src/plugin/theme/types/easing-syntax.d.ts +16 -0
- package/dist/plugin/clipboard/src/plugin/theme/types/index.d.ts +23 -0
- package/dist/plugin/clipboard/src/plugin/theme/types/theme.d.ts +23 -0
- package/dist/plugin/clipboard/src/plugin/theme/utils/parse-color.d.ts +2 -0
- package/dist/plugin/clipboard/src/plugin/theme/utils/parse-easing-function.d.ts +2 -0
- package/dist/plugin/clipboard/src/types/clipboard-utils.d.ts +4 -0
- package/dist/plugin/clipboard/src/types/event-listener-util.d.ts +11 -0
- package/dist/plugin/clipboard/src/types/index.d.ts +1 -0
- package/dist/plugin/clipboard/src/types/native.d.ts +27 -0
- package/dist/plugin/clipboard/src/utils/assign.d.ts +1 -0
- package/dist/plugin/clipboard/src/utils/clipboard-utils.d.ts +4 -0
- package/dist/plugin/clipboard/src/utils/compare-version.d.ts +1 -0
- package/dist/plugin/clipboard/src/utils/create-custom-error.d.ts +1 -0
- package/dist/plugin/clipboard/src/utils/create-hidden-element.d.ts +1 -0
- package/dist/plugin/clipboard/src/utils/dispatch-click-event.d.ts +1 -0
- package/dist/plugin/clipboard/src/utils/event-listener-utils.d.ts +3 -0
- package/dist/plugin/clipboard/src/utils/fullscreen-utils.d.ts +44 -0
- package/dist/plugin/clipboard/src/utils/get-tag-name.d.ts +1 -0
- package/dist/plugin/clipboard/src/utils/get-topmost-window.d.ts +1 -0
- package/dist/plugin/clipboard/src/utils/is-secure-context.d.ts +1 -0
- package/dist/plugin/fullscreen/index.cjs +521 -0
- package/dist/plugin/fullscreen/index.d.ts +33 -0
- package/dist/plugin/fullscreen/index.min.cjs +1 -0
- package/dist/plugin/fullscreen/index.min.mjs +1 -0
- package/dist/plugin/fullscreen/index.mjs +519 -0
- package/dist/plugin/fullscreen/index.umd.js +527 -0
- package/dist/plugin/fullscreen/index.umd.min.js +1 -0
- package/dist/plugin/fullscreen/src/constants/platform.d.ts +50 -0
- package/dist/plugin/fullscreen/src/constants/user-agent.d.ts +1 -0
- package/dist/plugin/fullscreen/src/errors/plugin-not-extended-error.d.ts +2 -0
- package/dist/plugin/fullscreen/src/errors/url-open-error.d.ts +2 -0
- package/dist/plugin/fullscreen/src/plugin/app/constants/app.d.ts +12 -0
- package/dist/plugin/fullscreen/src/plugin/app/cores/app.d.ts +3 -0
- package/dist/plugin/fullscreen/src/plugin/app/errors/url-open-error.d.ts +2 -0
- package/dist/plugin/fullscreen/src/plugin/app/index.d.ts +12 -0
- package/dist/plugin/fullscreen/src/plugin/app/types/app.d.ts +45 -0
- package/dist/plugin/fullscreen/src/plugin/app/types/index.d.ts +16 -0
- package/dist/plugin/fullscreen/src/plugin/app/utils/try-open-url.d.ts +1 -0
- package/dist/plugin/fullscreen/src/plugin/camera/constants/camera.d.ts +4 -0
- package/dist/plugin/fullscreen/src/plugin/camera/cores/camera.d.ts +3 -0
- package/dist/plugin/fullscreen/src/plugin/camera/index.d.ts +8 -0
- package/dist/plugin/fullscreen/src/plugin/camera/types/camera.d.ts +4 -0
- package/dist/plugin/fullscreen/src/plugin/camera/types/index.d.ts +13 -0
- package/dist/plugin/fullscreen/src/plugin/camera/utils/try-open-camera.d.ts +2 -0
- package/dist/plugin/fullscreen/src/plugin/clipboard/cores/clipboard.d.ts +3 -0
- package/dist/plugin/fullscreen/src/plugin/clipboard/index.d.ts +5 -0
- package/dist/plugin/fullscreen/src/plugin/clipboard/types/clipboard.d.ts +4 -0
- package/dist/plugin/fullscreen/src/plugin/clipboard/types/index.d.ts +11 -0
- package/dist/plugin/fullscreen/src/plugin/fullscreen/cores/fullscreen.d.ts +3 -0
- package/dist/plugin/fullscreen/src/plugin/fullscreen/index.d.ts +5 -0
- package/dist/plugin/fullscreen/src/plugin/fullscreen/types/fullscreen.d.ts +10 -0
- package/dist/plugin/fullscreen/src/plugin/fullscreen/types/index.d.ts +11 -0
- package/dist/plugin/fullscreen/src/plugin/platform/cores/platform.d.ts +3 -0
- package/dist/plugin/fullscreen/src/plugin/platform/index.d.ts +11 -0
- package/dist/plugin/fullscreen/src/plugin/platform/types/index.d.ts +7 -0
- package/dist/plugin/fullscreen/src/plugin/platform/types/platform.d.ts +15 -0
- package/dist/plugin/fullscreen/src/plugin/theme/constants/theme.d.ts +14 -0
- package/dist/plugin/fullscreen/src/plugin/theme/cores/theme.d.ts +3 -0
- package/dist/plugin/fullscreen/src/plugin/theme/errors/easing-error.d.ts +6 -0
- package/dist/plugin/fullscreen/src/plugin/theme/errors/unsupported-color-error.d.ts +2 -0
- package/dist/plugin/fullscreen/src/plugin/theme/index.d.ts +17 -0
- package/dist/plugin/fullscreen/src/plugin/theme/types/color.d.ts +17 -0
- package/dist/plugin/fullscreen/src/plugin/theme/types/easing-syntax.d.ts +16 -0
- package/dist/plugin/fullscreen/src/plugin/theme/types/index.d.ts +23 -0
- package/dist/plugin/fullscreen/src/plugin/theme/types/theme.d.ts +23 -0
- package/dist/plugin/fullscreen/src/plugin/theme/utils/parse-color.d.ts +2 -0
- package/dist/plugin/fullscreen/src/plugin/theme/utils/parse-easing-function.d.ts +2 -0
- package/dist/plugin/fullscreen/src/types/clipboard-utils.d.ts +4 -0
- package/dist/plugin/fullscreen/src/types/event-listener-util.d.ts +11 -0
- package/dist/plugin/fullscreen/src/types/index.d.ts +1 -0
- package/dist/plugin/fullscreen/src/types/native.d.ts +27 -0
- package/dist/plugin/fullscreen/src/utils/assign.d.ts +1 -0
- package/dist/plugin/fullscreen/src/utils/clipboard-utils.d.ts +4 -0
- package/dist/plugin/fullscreen/src/utils/compare-version.d.ts +1 -0
- package/dist/plugin/fullscreen/src/utils/create-custom-error.d.ts +1 -0
- package/dist/plugin/fullscreen/src/utils/create-hidden-element.d.ts +1 -0
- package/dist/plugin/fullscreen/src/utils/dispatch-click-event.d.ts +1 -0
- package/dist/plugin/fullscreen/src/utils/event-listener-utils.d.ts +3 -0
- package/dist/plugin/fullscreen/src/utils/fullscreen-utils.d.ts +44 -0
- package/dist/plugin/fullscreen/src/utils/get-tag-name.d.ts +1 -0
- package/dist/plugin/fullscreen/src/utils/get-topmost-window.d.ts +1 -0
- package/dist/plugin/fullscreen/src/utils/is-secure-context.d.ts +1 -0
- package/dist/plugin/media/index.cjs +241 -0
- package/dist/plugin/media/index.d.ts +33 -0
- package/dist/plugin/media/index.min.cjs +1 -0
- package/dist/plugin/media/index.min.mjs +1 -0
- package/dist/plugin/media/index.mjs +239 -0
- package/dist/plugin/media/index.umd.js +247 -0
- package/dist/plugin/media/index.umd.min.js +1 -0
- package/dist/plugin/media/src/constants/platform.d.ts +35 -0
- package/dist/plugin/media/src/constants/user-agent.d.ts +1 -0
- package/dist/plugin/media/src/errors/url-open-error.d.ts +2 -0
- package/dist/plugin/media/src/plugin/app/constants/app.d.ts +13 -0
- package/dist/plugin/media/src/plugin/app/cores/app.d.ts +3 -0
- package/dist/plugin/media/src/plugin/app/errors/url-open-error.d.ts +2 -0
- package/dist/plugin/media/src/plugin/app/index.d.ts +12 -0
- package/dist/plugin/media/src/plugin/app/types/app.d.ts +43 -0
- package/dist/plugin/media/src/plugin/app/types/index.d.ts +16 -0
- package/dist/plugin/media/src/plugin/app/utils/try-open-url.d.ts +1 -0
- package/dist/plugin/media/src/plugin/media/constants/media.d.ts +5 -0
- package/dist/plugin/media/src/plugin/media/cores/media.d.ts +3 -0
- package/dist/plugin/media/src/plugin/media/index.d.ts +5 -0
- package/dist/plugin/media/src/plugin/media/types/index.d.ts +13 -0
- package/dist/plugin/media/src/plugin/media/types/media.d.ts +4 -0
- package/dist/plugin/media/src/plugin/media/utils/try-open-camera.d.ts +2 -0
- package/dist/plugin/media/src/plugin/platform/cores/platform.d.ts +3 -0
- package/dist/plugin/media/src/plugin/platform/index.d.ts +5 -0
- package/dist/plugin/media/src/plugin/platform/types/index.d.ts +7 -0
- package/dist/plugin/media/src/plugin/platform/types/platform.d.ts +13 -0
- package/dist/plugin/media/src/plugin/theme/constants/theme.d.ts +16 -0
- package/dist/plugin/media/src/plugin/theme/cores/theme.d.ts +3 -0
- package/dist/plugin/media/src/plugin/theme/errors/easing-error.d.ts +6 -0
- package/dist/plugin/media/src/plugin/theme/errors/unsupported-color-error.d.ts +2 -0
- package/dist/plugin/media/src/plugin/theme/index.d.ts +17 -0
- package/dist/plugin/media/src/plugin/theme/types/color.d.ts +17 -0
- package/dist/plugin/media/src/plugin/theme/types/easing-syntax.d.ts +16 -0
- package/dist/plugin/media/src/plugin/theme/types/index.d.ts +23 -0
- package/dist/plugin/media/src/plugin/theme/types/theme.d.ts +23 -0
- package/dist/plugin/media/src/plugin/theme/utils/parse-color.d.ts +2 -0
- package/dist/plugin/media/src/plugin/theme/utils/parse-easing-function.d.ts +2 -0
- package/dist/plugin/media/src/types/event-listener-util.d.ts +11 -0
- package/dist/plugin/media/src/types/index.d.ts +2 -0
- package/dist/plugin/media/src/types/native.d.ts +27 -0
- package/dist/plugin/media/src/utils/assign.d.ts +1 -0
- package/dist/plugin/media/src/utils/create-custom-error.d.ts +1 -0
- package/dist/plugin/media/src/utils/dispatch-click-event.d.ts +1 -0
- package/dist/plugin/media/src/utils/event-listener-utils.d.ts +3 -0
- package/dist/plugin/media/src/utils/get-topmost-window.d.ts +1 -0
- package/dist/plugin/platform/index.cjs +164 -62
- package/dist/plugin/platform/index.d.ts +21 -1
- package/dist/plugin/platform/index.min.cjs +1 -1
- package/dist/plugin/platform/index.min.mjs +1 -1
- package/dist/plugin/platform/index.mjs +164 -62
- package/dist/plugin/platform/index.umd.js +164 -62
- package/dist/plugin/platform/index.umd.min.js +1 -1
- package/dist/plugin/platform/src/constants/platform.d.ts +17 -2
- package/dist/plugin/platform/src/errors/plugin-not-extended-error.d.ts +2 -0
- package/dist/plugin/platform/src/plugin/app/constants/app.d.ts +1 -2
- package/dist/plugin/platform/src/plugin/app/cores/app.d.ts +1 -1
- package/dist/plugin/platform/src/plugin/app/index.d.ts +5 -5
- package/dist/plugin/platform/src/plugin/app/types/app.d.ts +7 -16
- package/dist/plugin/platform/src/plugin/app/types/index.d.ts +4 -4
- package/dist/plugin/platform/src/plugin/camera/constants/camera.d.ts +4 -0
- package/dist/plugin/platform/src/plugin/camera/cores/camera.d.ts +3 -0
- package/dist/plugin/platform/src/plugin/camera/index.d.ts +8 -0
- package/dist/plugin/platform/src/plugin/camera/types/camera.d.ts +4 -0
- package/dist/plugin/platform/src/plugin/camera/types/index.d.ts +13 -0
- package/dist/plugin/platform/src/plugin/camera/utils/try-open-camera.d.ts +2 -0
- package/dist/plugin/platform/src/plugin/clipboard/constants/clipboard.d.ts +4 -0
- package/dist/plugin/platform/src/plugin/clipboard/cores/clipboard.d.ts +3 -0
- package/dist/plugin/platform/src/plugin/clipboard/errors/unsupported-color-error.d.ts +2 -0
- package/dist/plugin/platform/src/plugin/clipboard/index.d.ts +5 -0
- package/dist/plugin/platform/src/plugin/clipboard/types/clipboard.d.ts +4 -0
- package/dist/plugin/platform/src/plugin/clipboard/types/index.d.ts +11 -0
- package/dist/plugin/platform/src/plugin/clipboard/utils/copy.d.ts +1 -0
- package/dist/plugin/platform/src/plugin/clipboard/utils/html-string-to-plain-string.d.ts +1 -0
- package/dist/plugin/platform/src/plugin/fullscreen/cores/fullscreen.d.ts +3 -0
- package/dist/plugin/platform/src/plugin/fullscreen/index.d.ts +5 -0
- package/dist/plugin/platform/src/plugin/fullscreen/types/fullscreen.d.ts +10 -0
- package/dist/plugin/platform/src/plugin/fullscreen/types/index.d.ts +11 -0
- package/dist/plugin/platform/src/plugin/media/constants/media.d.ts +5 -0
- package/dist/plugin/platform/src/plugin/media/cores/media.d.ts +3 -0
- package/dist/plugin/platform/src/plugin/media/index.d.ts +5 -0
- package/dist/plugin/platform/src/plugin/media/types/index.d.ts +13 -0
- package/dist/plugin/platform/src/plugin/media/types/media.d.ts +4 -0
- package/dist/plugin/platform/src/plugin/media/utils/try-open-camera.d.ts +2 -0
- package/dist/plugin/platform/src/plugin/platform/cores/platform.d.ts +1 -1
- package/dist/plugin/platform/src/plugin/platform/index.d.ts +9 -3
- package/dist/plugin/platform/src/plugin/platform/types/index.d.ts +2 -2
- package/dist/plugin/platform/src/plugin/platform/types/platform.d.ts +3 -1
- package/dist/plugin/platform/src/plugin/theme/constants/theme.d.ts +1 -3
- package/dist/plugin/platform/src/plugin/theme/cores/theme.d.ts +1 -1
- package/dist/plugin/platform/src/plugin/theme/index.d.ts +5 -5
- package/dist/plugin/platform/src/plugin/theme/types/index.d.ts +4 -4
- package/dist/plugin/platform/src/plugin/theme/types/theme.d.ts +7 -7
- package/dist/plugin/platform/src/plugin/theme/utils/parse-color.d.ts +1 -1
- package/dist/plugin/platform/src/plugin/theme/utils/parse-easing-function.d.ts +1 -1
- package/dist/plugin/platform/src/types/clipboard-utils.d.ts +4 -0
- package/dist/plugin/platform/src/types/event-listener-util.d.ts +11 -0
- package/dist/plugin/platform/src/types/index.d.ts +1 -1
- package/dist/plugin/platform/src/types/native.d.ts +5 -0
- package/dist/plugin/platform/src/utils/clipboard-utils.d.ts +4 -0
- package/dist/plugin/platform/src/utils/compare-version.d.ts +1 -0
- package/dist/plugin/platform/src/utils/create-hidden-element.d.ts +1 -0
- package/dist/plugin/platform/src/utils/dispatch-click-event.d.ts +1 -0
- package/dist/plugin/platform/src/utils/event-listener-utils.d.ts +3 -0
- package/dist/plugin/platform/src/utils/fullscreen-utils.d.ts +44 -0
- package/dist/plugin/platform/src/utils/get-tag-name.d.ts +1 -0
- package/dist/plugin/platform/src/utils/get-topmost-window.d.ts +1 -0
- package/dist/plugin/platform/src/utils/is-secure-context.d.ts +1 -0
- package/dist/plugin/theme/index.cjs +317 -50
- package/dist/plugin/theme/index.d.ts +5 -5
- package/dist/plugin/theme/index.min.cjs +1 -1
- package/dist/plugin/theme/index.min.mjs +1 -1
- package/dist/plugin/theme/index.mjs +317 -50
- package/dist/plugin/theme/index.umd.js +317 -50
- package/dist/plugin/theme/index.umd.min.js +1 -1
- package/dist/plugin/theme/src/constants/platform.d.ts +17 -2
- package/dist/plugin/theme/src/errors/plugin-not-extended-error.d.ts +2 -0
- package/dist/plugin/theme/src/plugin/app/constants/app.d.ts +1 -2
- package/dist/plugin/theme/src/plugin/app/cores/app.d.ts +1 -1
- package/dist/plugin/theme/src/plugin/app/index.d.ts +5 -5
- package/dist/plugin/theme/src/plugin/app/types/app.d.ts +7 -16
- package/dist/plugin/theme/src/plugin/app/types/index.d.ts +4 -4
- package/dist/plugin/theme/src/plugin/camera/constants/camera.d.ts +4 -0
- package/dist/plugin/theme/src/plugin/camera/cores/camera.d.ts +3 -0
- package/dist/plugin/theme/src/plugin/camera/index.d.ts +8 -0
- package/dist/plugin/theme/src/plugin/camera/types/camera.d.ts +4 -0
- package/dist/plugin/theme/src/plugin/camera/types/index.d.ts +13 -0
- package/dist/plugin/theme/src/plugin/camera/utils/try-open-camera.d.ts +2 -0
- package/dist/plugin/theme/src/plugin/clipboard/constants/clipboard.d.ts +4 -0
- package/dist/plugin/theme/src/plugin/clipboard/cores/clipboard.d.ts +3 -0
- package/dist/plugin/theme/src/plugin/clipboard/errors/unsupported-color-error.d.ts +2 -0
- package/dist/plugin/theme/src/plugin/clipboard/index.d.ts +5 -0
- package/dist/plugin/theme/src/plugin/clipboard/types/clipboard.d.ts +4 -0
- package/dist/plugin/theme/src/plugin/clipboard/types/index.d.ts +11 -0
- package/dist/plugin/theme/src/plugin/clipboard/utils/copy.d.ts +1 -0
- package/dist/plugin/theme/src/plugin/clipboard/utils/html-string-to-plain-string.d.ts +1 -0
- package/dist/plugin/theme/src/plugin/fullscreen/cores/fullscreen.d.ts +3 -0
- package/dist/plugin/theme/src/plugin/fullscreen/index.d.ts +5 -0
- package/dist/plugin/theme/src/plugin/fullscreen/types/fullscreen.d.ts +10 -0
- package/dist/plugin/theme/src/plugin/fullscreen/types/index.d.ts +11 -0
- package/dist/plugin/theme/src/plugin/media/constants/media.d.ts +5 -0
- package/dist/plugin/theme/src/plugin/media/cores/media.d.ts +3 -0
- package/dist/plugin/theme/src/plugin/media/index.d.ts +5 -0
- package/dist/plugin/theme/src/plugin/media/types/index.d.ts +13 -0
- package/dist/plugin/theme/src/plugin/media/types/media.d.ts +4 -0
- package/dist/plugin/theme/src/plugin/media/utils/try-open-camera.d.ts +2 -0
- package/dist/plugin/theme/src/plugin/platform/cores/platform.d.ts +1 -1
- package/dist/plugin/theme/src/plugin/platform/index.d.ts +9 -3
- package/dist/plugin/theme/src/plugin/platform/types/index.d.ts +2 -2
- package/dist/plugin/theme/src/plugin/platform/types/platform.d.ts +3 -1
- package/dist/plugin/theme/src/plugin/theme/constants/theme.d.ts +1 -3
- package/dist/plugin/theme/src/plugin/theme/cores/theme.d.ts +1 -1
- package/dist/plugin/theme/src/plugin/theme/index.d.ts +5 -5
- package/dist/plugin/theme/src/plugin/theme/types/index.d.ts +4 -4
- package/dist/plugin/theme/src/plugin/theme/types/theme.d.ts +7 -7
- package/dist/plugin/theme/src/plugin/theme/utils/parse-color.d.ts +1 -1
- package/dist/plugin/theme/src/plugin/theme/utils/parse-easing-function.d.ts +1 -1
- package/dist/plugin/theme/src/types/clipboard-utils.d.ts +4 -0
- package/dist/plugin/theme/src/types/event-listener-util.d.ts +11 -0
- package/dist/plugin/theme/src/types/index.d.ts +1 -1
- package/dist/plugin/theme/src/types/native.d.ts +5 -0
- package/dist/plugin/theme/src/utils/clipboard-utils.d.ts +4 -0
- package/dist/plugin/theme/src/utils/compare-version.d.ts +1 -0
- package/dist/plugin/theme/src/utils/create-hidden-element.d.ts +1 -0
- package/dist/plugin/theme/src/utils/dispatch-click-event.d.ts +1 -0
- package/dist/plugin/theme/src/utils/event-listener-utils.d.ts +3 -0
- package/dist/plugin/theme/src/utils/fullscreen-utils.d.ts +44 -0
- package/dist/plugin/theme/src/utils/get-tag-name.d.ts +1 -0
- package/dist/plugin/theme/src/utils/get-topmost-window.d.ts +1 -0
- package/dist/plugin/theme/src/utils/is-secure-context.d.ts +1 -0
- package/dist/src/constants/platform.d.ts +17 -2
- package/dist/src/errors/plugin-not-extended-error.d.ts +2 -0
- package/dist/src/plugin/app/constants/app.d.ts +1 -2
- package/dist/src/plugin/app/cores/app.d.ts +1 -1
- package/dist/src/plugin/app/index.d.ts +5 -5
- package/dist/src/plugin/app/types/app.d.ts +7 -16
- package/dist/src/plugin/app/types/index.d.ts +4 -4
- package/dist/src/plugin/camera/constants/camera.d.ts +4 -0
- package/dist/src/plugin/camera/cores/camera.d.ts +3 -0
- package/dist/src/plugin/camera/index.d.ts +8 -0
- package/dist/src/plugin/camera/types/camera.d.ts +4 -0
- package/dist/src/plugin/camera/types/index.d.ts +13 -0
- package/dist/src/plugin/camera/utils/try-open-camera.d.ts +2 -0
- package/dist/src/plugin/clipboard/constants/clipboard.d.ts +4 -0
- package/dist/src/plugin/clipboard/cores/clipboard.d.ts +3 -0
- package/dist/src/plugin/clipboard/errors/unsupported-color-error.d.ts +2 -0
- package/dist/src/plugin/clipboard/index.d.ts +5 -0
- package/dist/src/plugin/clipboard/types/clipboard.d.ts +4 -0
- package/dist/src/plugin/clipboard/types/index.d.ts +11 -0
- package/dist/src/plugin/clipboard/utils/copy.d.ts +1 -0
- package/dist/src/plugin/clipboard/utils/html-string-to-plain-string.d.ts +1 -0
- package/dist/src/plugin/fullscreen/cores/fullscreen.d.ts +3 -0
- package/dist/src/plugin/fullscreen/index.d.ts +5 -0
- package/dist/src/plugin/fullscreen/types/fullscreen.d.ts +10 -0
- package/dist/src/plugin/fullscreen/types/index.d.ts +11 -0
- package/dist/src/plugin/media/constants/media.d.ts +5 -0
- package/dist/src/plugin/media/cores/media.d.ts +3 -0
- package/dist/src/plugin/media/index.d.ts +5 -0
- package/dist/src/plugin/media/types/index.d.ts +13 -0
- package/dist/src/plugin/media/types/media.d.ts +4 -0
- package/dist/src/plugin/media/utils/try-open-camera.d.ts +2 -0
- package/dist/src/plugin/platform/cores/platform.d.ts +1 -1
- package/dist/src/plugin/platform/index.d.ts +9 -3
- package/dist/src/plugin/platform/types/index.d.ts +2 -2
- package/dist/src/plugin/platform/types/platform.d.ts +3 -1
- package/dist/src/plugin/theme/constants/theme.d.ts +1 -3
- package/dist/src/plugin/theme/cores/theme.d.ts +1 -1
- package/dist/src/plugin/theme/index.d.ts +5 -5
- package/dist/src/plugin/theme/types/index.d.ts +4 -4
- package/dist/src/plugin/theme/types/theme.d.ts +7 -7
- package/dist/src/plugin/theme/utils/parse-color.d.ts +1 -1
- package/dist/src/plugin/theme/utils/parse-easing-function.d.ts +1 -1
- package/dist/src/types/clipboard-utils.d.ts +4 -0
- package/dist/src/types/event-listener-util.d.ts +11 -0
- package/dist/src/types/index.d.ts +1 -1
- package/dist/src/types/native.d.ts +5 -0
- package/dist/src/utils/clipboard-utils.d.ts +4 -0
- package/dist/src/utils/compare-version.d.ts +1 -0
- package/dist/src/utils/create-hidden-element.d.ts +1 -0
- package/dist/src/utils/dispatch-click-event.d.ts +1 -0
- package/dist/src/utils/event-listener-utils.d.ts +3 -0
- package/dist/src/utils/fullscreen-utils.d.ts +44 -0
- package/dist/src/utils/get-tag-name.d.ts +1 -0
- package/dist/src/utils/get-topmost-window.d.ts +1 -0
- package/dist/src/utils/is-secure-context.d.ts +1 -0
- package/package.json +22 -1
|
@@ -6,6 +6,9 @@ declare interface NativePlugin<Key extends string, Module, Constants extends Rec
|
|
|
6
6
|
Errors: Errors;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
declare global {
|
|
10
|
+
const process: unknown;
|
|
11
|
+
}
|
|
9
12
|
declare enum OS {
|
|
10
13
|
Unknown = "Unknown",
|
|
11
14
|
Android = "Android",
|
|
@@ -21,26 +24,15 @@ declare enum AppOpenState {
|
|
|
21
24
|
Fallback = 3,
|
|
22
25
|
Store = 4
|
|
23
26
|
}
|
|
24
|
-
declare enum
|
|
27
|
+
declare enum MessengerType {
|
|
25
28
|
Telephone = "telephone",
|
|
26
29
|
Message = "message",
|
|
27
30
|
Mail = "mail"
|
|
28
31
|
}
|
|
29
32
|
|
|
30
|
-
declare interface EventListenerUtil {
|
|
31
|
-
useStd: boolean;
|
|
32
|
-
add: (target: any, eventListenerOptions: EventListenerOptions) => void;
|
|
33
|
-
remove: (target: any, eventListenerOptions: EventListenerOptions) => void;
|
|
34
|
-
withVender: (target: any, type?: string) => string;
|
|
35
|
-
}
|
|
36
|
-
declare interface EventListenerOptions {
|
|
37
|
-
type?: string;
|
|
38
|
-
callback: EventListenerOrEventListenerObject | null;
|
|
39
|
-
options?: AddEventListenerOptions | boolean;
|
|
40
|
-
}
|
|
41
33
|
declare interface AppInfo {
|
|
42
34
|
scheme?: URLCandidate;
|
|
43
|
-
fallback?:
|
|
35
|
+
fallback?: URLCandidateOrFallback;
|
|
44
36
|
timeout?: number;
|
|
45
37
|
allowWebStore?: boolean;
|
|
46
38
|
}
|
|
@@ -65,6 +57,8 @@ declare interface AppOpenOptions {
|
|
|
65
57
|
[OS.MacOS]?: MacOSAppInfo;
|
|
66
58
|
}
|
|
67
59
|
declare type URLCandidate = URL | string;
|
|
60
|
+
declare type URLCandidateOrFallback = URLCandidate | (() => any);
|
|
61
|
+
declare type URLStringOrFallback = string | (() => any);
|
|
68
62
|
declare type Stringifiable = string | number | boolean | HTMLElement | null | undefined;
|
|
69
63
|
declare type StringifiableSequence = Stringifiable[] | NodeList | NodeListOf<Node> | HTMLCollectionBase;
|
|
70
64
|
declare type MessengerOpenOptions = {
|
|
@@ -74,9 +68,9 @@ declare type MessengerOpenOptions = {
|
|
|
74
68
|
subject?: Stringifiable;
|
|
75
69
|
body?: Stringifiable;
|
|
76
70
|
} | HTMLFormElement | FormData;
|
|
77
|
-
declare type Messenger = Record<
|
|
71
|
+
declare type Messenger = Record<MessengerType, (options: MessengerOpenOptions) => Promise<void>>;
|
|
78
72
|
declare interface AppInstance {
|
|
79
|
-
open
|
|
73
|
+
open(options: AppOpenOptions): Promise<AppOpenState>;
|
|
80
74
|
messenger: Messenger;
|
|
81
75
|
}
|
|
82
76
|
|
|
@@ -88,7 +82,7 @@ declare module 'native-fn' {
|
|
|
88
82
|
}
|
|
89
83
|
interface NativeConstants {
|
|
90
84
|
AppOpenState: typeof AppOpenState;
|
|
91
|
-
Messengers: typeof
|
|
85
|
+
Messengers: typeof MessengerType;
|
|
92
86
|
}
|
|
93
87
|
interface NativeErrors {
|
|
94
88
|
URLOpenError: typeof URLOpenError;
|
|
@@ -97,10 +91,10 @@ declare module 'native-fn' {
|
|
|
97
91
|
|
|
98
92
|
declare const NativeAppPlugin: NativePlugin<'App', AppInstance, {
|
|
99
93
|
AppOpenState: typeof AppOpenState;
|
|
100
|
-
Messengers: typeof
|
|
94
|
+
Messengers: typeof MessengerType;
|
|
101
95
|
}, {
|
|
102
96
|
URLOpenError: typeof URLOpenError;
|
|
103
97
|
}>;
|
|
104
98
|
|
|
105
99
|
export { NativeAppPlugin as default };
|
|
106
|
-
export type { AndroidAppInfo, AppInfo, AppInstance, AppOpenOptions,
|
|
100
|
+
export type { AndroidAppInfo, AppInfo, AppInstance, AppOpenOptions, IOSAppInfo, MacOSAppInfo, Messenger, MessengerOpenOptions, Stringifiable, StringifiableSequence, URLCandidate, URLCandidateOrFallback, URLStringOrFallback, WindowsAppInfo };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,t,n=navigator.userAgent;!function(e){e[e.Scheme=0]="Scheme",e[e.Universal=1]="Universal",e[e.Intent=2]="Intent",e[e.Fallback=3]="Fallback",e[e.Store=4]="Store"}(e||(e={})),function(e){e.Telephone="telephone",e.Message="message",e.Mail="mail"}(t||(t={}));var i,o,r,a=!/firefox|opr/i.test(n);!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(i||(i={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(o||(o={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(r||(r={}));var c=function(){function e(e){return void 0===e?"":e.replace(/_/g,".")}function t(e){if(void 0===e)return"";var t={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==t?t:e}function n(e){return void 0===e?"":e}return[[/android\w*[-\/.; ]?([\d.]*)/i,i.Android,o.Mobile,n],[/microsoft windows (vista|xp)/i,i.Windows,o.Desktop,n],[/windows (?:phone(?: os)?|mobile|iot)[\/ ]?([.\w ]*)/i,i.Windows,o.Desktop,t],[/windows nt 6\.2; (arm)/i,i.Windows,o.Desktop,t],[/windows[\/ ]([ntce\d. ]+\w)(?!.+xbox)/i,i.Windows,o.Desktop,t],[/(?:win(?=[39n])|win 9x )([nt\d.]+)/i,i.Windows,o.Desktop,t],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,i.iOS,o.Mobile,e],[/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d.]+)/i,i.iOS,o.Mobile,e],[/cfnetwork\/.+darwin/i,i.iOS,o.Mobile,n],[/mac os x ?([\w. ]*)/i,i.MacOS,o.Desktop,e],[/(?:macintosh|mac_powerpc\b)(?!.+haiku)/i,i.MacOS,o.Desktop,e]]}(),u=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],s=i.Unknown,d="";o.Unknown;r.Unknown;for(var l=0;l<c.length;l++){var f=(b=c[l])[0],p=b[1],v=b[2],h=b[3];if(null!==(m=n.match(f))){s=p,d=h(m[1]);break}}for(l=0;l<u.length;l++){var b,m;f=(b=u[l])[0];if(b[1],null!==(m=n.match(f))){m[1];break}}function y(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var i="",o=0;o<t.length-2;o++){var r=t[o];void 0!==r&&(i=i+r.charAt(0).toUpperCase()+r.slice(1))}return i}function w(){this.returnValue=!1}function g(){this.cancelBubble=!0}!function(){var e=document.createElement("canvas");if("function"!=typeof e.getContext)return"";var t=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===t)return"";if(t instanceof WebGLRenderingContext||"getParameter"in t&&"function"==typeof t.getParameter){var n=t.getExtension("WEBGL_debug_renderer_info");return null===n?t.getParameter(t.RENDERER):t.getParameter(n.UNMASKED_RENDERER_WEBGL)}}(),o.Mobile,o.Desktop,s===i.iOS?"standalone"in navigator&&navigator.standalone:window.matchMedia("(display-mode: standalone)").matches;var k={useStd:"undefined"!=typeof document&&"function"==typeof document.addEventListener,add:function(e,t){void 0===t&&(t={callback:null,options:!1});var n=t.callback;if(void 0!==e&&null!==n){var i=this.withVender(e,t.type),o=t.options;if("function"==typeof e.addEventListener)try{return e.addEventListener(i,n,o)}catch(e){}if("function"==typeof e.addListener)if("boolean"==typeof e.matches)try{return e.addListener(n)}catch(e){}else try{return e.addListener(i,n)}catch(e){}return"function"==typeof e.attachEvent?n.__ieWrapper?e.attachEvent("on"+i,n.__ieWrapper):e.attachEvent("on"+i,n.__ieWrapper=function(t){void 0===t&&(t=window.event),void 0!==t&&(t.currentTarget=e,"function"!=typeof t.preventDefault&&(t.preventDefault=w),"function"!=typeof t.stopPropagation&&(t.stopPropagation=g),"function"==typeof n?n.call(e,t):n&&"function"==typeof n.handleEvent&&n.handleEvent.call(e,t))}):void 0}},remove:function(e,t){void 0===t&&(t={callback:null,options:!1});var n=t.callback;if(void 0!==e&&null!==n){var i=this.withVender(e,t.type),o=t.options;if("function"==typeof e.removeEventListener)try{return e.removeEventListener(i,n,o)}catch(e){}if("function"==typeof e.removeListener)if("boolean"==typeof e.matches)try{return e.removeListener(n)}catch(e){}else try{return e.removeListener(i,n)}catch(e){}if("function"!=typeof e.detachEvent);else{var r=n.__ieWrapper;void 0!==r&&(e.detachEvent("on"+i,r),delete n.__ieWrapper)}}},withVender:function(e,t){if(void 0===t)return"";var n,i=/(animation)(start|iteration|end|cancel)|(transition)(start|run|end|cancel)|(fullscreen)(change|error)|(lost|got)(pointer)(capture)|(pointer)(lock)(change|error)|(pointer)(cancel|down|enter|leave|move|out|over|up)/i,o=["","webkit","moz","ms","MS","o","O"];n="wheel"===t?["wheel","mousewheel","DOMMouseScroll"]:"focus"===t?["focus","focusin"]:"blur"===t?["blur","focusout"]:i.test(t)?[t,t.replace(i,y)]:[t];for(var r=0;r<o.length;r++)for(var a=0;a<n.length;a++){var c=o[r]+n[a];if(void 0!==e["on"+c])return c}return""}};function S(){try{if(window.top&&window.top!==window)return window.top.location.href,window.top}catch(e){}return window}function E(e){var t=S(),n=void 0;try{(n=document.createElement("iframe")).src=e,n.width=n.height=n.frameBorder="0",n.setAttribute("aria-hidden","true"),n.style.display="none",n.style.position="absolute",n.style.top="-9999px",n.style.left="-9999px",t.document.body.appendChild(n),window.setTimeout((function(){if(void 0!==n)try{t.document.body.removeChild(n)}catch(e){}}),500)}catch(e){}}function T(e){return"function"==typeof e.hasFocus&&e.hasFocus()}function O(e){try{e.focus({preventScroll:!0})}catch(t){try{e.focus()}catch(e){}}}function M(e,t,n){var o=S(),r=o.document,a={focus:void 0,blur:void 0,visibilitychange:void 0},c={focus:void 0,blur:void 0,visibilitychange:void 0};return s===i.iOS?parseInt(d)>=8?(c={visibilitychange:r},a={visibilitychange:"visibilitychange"}):(c={focus:o,blur:o},a={focus:"pageshow",blur:"pagehide"}):k.useStd?(c={focus:o,blur:o,visibilitychange:r},a={focus:"focus",blur:"blur",visibilitychange:"visibilitychange"}):(c={focus:r,blur:r,visibilitychange:r},a={focus:"focus",blur:"blur",visibilitychange:"visibilitychange"}),new Promise((function(i,o){var u,s=!1;function d(e){if(!s){s=!0;try{!function(){void 0!==u&&(clearTimeout(u),u=void 0);try{k.remove(c.blur,{type:a.blur,callback:l}),k.remove(c.focus,{type:a.focus,callback:f}),k.remove(c.visibilitychange,{type:a.visibilitychange,callback:p})}catch(e){}}(),e?i():o()}catch(e){i()}}}function l(){void 0!==u&&(clearTimeout(u),u=void 0),k.remove(c.blur,{type:a.blur,callback:l}),k.add(c.focus,{type:a.focus,callback:f})}function f(){d(!0)}function p(){(function(){var e=S().document;return"hidden"===e.visibilityState||"hidden"===e.webkitVisibilityState||"hidden"===e.mozVisibilityState||"hidden"===e.msVisibilityState||(void 0!==e.hidden?e.hidden:void 0!==e.webkitHidden?e.webkitHidden:void 0!==e.mozHidden?e.mozHidden:void 0!==e.msHidden?e.msHidden:"function"!=typeof e.hasFocus||!e.hasFocus())})()&&d(!0)}u=window.setTimeout((function(){d(!1)}),n),k.add(c.blur,{type:a.blur,callback:l}),k.add(c.visibilitychange,{type:a.visibilitychange,callback:p}),T(r)||function(){var e=S(),t=e.document;if(O(e),T(t))return!0;if(t.body.tabIndex<0&&(t.body.tabIndex=-1),O(t.body),T(t))return!0;var n=void 0;try{(n=t.createElement("input")).type="text",n.readOnly=!0,n.tabIndex=-1,n.setAttribute("aria-hidden","true"),n.style.position="fixed",n.style.width=n.style.height="1px",n.style.top=n.style.left="0",n.style.opacity="0",n.style.zIndex="-1",t.body.appendChild(n),O(n);try{n.select()}catch(e){}if(T(t))return!0}catch(e){}finally{if(void 0!==n){try{n.blur()}catch(e){}try{t.body.removeChild(n)}catch(e){}}}T(t)}();try{!function(e,t){var n=S(),i=void 0;try{if(0===t)return void(n.location.href=e);(i=n.document.createElement("a")).href=e,i.setAttribute("aria-hidden","true"),i.style.display="none",n.document.body.appendChild(i);var o=void 0;try{o=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:n})}catch(e){(o=n.document.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,n,0,0,0,0,0,!1,!1,!1,!1,0,null)}i.dispatchEvent(o)}catch(e){}finally{if(void 0!==i)try{n.document.body.removeChild(i)}catch(e){}}}(e,t),E(e)}catch(e){d(!1)}}))}var W,L=function(e,t){function n(i){if(!(this instanceof n))return new n(i);var o=new t(i||"");if("function"==typeof Object.setPrototypeOf?Object.setPrototypeOf(o,n.prototype):o.__proto__=n.prototype,o.name=e,void 0!==i&&(o.message=i),"undefined"!=typeof Symbol&&Symbol.toStringTag)try{Object.defineProperty(o,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})}catch(e){}if("function"==typeof Error.captureStackTrace)Error.captureStackTrace(o,n);else if(t.captureStackTrace&&"function"==typeof t.captureStackTrace)t.captureStackTrace(o,n);else try{var r=new t;r.stack&&(o.stack=r.stack)}catch(e){}return o}void 0===t&&(t=Error),n.prototype=Object.create(t.prototype,{constructor:{value:n,writable:!0,enumerable:!1,configurable:!0}});try{Object.defineProperty(n.prototype,"name",{value:e,writable:!0,enumerable:!1,configurable:!0})}catch(t){try{n.prototype.name=e}catch(e){}}try{Object.defineProperty(n,"name",{value:e,writable:!1,enumerable:!1,configurable:!0})}catch(e){}return n}("URLOpenError"),A={open:function(t){var n,o=s,r=[],c=[];function u(){for(var e="",t=0;t<r.length;t++)e+="\n"+(t+1)+": "+c[t];return e.length>0&&(e="\n"+e+"\n"),new L("Failed to open any of the provided URLs: "+e)}if(o===i.Android){if(void 0===(g=t[i.Android]))return Promise.reject(u());n=g.timeout;var l=D(g.scheme),f=D(g.intent),p=g.packageName,v=D(g.fallback),h=g.allowWebStore;if(void 0!==f&&(void 0===l||void 0===p||void 0===v)){var b=function(e){for(var t={},n=e.split("#Intent;"),i=n[0].substring(9),o=n[1],r=o.substring(0,o.length-4).split(";"),a={},c=0;c<r.length;c++){var u=r[c],s=u.indexOf("=");-1!==s&&(a[u.substring(0,s)]=u.substring(s+1))}void 0!==a.scheme&&(t.scheme=a.scheme+"://"+i);void 0!==a.package&&(t.packageName=a.package);void 0!==a["S.browser_fallback_url"]&&(t.fallback=a["S.browser_fallback_url"]);return t}(f);void 0!==b.scheme&&void 0===l&&(l=b.scheme),void 0!==b.packageName&&void 0===p&&(p=b.packageName),void 0!==b.fallback&&void 0===v&&(v=b.fallback)}void 0!==l&&void 0===f&&(f=function(e,t,n){var o=e.split("://"),r=o[0],a=o[1],c="intent://";void 0!==a&&(c+=a);c=c+"#Intent;scheme="+r+";action=android.intent.action.VIEW;category=android.intent.category.BROWSABLE;",void 0!==t&&(c=c+"package="+t+";");void 0!==n&&"string"==typeof n?c=c+"S.browser_fallback_url="+n+";":void 0!==t&&(c=c+"S.browser_fallback_url="+x(t,i.Android)+";");return c+"end"}(l,p,v)),void 0!==f&&a&&r.push([f,e.Intent]),void 0!==l&&r.push([l,e.Scheme]),void 0!==v&&r.push([v,e.Fallback]),void 0!==p&&r.push([x(p,i.Android),e.Store]),void 0!==p&&!0===h&&r.push([N(p,i.Android),e.Store])}else if(o===i.iOS){if(void 0===(g=t[i.iOS]))return Promise.reject(u());n=g.timeout;l=D(g.scheme),p=g.bundleId;var m=g.trackId,y=D(g.universal);v=D(g.fallback),h=g.allowWebStore;void 0!==p&&void 0===m&&(m=_(p)),void 0!==y&&parseInt(d)>=9&&r.push([y,e.Universal]),void 0!==l&&r.push([l,e.Scheme]),void 0!==v&&r.push([v,e.Fallback]),void 0!==m&&r.push([x(m,i.iOS),e.Store]),void 0!==m&&!0===h&&r.push([N(m,i.iOS),e.Store])}else if(o===i.Windows){if(void 0===(g=t[i.Windows]))return Promise.reject(u());n=g.timeout;l=D(g.scheme);var w=g.productId;v=D(g.fallback),h=g.allowWebStore;void 0!==l&&r.push([l,e.Scheme]),void 0!==v&&r.push([v,e.Fallback]),void 0!==w&&r.push([x(w,i.Windows),e.Store]),void 0!==w&&!0===h&&r.push([N(w,i.Windows),e.Store])}else if(o===i.MacOS){var g;if(void 0===(g=t[i.MacOS]))return Promise.reject(u());n=g.timeout;l=D(g.scheme),p=g.bundleId,m=g.trackId,v=D(g.fallback),h=g.allowWebStore;void 0!==p&&void 0===m&&(m=_(p)),void 0!==l&&r.push([l,e.Scheme]),void 0!==v&&r.push([v,e.Fallback]),void 0!==m&&r.push([x(m,i.MacOS),e.Store]),void 0!==m&&!0===h&&r.push([N(m,i.MacOS),e.Store])}void 0===n&&(n=P(o));return new Promise((function(e,t){return function i(o){if(void 0===o&&(o=0),o>=r.length)return t(u());var a=r[o],s=a[0];if("string"==typeof s)return c[o]=s,M(s,o,n).then((function(){e(a[1])})).catch((function(){i(o+1)}));c[o]="[function fallback]",s(),e(a[1])}()}))},messenger:(W={},W[t.Telephone]=function(e){return j(e,"tel")},W[t.Message]=function(e){return j(e,"sms")},W[t.Mail]=function(e){return j(e,"mailto")},W)};function _(e){try{var t=new XMLHttpRequest;if(t.open("GET","https://itunes.apple.com/lookup?bundleId="+e,!1),t.send(),200===t.status)try{var n=JSON.parse(t.response);if(void 0===n.results)return;var i=n.results;if(!Array.isArray(i)||0===i.length)return;var o=i[0];if(void 0===o)return;return o.trackId}catch(e){return}return}catch(e){return}}function x(e,t){switch(t){case i.Android:return"market://details?id="+e;case i.iOS:return"itms-apps://itunes.apple.com/app/id"+e+"?mt=8";case i.Windows:return"ms-windows-store://pdp/?ProductId="+e;case i.MacOS:return"macappstore://itunes.apple.com/app/id"+e+"?mt=12";default:throw new L('Unsupported OS: "'+n+'"')}}function N(e,t){switch(t){case i.Android:return"https://play.google.com/store/apps/details?id="+e;case i.iOS:return"https://itunes.apple.com/app/id"+e+"?mt=8";case i.Windows:return"https://apps.microsoft.com/detail/"+e;case i.MacOS:return"https://apps.apple.com/app/id"+e+"?mt=12";default:throw new L('Unsupported OS: "'+n+'"')}}function P(e){switch(e){case i.iOS:return 2e3;case i.Android:return 1e3;default:return 750}}function I(e,t,n){void 0===n&&(n=",");for(var i=e.length,o="",r=0;r<i;r++)o+=t(e[r]),r!==i-1&&(o+=n);return o}function U(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16)}))}function D(e){return e instanceof URL?e.toString():e}function F(e){if("string"==typeof e)return U(e);if("number"==typeof e||"boolean"==typeof e)return U(String(e));if(null==e)return"";if(function(e){if(null==e||"string"==typeof e)return!1;var t=e.length;return"number"==typeof t&&t>=0&&!(t%1)}(e))return I(e,(function(e){return F(e)}));if(e instanceof HTMLInputElement){var t=e.type;if("checkbox"===t)return U(e.checked.toString());if("radio"===t)return e.checked?U(e.value):"";if("file"===t){var n=e.files;return null===n?"":I(n,(function(e){return U(e.name)}))}return U(e.value)}return e instanceof HTMLSelectElement?e.multiple?I(e.selectedOptions,(function(e){return U(e.value)})):U(e.value):e instanceof HTMLTextAreaElement?U(e.value):e instanceof HTMLElement?U(e.innerText):e instanceof Node?F(e.textContent):U(e.toString())}function H(e){if(e instanceof HTMLFormElement)return H(new FormData(e));if(e instanceof FormData){var t={};return e.forEach((function(e,n){var i;if(i=e instanceof File?e.name:e,Object.prototype.hasOwnProperty.call(t,n)){var o=t[n];Array.isArray(o)?o.push(i):t[n]=[o,i]}else t[n]=i})),H(t)}for(var n={},i=Object.keys(e),o=0;o<i.length;o++){var r=i[o];n[r]=F(e[r])}return void 0===n.to&&(n.to=""),void 0===n.cc&&(n.cc=""),void 0===n.bcc&&(n.bcc=""),void 0===n.subject&&(n.subject=""),void 0===n.body&&(n.body=""),n}function j(e,t){return M(t+":"+(e=H(e)).to+"?cc="+e.cc+"&bcc="+e.bcc+"&subject="+e.subject+"&body="+e.body,0,P(s))}var C={installed:!1,name:"App",module:A,Constants:{AppOpenState:e,Messengers:t},Errors:{URLOpenError:L}};module.exports=C;
|
|
1
|
+
"use strict";var e,t;!function(e){e[e.Scheme=0]="Scheme",e[e.Universal=1]="Universal",e[e.Intent=2]="Intent",e[e.Fallback=3]="Fallback",e[e.Store=4]="Store"}(e||(e={})),function(e){e.Telephone="telephone",e.Message="message",e.Mail="mail"}(t||(t={}));var n,i,r,o,a=navigator.userAgent;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(n||(n={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(i||(i={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(r||(r={})),function(e){e.Unknown="Unknown",e.Chrome="Chrome",e.Safari="Safari",e.Edge="Edge",e.Firefox="Firefox",e.Opera="Opera",e.IE="IE",e.SamsungInternet="SamsungInternet"}(o||(o={}));i.Unknown;var c=n.Unknown,l="";r.Unknown;var s=o.Unknown,d="";function u(e){if(void 0===e)return"";var t={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==t?t:e}function f(e){return void 0===e?"":e.replace(/_/g,".")}function p(e,t){return"function"==typeof t?t(e):"string"==typeof t?t:void 0===e?"":e}for(var v=[[/windows nt (6\.[23]); arm/i,n.Windows,u],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,n.Windows,u],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,n.Windows,u],[/windows nt ?([\d.)]*)(?!.+xbox)/i,n.Windows,u],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,n.Windows,u],[/windows ce\/?([\d.]*)/i,n.Windows,u],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,n.iOS,f],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,n.iOS,f],[/cfnetwork\/.+darwin/i,n.iOS,f],[/mac os x ?([\w. ]*)/i,n.MacOS,f],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,n.MacOS,f],[/droid ([\w.]+)\b.+(android[- ]x86)/i,n.Android],[/android\w*[-\/.; ]?([\d.]*)/i,n.Android]],b=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],h=[[/\b(?:crmo|crios)\/([\w.]+)/i,o.Chrome],[/webview.+edge\/([\w.]+)/i,o.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,o.Edge],[/opera mini\/([-\w.]+)/i,o.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,o.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,o.Opera],[/opios[\/ ]+([\w.]+)/i,o.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,o.Opera],[/\bopr\/([\w.]+)/i,o.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,o.IE],[/(?:ms|\()ie ([\w.]+)/i,o.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,o.IE],[/\bfocus\/([\w.]+)/i,o.Firefox],[/\bopt\/([\w.]+)/i,o.Opera],[/coast\/([\w.]+)/i,o.Opera],[/fxios\/([\w.-]+)/i,o.Firefox],[/samsungbrowser\/([\w.]+)/i,o.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,o.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,o.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,o.Chrome],[/chrome\/([\w.]+) mobile/i,o.Chrome],[/chrome\/v?([\w.]+)/i,o.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/version\/([\w.,]+) .*safari/i,o.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,o.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,o.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,o.Firefox],[/firefox\/([\w.]+)/i,o.Firefox]],m=0;m<v.length;m++){var w=(k=v[m])[0],y=k[1],g=k[2];if(null!==(S=a.match(w))){c=y,l=p(S[1],g),y===n.iOS||y===n.Android?i.Mobile:y!==n.Windows&&y!==n.MacOS||i.Desktop;break}}for(m=0;m<b.length;m++){w=(k=b[m])[0];k[1];g=k[2];if(null!==(S=a.match(w))){p(S[1],g);break}}for(m=0;m<h.length;m++){w=(k=h[m])[0];var k,S,O=k[1];g=k[2];if(null!==(S=a.match(w))){s=O,d=p(S[1],g);break}}function T(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var i="",r=0;r<t.length-2;r++){var o=t[r];void 0!==o&&(i=i+o.charAt(0).toUpperCase()+o.slice(1))}return i}function E(){this.returnValue=!1}function x(){this.cancelBubble=!0}!function(){var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var t=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===t)return"";if(t instanceof WebGLRenderingContext||"getParameter"in t&&"function"==typeof t.getParameter){var n=t.getExtension("WEBGL_debug_renderer_info");return null===n?t.getParameter(t.RENDERER):t.getParameter(n.UNMASKED_RENDERER_WEBGL)}}(),i.Mobile,i.Desktop,c===n.iOS?"standalone"in navigator&&navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches;var M=/(animation)(start|iteration|end|cancel)|(transition)(start|run|end|cancel)|(fullscreen)(change|error)|(lost|got)(pointer)(capture)|(pointer)(lock)(change|error)|(pointer)(cancel|down|enter|leave|move|out|over|up)/i,W=["","webkit","moz","ms","MS","o","O"],_={wheel:["wheel","mousewheel","DOMMouseScroll"],focus:["focus","focusin"],blur:["blur","focusout"],beforeinput:["beforeinput","textInput"]},A={useStd:void 0!==globalThis.document&&"function"==typeof globalThis.document.addEventListener,add:function(e,t){void 0===t&&(t={callback:null,options:!1});var n=t.callback;if(void 0!==e&&null!==n){var i=A.withVender(e,t.type),r=t.options;if("function"==typeof e.addEventListener)try{return e.addEventListener(i,n,r)}catch(e){}if("function"==typeof e.addListener)if("boolean"==typeof e.matches)try{return e.addListener(n)}catch(e){}else try{return e.addListener(i,n)}catch(e){}return"function"==typeof e.attachEvent?n.__ieWrapper?e.attachEvent("on"+i,n.__ieWrapper):e.attachEvent("on"+i,n.__ieWrapper=function(t){void 0===t&&(t=globalThis.event),void 0!==t&&(t.currentTarget=e,"function"!=typeof t.preventDefault&&(t.preventDefault=E),"function"!=typeof t.stopPropagation&&(t.stopPropagation=x),"function"==typeof n?n.call(e,t):n&&"function"==typeof n.handleEvent&&n.handleEvent.call(e,t))}):void 0}},remove:function(e,t){void 0===t&&(t={callback:null,options:!1});var n=t.callback;if(void 0!==e&&null!==n){var i=A.withVender(e,t.type),r=t.options;if("function"==typeof e.removeEventListener)try{return e.removeEventListener(i,n,r)}catch(e){}if("function"==typeof e.removeListener)if("boolean"==typeof e.matches)try{return e.removeListener(n)}catch(e){}else try{return e.removeListener(i,n)}catch(e){}if("function"!=typeof e.detachEvent);else{var o=n.__ieWrapper;void 0!==o&&(e.detachEvent("on"+i,o),delete n.__ieWrapper)}}},withVender:function(e,t){if(void 0===t)return"";if("webkitEnterFullscreen"in e&&["webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"].indexOf(t)>-1)return t;var n;n=t in _?_[t]:M.test(t)?[t,t.replace(M,T)]:[t];for(var i=0;i<W.length;i++)for(var r=0;r<n.length;r++){var o=W[i]+n[r];if(void 0!==e["on"+o])return o}return""}};function I(){try{if(globalThis.top&&globalThis.top!==window)return globalThis.top.location.href,globalThis.top}catch(e){}return window}function L(e,t){void 0===t&&(t=!0);var n=globalThis.document.createElement(e);return"width"in n&&(n.width="0"),"height"in n&&(n.height="0"),"border"in n&&(n.border="0"),"frameBorder"in n&&(n.frameBorder="0"),"scrolling"in n&&(n.scrolling="no"),"cellPadding"in n&&(n.cellPadding="0"),"cellSpacing"in n&&(n.cellSpacing="0"),"frame"in n&&(n.frame="void"),"rules"in n&&(n.rules="none"),"noWrap"in n&&(n.noWrap=!0),n.tabIndex=-1,n.setAttribute("role","presentation"),t?(n.style.width="1px",n.style.height="1px"):(n.setAttribute("aria-hidden","true"),n.style.width="0",n.style.height="0",n.style.zIndex="-9999",n.style.display="none",n.style.visibility="hidden",n.style.pointerEvents="none"),n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.padding="0",n.style.margin="0",n.style.border="none",n.style.outline="none",n.style.clip="rect(1px, 1px, 1px, 1px)",n.style.clipPath="inset(50%)",n.style.overflow="hidden",n.style.whiteSpace="nowrap",n}function F(e,t){for(var n=e.split("."),i=t.split("."),r=Math.max(n.length,i.length),o=0;o<r;o++){var a=void 0,c=void 0;if((a=o<n.length?parseInt(n[o],10):0)>(c=o<i.length?parseInt(i[o],10):0))return 1;if(a<c)return-1}return 0}function P(e,t){var n=I(),i=n.document,r=void 0;try{if(0===t)return void(n.location.href=e);(r=L("a")).href=e,i.body.appendChild(r),function(e,t){var n;void 0===t&&(t=window);try{n=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:t})}catch(e){(n=globalThis.document.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,t,0,0,0,0,0,!1,!1,!1,!1,0,null)}e.dispatchEvent(n)}(r,n)}catch(e){}finally{if(void 0!==r)try{i.body.removeChild(r)}catch(e){}}}function N(e){return"function"==typeof e.hasFocus&&e.hasFocus()}function U(e){try{e.focus({preventScroll:!0})}catch(t){try{e.focus()}catch(e){}}}function C(e,t,i){var r=I(),o=r.document,a={focus:void 0,blur:void 0,visibilitychange:void 0},s={focus:void 0,blur:void 0,visibilitychange:void 0};return c===n.iOS?F(l,"8.0")>=0?(s={visibilitychange:o},a={visibilitychange:"visibilitychange"}):(s={focus:r,blur:r},a={focus:"pageshow",blur:"pagehide"}):A.useStd?(s={focus:r,blur:r,visibilitychange:o},a={focus:"focus",blur:"blur",visibilitychange:"visibilitychange"}):(s={focus:o,blur:o,visibilitychange:o},a={focus:"focus",blur:"blur",visibilitychange:"visibilitychange"}),new Promise((function(n,r){var c,l=!1;function d(e){if(!l){l=!0;try{!function(){void 0!==c&&(clearTimeout(c),c=void 0);try{A.remove(s.blur,{type:a.blur,callback:u}),A.remove(s.focus,{type:a.focus,callback:f}),A.remove(s.visibilitychange,{type:a.visibilitychange,callback:p})}catch(e){}}(),e?n():r()}catch(e){n()}}}function u(){void 0!==c&&(clearTimeout(c),c=void 0),A.remove(s.blur,{type:a.blur,callback:u}),A.add(s.focus,{type:a.focus,callback:f})}function f(){d(!0)}function p(){(function(){var e=I().document;return"hidden"===e.visibilityState||"hidden"===e.webkitVisibilityState||"hidden"===e.mozVisibilityState||"hidden"===e.msVisibilityState||(void 0!==e.hidden?e.hidden:void 0!==e.webkitHidden?e.webkitHidden:void 0!==e.mozHidden?e.mozHidden:void 0!==e.msHidden?e.msHidden:"function"!=typeof e.hasFocus||!e.hasFocus())})()&&d(!0)}c=globalThis.setTimeout((function(){d(!1)}),i),A.add(s.blur,{type:a.blur,callback:u}),A.add(s.visibilitychange,{type:a.visibilitychange,callback:p}),N(o)||function(){var e=I(),t=e.document;if(U(e),N(t))return!0;if(t.body.tabIndex<0&&(t.body.tabIndex=-1),U(t.body),N(t))return!0;var n=void 0;try{(n=L("input")).type="text",n.readOnly=!0,t.body.appendChild(n),U(n);try{n.select()}catch(e){}if(N(t))return!0}catch(e){}finally{if(void 0!==n){try{n.blur()}catch(e){}try{t.body.removeChild(n)}catch(e){}}}N(t)}();try{P(e,t),function(e){var t=I(),n=void 0;try{(n=L("iframe")).src=e,t.document.body.appendChild(n),globalThis.setTimeout((function(){if(void 0!==n)try{t.document.body.removeChild(n)}catch(e){}}),500)}catch(e){}}(e)}catch(e){d(!1)}}))}var H,j=function(e,t){function n(i){if(!(this instanceof n))return new n(i);var r=new t(i||"");if("function"==typeof Object.setPrototypeOf?Object.setPrototypeOf(r,n.prototype):r.__proto__=n.prototype,r.name=e,void 0!==i&&(r.message=i),"undefined"!=typeof Symbol&&Symbol.toStringTag)try{Object.defineProperty(r,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})}catch(e){}if("function"==typeof Error.captureStackTrace)Error.captureStackTrace(r,n);else if(t.captureStackTrace&&"function"==typeof t.captureStackTrace)t.captureStackTrace(r,n);else try{var o=new t;o.stack&&(r.stack=o.stack)}catch(e){}return r}void 0===t&&(t=Error),n.prototype=Object.create(t.prototype,{constructor:{value:n,writable:!0,enumerable:!1,configurable:!0}});try{Object.defineProperty(n.prototype,"name",{value:e,writable:!0,enumerable:!1,configurable:!0})}catch(t){try{n.prototype.name=e}catch(e){}}try{Object.defineProperty(n,"name",{value:e,writable:!1,enumerable:!1,configurable:!0})}catch(e){}return n}("URLOpenError"),R={open:function(t){var i,r=c,u=[],f=[];if(r===n.Android){if(void 0===(S=t[n.Android]))return Promise.reject(K(f));i=S.timeout;var p=J(S.scheme),v=J(S.intent),b=S.packageName,h=J(S.fallback),m=S.allowWebStore;if(void 0!==v&&(void 0===p||void 0===b||void 0===h)){var w=function(e){for(var t={},n=e.split("#Intent;"),i=n[0].substring(9),r=n[1],o=r.substring(0,r.length-4).split(";"),a={},c=0;c<o.length;c++){var l=o[c],s=l.indexOf("=");-1!==s&&(a[l.substring(0,s)]=l.substring(s+1))}void 0!==a.scheme&&(t.scheme=a.scheme+"://"+i);void 0!==a.package&&(t.packageName=a.package);void 0!==a["S.browser_fallback_url"]&&(t.fallback=a["S.browser_fallback_url"]);return t}(v);void 0!==w.scheme&&void 0===p&&(p=w.scheme),void 0!==w.packageName&&void 0===b&&(b=w.packageName),void 0!==w.fallback&&void 0===h&&(h=w.fallback)}void 0!==p&&void 0===v&&(v=function(e,t,i){var r=e.split("://"),o=r[0],a=r[1],c="intent://";void 0!==a&&(c+=a);c=c+"#Intent;scheme="+o+";action=android.intent.action.VIEW;category=android.intent.category.BROWSABLE;",void 0!==t&&(c=c+"package="+t+";");void 0!==i&&"string"==typeof i?c=c+"S.browser_fallback_url="+i+";":void 0!==t&&(c=c+"S.browser_fallback_url="+B(t,n.Android)+";");return c+"end"}(p,b,h)),z(u,v,e.Intent,!(c!==n.Android||s===o.SamsungInternet&&F(d,"17.0.1.69")>=0&&F(d,"17.0.7.34")<0||s===o.Firefox&&F(d,"41.0")<0||s===o.Firefox&&F(d,"58.0")>=0&&F(d,"68.11.0")<0||s===o.Firefox&&F(d,"79.0")>=0&&F(d,"81.2.0")<0||s===o.Firefox&&F(d,"96.0")>=0&&F(d,"107.0")<0||s===o.Opera&&F(d,"14.0")<0||/(?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/[\w.]+;/i.test(a)||/instagram[\/ ][-\w.]+/i.test(a)||/micromessenger\/([\w.]+)/i.test(a)||/musical_ly(?:.+app_?version\/|_)[\w.]+/i.test(a)||/ultralite app_version\/[\w.]+/i.test(a))),z(u,p,e.Scheme),z(u,h,e.Fallback),z(u,B(b,n.Android),e.Store),z(u,V(b,n.Android),e.Store,m)}else if(r===n.iOS){if(void 0===(S=t[n.iOS]))return Promise.reject(K(f));i=S.timeout;p=J(S.scheme),b=S.bundleId;var y=S.trackId,g=J(S.universal);h=J(S.fallback),m=S.allowWebStore;void 0!==b&&void 0===y&&(y=D(b)),z(u,g,e.Universal,c===n.iOS&&F(l,"9.0")>=0),z(u,p,e.Scheme),z(u,h,e.Fallback),z(u,B(y,n.iOS),e.Store),z(u,V(y,n.iOS),e.Store,m)}else if(r===n.Windows){if(void 0===(S=t[n.Windows]))return Promise.reject(K(f));i=S.timeout;p=J(S.scheme);var k=S.productId;h=J(S.fallback),m=S.allowWebStore;z(u,p,e.Scheme),z(u,h,e.Fallback),z(u,B(k,n.Windows),e.Store),z(u,V(k,n.Windows),e.Store,m)}else if(r===n.MacOS){var S;if(void 0===(S=t[n.MacOS]))return Promise.reject(K(f));i=S.timeout;p=J(S.scheme),b=S.bundleId,y=S.trackId,h=J(S.fallback),m=S.allowWebStore;void 0!==b&&void 0===y&&(y=D(b)),z(u,p,e.Scheme),z(u,h,e.Fallback),z(u,B(y,n.MacOS),e.Store),z(u,V(y,n.MacOS),e.Store,m)}void 0===i&&(i=G(r));return new Promise((function(e,t){return function n(r){if(void 0===r&&(r=0),r>=u.length)return t(K(f));var o=u[r],a=o[0],c=o[1];if("string"==typeof c)return f[r]=c,C(c,r,i).then((function(){e(a)})).catch((function(){n(r+1)}));f[r]="[function fallback]",c(),e(a)}()}))},messenger:(H={},H[t.Telephone]=function(e){return Z(e,"tel")},H[t.Message]=function(e){return Z(e,"sms")},H[t.Mail]=function(e){return Z(e,"mailto")},H)};function D(e){try{var t=new XMLHttpRequest;if(t.open("GET","https://itunes.apple.com/lookup?bundleId="+e,!1),t.send(),200===t.status)try{var n=JSON.parse(t.response);if(void 0===n.results)return;var i=n.results;if(!Array.isArray(i)||0===i.length)return;var r=i[0];if(void 0===r)return;return r.trackId}catch(e){return}return}catch(e){return}}function B(e,t){if(void 0!==e)switch(t){case n.Android:return"market://details?id="+e;case n.iOS:return"itms-apps://itunes.apple.com/app/id"+e+"?mt=8";case n.Windows:return"ms-windows-store://pdp/?ProductId="+e;case n.MacOS:return"macappstore://itunes.apple.com/app/id"+e+"?mt=12";default:throw new j('Unsupported OS: "'+a+'"')}}function V(e,t){if(void 0!==e)switch(t){case n.Android:return"https://play.google.com/store/apps/details?id="+e;case n.iOS:return"https://itunes.apple.com/app/id"+e+"?mt=8";case n.Windows:return"https://apps.microsoft.com/detail/"+e;case n.MacOS:return"https://apps.apple.com/app/id"+e+"?mt=12";default:throw new j('Unsupported OS: "'+a+'"')}}function G(e){switch(e){case n.iOS:return 2e3;case n.Android:return 1e3;default:return 750}}function K(e){for(var t="",n=0;n<e.length;n++)t+="\n"+(n+1)+": "+e[n];return t.length>0&&(t="\n"+t+"\n"),new j("Failed to open any of the provided URLs: "+t)}function z(e,t,n,i){void 0===i&&(i=!0),void 0!==t&&i&&e.push([n,t])}function X(e,t,n){void 0===n&&(n=",");for(var i=e.length,r="",o=0;o<i;o++)r+=t(e[o]),o!==i-1&&(r+=n);return r}function q(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16)}))}function J(e){return e instanceof URL?e.toString():e}function Q(e){if("string"==typeof e)return q(e);if("number"==typeof e||"boolean"==typeof e)return q(String(e));if(null==e)return"";if(function(e){if(null==e||"string"==typeof e)return!1;var t=e.length;return"number"==typeof t&&t>=0&&!(t%1)}(e))return X(e,(function(e){return Q(e)}));if(e instanceof HTMLInputElement){var t=e.type;if("checkbox"===t)return q(e.checked.toString());if("radio"===t)return e.checked?q(e.value):"";if("file"===t){var n=e.files;return null===n?"":X(n,(function(e){return q(e.name)}))}return q(e.value)}return e instanceof HTMLSelectElement?e.multiple?X(e.selectedOptions,(function(e){return q(e.value)})):q(e.value):e instanceof HTMLTextAreaElement?q(e.value):e instanceof HTMLElement?q(e.innerText):e instanceof Node?Q(e.textContent):q(e.toString())}function Y(e){if(e instanceof HTMLFormElement)return Y(new FormData(e));if(e instanceof FormData){var t={};return e.forEach((function(e,n){var i;if(i=e instanceof File?e.name:e,Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];Array.isArray(r)?r.push(i):t[n]=[r,i]}else t[n]=i})),Y(t)}for(var n={},i=Object.keys(e),r=0;r<i.length;r++){var o=i[r];n[o]=Q(e[o])}return void 0===n.to&&(n.to=""),void 0===n.cc&&(n.cc=""),void 0===n.bcc&&(n.bcc=""),void 0===n.subject&&(n.subject=""),void 0===n.body&&(n.body=""),n}function Z(e,t){return C(t+":"+(e=Y(e)).to+"?cc="+e.cc+"&bcc="+e.bcc+"&subject="+e.subject+"&body="+e.body,0,G(c))}var $={installed:!1,name:"App",module:R,Constants:{AppOpenState:e,Messengers:t},Errors:{URLOpenError:j}};module.exports=$;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e,t,n=navigator.userAgent;!function(e){e[e.Scheme=0]="Scheme",e[e.Universal=1]="Universal",e[e.Intent=2]="Intent",e[e.Fallback=3]="Fallback",e[e.Store=4]="Store"}(e||(e={})),function(e){e.Telephone="telephone",e.Message="message",e.Mail="mail"}(t||(t={}));var i,o,r,a=!/firefox|opr/i.test(n);!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(i||(i={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(o||(o={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(r||(r={}));var c=function(){function e(e){return void 0===e?"":e.replace(/_/g,".")}function t(e){if(void 0===e)return"";var t={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==t?t:e}function n(e){return void 0===e?"":e}return[[/android\w*[-\/.; ]?([\d.]*)/i,i.Android,o.Mobile,n],[/microsoft windows (vista|xp)/i,i.Windows,o.Desktop,n],[/windows (?:phone(?: os)?|mobile|iot)[\/ ]?([.\w ]*)/i,i.Windows,o.Desktop,t],[/windows nt 6\.2; (arm)/i,i.Windows,o.Desktop,t],[/windows[\/ ]([ntce\d. ]+\w)(?!.+xbox)/i,i.Windows,o.Desktop,t],[/(?:win(?=[39n])|win 9x )([nt\d.]+)/i,i.Windows,o.Desktop,t],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,i.iOS,o.Mobile,e],[/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d.]+)/i,i.iOS,o.Mobile,e],[/cfnetwork\/.+darwin/i,i.iOS,o.Mobile,n],[/mac os x ?([\w. ]*)/i,i.MacOS,o.Desktop,e],[/(?:macintosh|mac_powerpc\b)(?!.+haiku)/i,i.MacOS,o.Desktop,e]]}(),u=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],s=i.Unknown,d="";o.Unknown;r.Unknown;for(var l=0;l<c.length;l++){var f=(b=c[l])[0],p=b[1],v=b[2],h=b[3];if(null!==(m=n.match(f))){s=p,d=h(m[1]);break}}for(l=0;l<u.length;l++){var b,m;f=(b=u[l])[0];if(b[1],null!==(m=n.match(f))){m[1];break}}function y(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var i="",o=0;o<t.length-2;o++){var r=t[o];void 0!==r&&(i=i+r.charAt(0).toUpperCase()+r.slice(1))}return i}function w(){this.returnValue=!1}function g(){this.cancelBubble=!0}!function(){var e=document.createElement("canvas");if("function"!=typeof e.getContext)return"";var t=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===t)return"";if(t instanceof WebGLRenderingContext||"getParameter"in t&&"function"==typeof t.getParameter){var n=t.getExtension("WEBGL_debug_renderer_info");return null===n?t.getParameter(t.RENDERER):t.getParameter(n.UNMASKED_RENDERER_WEBGL)}}(),o.Mobile,o.Desktop,s===i.iOS?"standalone"in navigator&&navigator.standalone:window.matchMedia("(display-mode: standalone)").matches;var k={useStd:"undefined"!=typeof document&&"function"==typeof document.addEventListener,add:function(e,t){void 0===t&&(t={callback:null,options:!1});var n=t.callback;if(void 0!==e&&null!==n){var i=this.withVender(e,t.type),o=t.options;if("function"==typeof e.addEventListener)try{return e.addEventListener(i,n,o)}catch(e){}if("function"==typeof e.addListener)if("boolean"==typeof e.matches)try{return e.addListener(n)}catch(e){}else try{return e.addListener(i,n)}catch(e){}return"function"==typeof e.attachEvent?n.__ieWrapper?e.attachEvent("on"+i,n.__ieWrapper):e.attachEvent("on"+i,n.__ieWrapper=function(t){void 0===t&&(t=window.event),void 0!==t&&(t.currentTarget=e,"function"!=typeof t.preventDefault&&(t.preventDefault=w),"function"!=typeof t.stopPropagation&&(t.stopPropagation=g),"function"==typeof n?n.call(e,t):n&&"function"==typeof n.handleEvent&&n.handleEvent.call(e,t))}):void 0}},remove:function(e,t){void 0===t&&(t={callback:null,options:!1});var n=t.callback;if(void 0!==e&&null!==n){var i=this.withVender(e,t.type),o=t.options;if("function"==typeof e.removeEventListener)try{return e.removeEventListener(i,n,o)}catch(e){}if("function"==typeof e.removeListener)if("boolean"==typeof e.matches)try{return e.removeListener(n)}catch(e){}else try{return e.removeListener(i,n)}catch(e){}if("function"!=typeof e.detachEvent);else{var r=n.__ieWrapper;void 0!==r&&(e.detachEvent("on"+i,r),delete n.__ieWrapper)}}},withVender:function(e,t){if(void 0===t)return"";var n,i=/(animation)(start|iteration|end|cancel)|(transition)(start|run|end|cancel)|(fullscreen)(change|error)|(lost|got)(pointer)(capture)|(pointer)(lock)(change|error)|(pointer)(cancel|down|enter|leave|move|out|over|up)/i,o=["","webkit","moz","ms","MS","o","O"];n="wheel"===t?["wheel","mousewheel","DOMMouseScroll"]:"focus"===t?["focus","focusin"]:"blur"===t?["blur","focusout"]:i.test(t)?[t,t.replace(i,y)]:[t];for(var r=0;r<o.length;r++)for(var a=0;a<n.length;a++){var c=o[r]+n[a];if(void 0!==e["on"+c])return c}return""}};function S(){try{if(window.top&&window.top!==window)return window.top.location.href,window.top}catch(e){}return window}function E(e){var t=S(),n=void 0;try{(n=document.createElement("iframe")).src=e,n.width=n.height=n.frameBorder="0",n.setAttribute("aria-hidden","true"),n.style.display="none",n.style.position="absolute",n.style.top="-9999px",n.style.left="-9999px",t.document.body.appendChild(n),window.setTimeout((function(){if(void 0!==n)try{t.document.body.removeChild(n)}catch(e){}}),500)}catch(e){}}function T(e){return"function"==typeof e.hasFocus&&e.hasFocus()}function O(e){try{e.focus({preventScroll:!0})}catch(t){try{e.focus()}catch(e){}}}function M(e,t,n){var o=S(),r=o.document,a={focus:void 0,blur:void 0,visibilitychange:void 0},c={focus:void 0,blur:void 0,visibilitychange:void 0};return s===i.iOS?parseInt(d)>=8?(c={visibilitychange:r},a={visibilitychange:"visibilitychange"}):(c={focus:o,blur:o},a={focus:"pageshow",blur:"pagehide"}):k.useStd?(c={focus:o,blur:o,visibilitychange:r},a={focus:"focus",blur:"blur",visibilitychange:"visibilitychange"}):(c={focus:r,blur:r,visibilitychange:r},a={focus:"focus",blur:"blur",visibilitychange:"visibilitychange"}),new Promise((function(i,o){var u,s=!1;function d(e){if(!s){s=!0;try{!function(){void 0!==u&&(clearTimeout(u),u=void 0);try{k.remove(c.blur,{type:a.blur,callback:l}),k.remove(c.focus,{type:a.focus,callback:f}),k.remove(c.visibilitychange,{type:a.visibilitychange,callback:p})}catch(e){}}(),e?i():o()}catch(e){i()}}}function l(){void 0!==u&&(clearTimeout(u),u=void 0),k.remove(c.blur,{type:a.blur,callback:l}),k.add(c.focus,{type:a.focus,callback:f})}function f(){d(!0)}function p(){(function(){var e=S().document;return"hidden"===e.visibilityState||"hidden"===e.webkitVisibilityState||"hidden"===e.mozVisibilityState||"hidden"===e.msVisibilityState||(void 0!==e.hidden?e.hidden:void 0!==e.webkitHidden?e.webkitHidden:void 0!==e.mozHidden?e.mozHidden:void 0!==e.msHidden?e.msHidden:"function"!=typeof e.hasFocus||!e.hasFocus())})()&&d(!0)}u=window.setTimeout((function(){d(!1)}),n),k.add(c.blur,{type:a.blur,callback:l}),k.add(c.visibilitychange,{type:a.visibilitychange,callback:p}),T(r)||function(){var e=S(),t=e.document;if(O(e),T(t))return!0;if(t.body.tabIndex<0&&(t.body.tabIndex=-1),O(t.body),T(t))return!0;var n=void 0;try{(n=t.createElement("input")).type="text",n.readOnly=!0,n.tabIndex=-1,n.setAttribute("aria-hidden","true"),n.style.position="fixed",n.style.width=n.style.height="1px",n.style.top=n.style.left="0",n.style.opacity="0",n.style.zIndex="-1",t.body.appendChild(n),O(n);try{n.select()}catch(e){}if(T(t))return!0}catch(e){}finally{if(void 0!==n){try{n.blur()}catch(e){}try{t.body.removeChild(n)}catch(e){}}}T(t)}();try{!function(e,t){var n=S(),i=void 0;try{if(0===t)return void(n.location.href=e);(i=n.document.createElement("a")).href=e,i.setAttribute("aria-hidden","true"),i.style.display="none",n.document.body.appendChild(i);var o=void 0;try{o=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:n})}catch(e){(o=n.document.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,n,0,0,0,0,0,!1,!1,!1,!1,0,null)}i.dispatchEvent(o)}catch(e){}finally{if(void 0!==i)try{n.document.body.removeChild(i)}catch(e){}}}(e,t),E(e)}catch(e){d(!1)}}))}var W,L=function(e,t){function n(i){if(!(this instanceof n))return new n(i);var o=new t(i||"");if("function"==typeof Object.setPrototypeOf?Object.setPrototypeOf(o,n.prototype):o.__proto__=n.prototype,o.name=e,void 0!==i&&(o.message=i),"undefined"!=typeof Symbol&&Symbol.toStringTag)try{Object.defineProperty(o,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})}catch(e){}if("function"==typeof Error.captureStackTrace)Error.captureStackTrace(o,n);else if(t.captureStackTrace&&"function"==typeof t.captureStackTrace)t.captureStackTrace(o,n);else try{var r=new t;r.stack&&(o.stack=r.stack)}catch(e){}return o}void 0===t&&(t=Error),n.prototype=Object.create(t.prototype,{constructor:{value:n,writable:!0,enumerable:!1,configurable:!0}});try{Object.defineProperty(n.prototype,"name",{value:e,writable:!0,enumerable:!1,configurable:!0})}catch(t){try{n.prototype.name=e}catch(e){}}try{Object.defineProperty(n,"name",{value:e,writable:!1,enumerable:!1,configurable:!0})}catch(e){}return n}("URLOpenError"),A={open:function(t){var n,o=s,r=[],c=[];function u(){for(var e="",t=0;t<r.length;t++)e+="\n"+(t+1)+": "+c[t];return e.length>0&&(e="\n"+e+"\n"),new L("Failed to open any of the provided URLs: "+e)}if(o===i.Android){if(void 0===(g=t[i.Android]))return Promise.reject(u());n=g.timeout;var l=D(g.scheme),f=D(g.intent),p=g.packageName,v=D(g.fallback),h=g.allowWebStore;if(void 0!==f&&(void 0===l||void 0===p||void 0===v)){var b=function(e){for(var t={},n=e.split("#Intent;"),i=n[0].substring(9),o=n[1],r=o.substring(0,o.length-4).split(";"),a={},c=0;c<r.length;c++){var u=r[c],s=u.indexOf("=");-1!==s&&(a[u.substring(0,s)]=u.substring(s+1))}void 0!==a.scheme&&(t.scheme=a.scheme+"://"+i);void 0!==a.package&&(t.packageName=a.package);void 0!==a["S.browser_fallback_url"]&&(t.fallback=a["S.browser_fallback_url"]);return t}(f);void 0!==b.scheme&&void 0===l&&(l=b.scheme),void 0!==b.packageName&&void 0===p&&(p=b.packageName),void 0!==b.fallback&&void 0===v&&(v=b.fallback)}void 0!==l&&void 0===f&&(f=function(e,t,n){var o=e.split("://"),r=o[0],a=o[1],c="intent://";void 0!==a&&(c+=a);c=c+"#Intent;scheme="+r+";action=android.intent.action.VIEW;category=android.intent.category.BROWSABLE;",void 0!==t&&(c=c+"package="+t+";");void 0!==n&&"string"==typeof n?c=c+"S.browser_fallback_url="+n+";":void 0!==t&&(c=c+"S.browser_fallback_url="+x(t,i.Android)+";");return c+"end"}(l,p,v)),void 0!==f&&a&&r.push([f,e.Intent]),void 0!==l&&r.push([l,e.Scheme]),void 0!==v&&r.push([v,e.Fallback]),void 0!==p&&r.push([x(p,i.Android),e.Store]),void 0!==p&&!0===h&&r.push([N(p,i.Android),e.Store])}else if(o===i.iOS){if(void 0===(g=t[i.iOS]))return Promise.reject(u());n=g.timeout;l=D(g.scheme),p=g.bundleId;var m=g.trackId,y=D(g.universal);v=D(g.fallback),h=g.allowWebStore;void 0!==p&&void 0===m&&(m=_(p)),void 0!==y&&parseInt(d)>=9&&r.push([y,e.Universal]),void 0!==l&&r.push([l,e.Scheme]),void 0!==v&&r.push([v,e.Fallback]),void 0!==m&&r.push([x(m,i.iOS),e.Store]),void 0!==m&&!0===h&&r.push([N(m,i.iOS),e.Store])}else if(o===i.Windows){if(void 0===(g=t[i.Windows]))return Promise.reject(u());n=g.timeout;l=D(g.scheme);var w=g.productId;v=D(g.fallback),h=g.allowWebStore;void 0!==l&&r.push([l,e.Scheme]),void 0!==v&&r.push([v,e.Fallback]),void 0!==w&&r.push([x(w,i.Windows),e.Store]),void 0!==w&&!0===h&&r.push([N(w,i.Windows),e.Store])}else if(o===i.MacOS){var g;if(void 0===(g=t[i.MacOS]))return Promise.reject(u());n=g.timeout;l=D(g.scheme),p=g.bundleId,m=g.trackId,v=D(g.fallback),h=g.allowWebStore;void 0!==p&&void 0===m&&(m=_(p)),void 0!==l&&r.push([l,e.Scheme]),void 0!==v&&r.push([v,e.Fallback]),void 0!==m&&r.push([x(m,i.MacOS),e.Store]),void 0!==m&&!0===h&&r.push([N(m,i.MacOS),e.Store])}void 0===n&&(n=P(o));return new Promise((function(e,t){return function i(o){if(void 0===o&&(o=0),o>=r.length)return t(u());var a=r[o],s=a[0];if("string"==typeof s)return c[o]=s,M(s,o,n).then((function(){e(a[1])})).catch((function(){i(o+1)}));c[o]="[function fallback]",s(),e(a[1])}()}))},messenger:(W={},W[t.Telephone]=function(e){return j(e,"tel")},W[t.Message]=function(e){return j(e,"sms")},W[t.Mail]=function(e){return j(e,"mailto")},W)};function _(e){try{var t=new XMLHttpRequest;if(t.open("GET","https://itunes.apple.com/lookup?bundleId="+e,!1),t.send(),200===t.status)try{var n=JSON.parse(t.response);if(void 0===n.results)return;var i=n.results;if(!Array.isArray(i)||0===i.length)return;var o=i[0];if(void 0===o)return;return o.trackId}catch(e){return}return}catch(e){return}}function x(e,t){switch(t){case i.Android:return"market://details?id="+e;case i.iOS:return"itms-apps://itunes.apple.com/app/id"+e+"?mt=8";case i.Windows:return"ms-windows-store://pdp/?ProductId="+e;case i.MacOS:return"macappstore://itunes.apple.com/app/id"+e+"?mt=12";default:throw new L('Unsupported OS: "'+n+'"')}}function N(e,t){switch(t){case i.Android:return"https://play.google.com/store/apps/details?id="+e;case i.iOS:return"https://itunes.apple.com/app/id"+e+"?mt=8";case i.Windows:return"https://apps.microsoft.com/detail/"+e;case i.MacOS:return"https://apps.apple.com/app/id"+e+"?mt=12";default:throw new L('Unsupported OS: "'+n+'"')}}function P(e){switch(e){case i.iOS:return 2e3;case i.Android:return 1e3;default:return 750}}function I(e,t,n){void 0===n&&(n=",");for(var i=e.length,o="",r=0;r<i;r++)o+=t(e[r]),r!==i-1&&(o+=n);return o}function U(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16)}))}function D(e){return e instanceof URL?e.toString():e}function F(e){if("string"==typeof e)return U(e);if("number"==typeof e||"boolean"==typeof e)return U(String(e));if(null==e)return"";if(function(e){if(null==e||"string"==typeof e)return!1;var t=e.length;return"number"==typeof t&&t>=0&&!(t%1)}(e))return I(e,(function(e){return F(e)}));if(e instanceof HTMLInputElement){var t=e.type;if("checkbox"===t)return U(e.checked.toString());if("radio"===t)return e.checked?U(e.value):"";if("file"===t){var n=e.files;return null===n?"":I(n,(function(e){return U(e.name)}))}return U(e.value)}return e instanceof HTMLSelectElement?e.multiple?I(e.selectedOptions,(function(e){return U(e.value)})):U(e.value):e instanceof HTMLTextAreaElement?U(e.value):e instanceof HTMLElement?U(e.innerText):e instanceof Node?F(e.textContent):U(e.toString())}function H(e){if(e instanceof HTMLFormElement)return H(new FormData(e));if(e instanceof FormData){var t={};return e.forEach((function(e,n){var i;if(i=e instanceof File?e.name:e,Object.prototype.hasOwnProperty.call(t,n)){var o=t[n];Array.isArray(o)?o.push(i):t[n]=[o,i]}else t[n]=i})),H(t)}for(var n={},i=Object.keys(e),o=0;o<i.length;o++){var r=i[o];n[r]=F(e[r])}return void 0===n.to&&(n.to=""),void 0===n.cc&&(n.cc=""),void 0===n.bcc&&(n.bcc=""),void 0===n.subject&&(n.subject=""),void 0===n.body&&(n.body=""),n}function j(e,t){return M(t+":"+(e=H(e)).to+"?cc="+e.cc+"&bcc="+e.bcc+"&subject="+e.subject+"&body="+e.body,0,P(s))}var C={installed:!1,name:"App",module:A,Constants:{AppOpenState:e,Messengers:t},Errors:{URLOpenError:L}};export{C as default};
|
|
1
|
+
var e,t;!function(e){e[e.Scheme=0]="Scheme",e[e.Universal=1]="Universal",e[e.Intent=2]="Intent",e[e.Fallback=3]="Fallback",e[e.Store=4]="Store"}(e||(e={})),function(e){e.Telephone="telephone",e.Message="message",e.Mail="mail"}(t||(t={}));var n,i,r,o,a=navigator.userAgent;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(n||(n={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(i||(i={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(r||(r={})),function(e){e.Unknown="Unknown",e.Chrome="Chrome",e.Safari="Safari",e.Edge="Edge",e.Firefox="Firefox",e.Opera="Opera",e.IE="IE",e.SamsungInternet="SamsungInternet"}(o||(o={}));i.Unknown;var c=n.Unknown,l="";r.Unknown;var s=o.Unknown,d="";function u(e){if(void 0===e)return"";var t={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==t?t:e}function f(e){return void 0===e?"":e.replace(/_/g,".")}function p(e,t){return"function"==typeof t?t(e):"string"==typeof t?t:void 0===e?"":e}for(var v=[[/windows nt (6\.[23]); arm/i,n.Windows,u],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,n.Windows,u],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,n.Windows,u],[/windows nt ?([\d.)]*)(?!.+xbox)/i,n.Windows,u],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,n.Windows,u],[/windows ce\/?([\d.]*)/i,n.Windows,u],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,n.iOS,f],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,n.iOS,f],[/cfnetwork\/.+darwin/i,n.iOS,f],[/mac os x ?([\w. ]*)/i,n.MacOS,f],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,n.MacOS,f],[/droid ([\w.]+)\b.+(android[- ]x86)/i,n.Android],[/android\w*[-\/.; ]?([\d.]*)/i,n.Android]],b=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],h=[[/\b(?:crmo|crios)\/([\w.]+)/i,o.Chrome],[/webview.+edge\/([\w.]+)/i,o.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,o.Edge],[/opera mini\/([-\w.]+)/i,o.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,o.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,o.Opera],[/opios[\/ ]+([\w.]+)/i,o.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,o.Opera],[/\bopr\/([\w.]+)/i,o.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,o.IE],[/(?:ms|\()ie ([\w.]+)/i,o.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,o.IE],[/\bfocus\/([\w.]+)/i,o.Firefox],[/\bopt\/([\w.]+)/i,o.Opera],[/coast\/([\w.]+)/i,o.Opera],[/fxios\/([\w.-]+)/i,o.Firefox],[/samsungbrowser\/([\w.]+)/i,o.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,o.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,o.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,o.Chrome],[/chrome\/([\w.]+) mobile/i,o.Chrome],[/chrome\/v?([\w.]+)/i,o.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/version\/([\w.,]+) .*safari/i,o.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,o.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,o.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,o.Firefox],[/firefox\/([\w.]+)/i,o.Firefox]],m=0;m<v.length;m++){var w=(k=v[m])[0],y=k[1],g=k[2];if(null!==(S=a.match(w))){c=y,l=p(S[1],g),y===n.iOS||y===n.Android?i.Mobile:y!==n.Windows&&y!==n.MacOS||i.Desktop;break}}for(m=0;m<b.length;m++){w=(k=b[m])[0];k[1];g=k[2];if(null!==(S=a.match(w))){p(S[1],g);break}}for(m=0;m<h.length;m++){w=(k=h[m])[0];var k,S,O=k[1];g=k[2];if(null!==(S=a.match(w))){s=O,d=p(S[1],g);break}}function T(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var i="",r=0;r<t.length-2;r++){var o=t[r];void 0!==o&&(i=i+o.charAt(0).toUpperCase()+o.slice(1))}return i}function E(){this.returnValue=!1}function x(){this.cancelBubble=!0}!function(){var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var t=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===t)return"";if(t instanceof WebGLRenderingContext||"getParameter"in t&&"function"==typeof t.getParameter){var n=t.getExtension("WEBGL_debug_renderer_info");return null===n?t.getParameter(t.RENDERER):t.getParameter(n.UNMASKED_RENDERER_WEBGL)}}(),i.Mobile,i.Desktop,c===n.iOS?"standalone"in navigator&&navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches;var M=/(animation)(start|iteration|end|cancel)|(transition)(start|run|end|cancel)|(fullscreen)(change|error)|(lost|got)(pointer)(capture)|(pointer)(lock)(change|error)|(pointer)(cancel|down|enter|leave|move|out|over|up)/i,W=["","webkit","moz","ms","MS","o","O"],_={wheel:["wheel","mousewheel","DOMMouseScroll"],focus:["focus","focusin"],blur:["blur","focusout"],beforeinput:["beforeinput","textInput"]},A={useStd:void 0!==globalThis.document&&"function"==typeof globalThis.document.addEventListener,add:function(e,t){void 0===t&&(t={callback:null,options:!1});var n=t.callback;if(void 0!==e&&null!==n){var i=A.withVender(e,t.type),r=t.options;if("function"==typeof e.addEventListener)try{return e.addEventListener(i,n,r)}catch(e){}if("function"==typeof e.addListener)if("boolean"==typeof e.matches)try{return e.addListener(n)}catch(e){}else try{return e.addListener(i,n)}catch(e){}return"function"==typeof e.attachEvent?n.__ieWrapper?e.attachEvent("on"+i,n.__ieWrapper):e.attachEvent("on"+i,n.__ieWrapper=function(t){void 0===t&&(t=globalThis.event),void 0!==t&&(t.currentTarget=e,"function"!=typeof t.preventDefault&&(t.preventDefault=E),"function"!=typeof t.stopPropagation&&(t.stopPropagation=x),"function"==typeof n?n.call(e,t):n&&"function"==typeof n.handleEvent&&n.handleEvent.call(e,t))}):void 0}},remove:function(e,t){void 0===t&&(t={callback:null,options:!1});var n=t.callback;if(void 0!==e&&null!==n){var i=A.withVender(e,t.type),r=t.options;if("function"==typeof e.removeEventListener)try{return e.removeEventListener(i,n,r)}catch(e){}if("function"==typeof e.removeListener)if("boolean"==typeof e.matches)try{return e.removeListener(n)}catch(e){}else try{return e.removeListener(i,n)}catch(e){}if("function"!=typeof e.detachEvent);else{var o=n.__ieWrapper;void 0!==o&&(e.detachEvent("on"+i,o),delete n.__ieWrapper)}}},withVender:function(e,t){if(void 0===t)return"";if("webkitEnterFullscreen"in e&&["webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"].indexOf(t)>-1)return t;var n;n=t in _?_[t]:M.test(t)?[t,t.replace(M,T)]:[t];for(var i=0;i<W.length;i++)for(var r=0;r<n.length;r++){var o=W[i]+n[r];if(void 0!==e["on"+o])return o}return""}};function I(){try{if(globalThis.top&&globalThis.top!==window)return globalThis.top.location.href,globalThis.top}catch(e){}return window}function L(e,t){void 0===t&&(t=!0);var n=globalThis.document.createElement(e);return"width"in n&&(n.width="0"),"height"in n&&(n.height="0"),"border"in n&&(n.border="0"),"frameBorder"in n&&(n.frameBorder="0"),"scrolling"in n&&(n.scrolling="no"),"cellPadding"in n&&(n.cellPadding="0"),"cellSpacing"in n&&(n.cellSpacing="0"),"frame"in n&&(n.frame="void"),"rules"in n&&(n.rules="none"),"noWrap"in n&&(n.noWrap=!0),n.tabIndex=-1,n.setAttribute("role","presentation"),t?(n.style.width="1px",n.style.height="1px"):(n.setAttribute("aria-hidden","true"),n.style.width="0",n.style.height="0",n.style.zIndex="-9999",n.style.display="none",n.style.visibility="hidden",n.style.pointerEvents="none"),n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.padding="0",n.style.margin="0",n.style.border="none",n.style.outline="none",n.style.clip="rect(1px, 1px, 1px, 1px)",n.style.clipPath="inset(50%)",n.style.overflow="hidden",n.style.whiteSpace="nowrap",n}function F(e,t){for(var n=e.split("."),i=t.split("."),r=Math.max(n.length,i.length),o=0;o<r;o++){var a=void 0,c=void 0;if((a=o<n.length?parseInt(n[o],10):0)>(c=o<i.length?parseInt(i[o],10):0))return 1;if(a<c)return-1}return 0}function P(e,t){var n=I(),i=n.document,r=void 0;try{if(0===t)return void(n.location.href=e);(r=L("a")).href=e,i.body.appendChild(r),function(e,t){var n;void 0===t&&(t=window);try{n=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:t})}catch(e){(n=globalThis.document.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,t,0,0,0,0,0,!1,!1,!1,!1,0,null)}e.dispatchEvent(n)}(r,n)}catch(e){}finally{if(void 0!==r)try{i.body.removeChild(r)}catch(e){}}}function N(e){return"function"==typeof e.hasFocus&&e.hasFocus()}function U(e){try{e.focus({preventScroll:!0})}catch(t){try{e.focus()}catch(e){}}}function C(e,t,i){var r=I(),o=r.document,a={focus:void 0,blur:void 0,visibilitychange:void 0},s={focus:void 0,blur:void 0,visibilitychange:void 0};return c===n.iOS?F(l,"8.0")>=0?(s={visibilitychange:o},a={visibilitychange:"visibilitychange"}):(s={focus:r,blur:r},a={focus:"pageshow",blur:"pagehide"}):A.useStd?(s={focus:r,blur:r,visibilitychange:o},a={focus:"focus",blur:"blur",visibilitychange:"visibilitychange"}):(s={focus:o,blur:o,visibilitychange:o},a={focus:"focus",blur:"blur",visibilitychange:"visibilitychange"}),new Promise((function(n,r){var c,l=!1;function d(e){if(!l){l=!0;try{!function(){void 0!==c&&(clearTimeout(c),c=void 0);try{A.remove(s.blur,{type:a.blur,callback:u}),A.remove(s.focus,{type:a.focus,callback:f}),A.remove(s.visibilitychange,{type:a.visibilitychange,callback:p})}catch(e){}}(),e?n():r()}catch(e){n()}}}function u(){void 0!==c&&(clearTimeout(c),c=void 0),A.remove(s.blur,{type:a.blur,callback:u}),A.add(s.focus,{type:a.focus,callback:f})}function f(){d(!0)}function p(){(function(){var e=I().document;return"hidden"===e.visibilityState||"hidden"===e.webkitVisibilityState||"hidden"===e.mozVisibilityState||"hidden"===e.msVisibilityState||(void 0!==e.hidden?e.hidden:void 0!==e.webkitHidden?e.webkitHidden:void 0!==e.mozHidden?e.mozHidden:void 0!==e.msHidden?e.msHidden:"function"!=typeof e.hasFocus||!e.hasFocus())})()&&d(!0)}c=globalThis.setTimeout((function(){d(!1)}),i),A.add(s.blur,{type:a.blur,callback:u}),A.add(s.visibilitychange,{type:a.visibilitychange,callback:p}),N(o)||function(){var e=I(),t=e.document;if(U(e),N(t))return!0;if(t.body.tabIndex<0&&(t.body.tabIndex=-1),U(t.body),N(t))return!0;var n=void 0;try{(n=L("input")).type="text",n.readOnly=!0,t.body.appendChild(n),U(n);try{n.select()}catch(e){}if(N(t))return!0}catch(e){}finally{if(void 0!==n){try{n.blur()}catch(e){}try{t.body.removeChild(n)}catch(e){}}}N(t)}();try{P(e,t),function(e){var t=I(),n=void 0;try{(n=L("iframe")).src=e,t.document.body.appendChild(n),globalThis.setTimeout((function(){if(void 0!==n)try{t.document.body.removeChild(n)}catch(e){}}),500)}catch(e){}}(e)}catch(e){d(!1)}}))}var H,j=function(e,t){function n(i){if(!(this instanceof n))return new n(i);var r=new t(i||"");if("function"==typeof Object.setPrototypeOf?Object.setPrototypeOf(r,n.prototype):r.__proto__=n.prototype,r.name=e,void 0!==i&&(r.message=i),"undefined"!=typeof Symbol&&Symbol.toStringTag)try{Object.defineProperty(r,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})}catch(e){}if("function"==typeof Error.captureStackTrace)Error.captureStackTrace(r,n);else if(t.captureStackTrace&&"function"==typeof t.captureStackTrace)t.captureStackTrace(r,n);else try{var o=new t;o.stack&&(r.stack=o.stack)}catch(e){}return r}void 0===t&&(t=Error),n.prototype=Object.create(t.prototype,{constructor:{value:n,writable:!0,enumerable:!1,configurable:!0}});try{Object.defineProperty(n.prototype,"name",{value:e,writable:!0,enumerable:!1,configurable:!0})}catch(t){try{n.prototype.name=e}catch(e){}}try{Object.defineProperty(n,"name",{value:e,writable:!1,enumerable:!1,configurable:!0})}catch(e){}return n}("URLOpenError"),R={open:function(t){var i,r=c,u=[],f=[];if(r===n.Android){if(void 0===(S=t[n.Android]))return Promise.reject(K(f));i=S.timeout;var p=J(S.scheme),v=J(S.intent),b=S.packageName,h=J(S.fallback),m=S.allowWebStore;if(void 0!==v&&(void 0===p||void 0===b||void 0===h)){var w=function(e){for(var t={},n=e.split("#Intent;"),i=n[0].substring(9),r=n[1],o=r.substring(0,r.length-4).split(";"),a={},c=0;c<o.length;c++){var l=o[c],s=l.indexOf("=");-1!==s&&(a[l.substring(0,s)]=l.substring(s+1))}void 0!==a.scheme&&(t.scheme=a.scheme+"://"+i);void 0!==a.package&&(t.packageName=a.package);void 0!==a["S.browser_fallback_url"]&&(t.fallback=a["S.browser_fallback_url"]);return t}(v);void 0!==w.scheme&&void 0===p&&(p=w.scheme),void 0!==w.packageName&&void 0===b&&(b=w.packageName),void 0!==w.fallback&&void 0===h&&(h=w.fallback)}void 0!==p&&void 0===v&&(v=function(e,t,i){var r=e.split("://"),o=r[0],a=r[1],c="intent://";void 0!==a&&(c+=a);c=c+"#Intent;scheme="+o+";action=android.intent.action.VIEW;category=android.intent.category.BROWSABLE;",void 0!==t&&(c=c+"package="+t+";");void 0!==i&&"string"==typeof i?c=c+"S.browser_fallback_url="+i+";":void 0!==t&&(c=c+"S.browser_fallback_url="+B(t,n.Android)+";");return c+"end"}(p,b,h)),z(u,v,e.Intent,!(c!==n.Android||s===o.SamsungInternet&&F(d,"17.0.1.69")>=0&&F(d,"17.0.7.34")<0||s===o.Firefox&&F(d,"41.0")<0||s===o.Firefox&&F(d,"58.0")>=0&&F(d,"68.11.0")<0||s===o.Firefox&&F(d,"79.0")>=0&&F(d,"81.2.0")<0||s===o.Firefox&&F(d,"96.0")>=0&&F(d,"107.0")<0||s===o.Opera&&F(d,"14.0")<0||/(?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/[\w.]+;/i.test(a)||/instagram[\/ ][-\w.]+/i.test(a)||/micromessenger\/([\w.]+)/i.test(a)||/musical_ly(?:.+app_?version\/|_)[\w.]+/i.test(a)||/ultralite app_version\/[\w.]+/i.test(a))),z(u,p,e.Scheme),z(u,h,e.Fallback),z(u,B(b,n.Android),e.Store),z(u,V(b,n.Android),e.Store,m)}else if(r===n.iOS){if(void 0===(S=t[n.iOS]))return Promise.reject(K(f));i=S.timeout;p=J(S.scheme),b=S.bundleId;var y=S.trackId,g=J(S.universal);h=J(S.fallback),m=S.allowWebStore;void 0!==b&&void 0===y&&(y=D(b)),z(u,g,e.Universal,c===n.iOS&&F(l,"9.0")>=0),z(u,p,e.Scheme),z(u,h,e.Fallback),z(u,B(y,n.iOS),e.Store),z(u,V(y,n.iOS),e.Store,m)}else if(r===n.Windows){if(void 0===(S=t[n.Windows]))return Promise.reject(K(f));i=S.timeout;p=J(S.scheme);var k=S.productId;h=J(S.fallback),m=S.allowWebStore;z(u,p,e.Scheme),z(u,h,e.Fallback),z(u,B(k,n.Windows),e.Store),z(u,V(k,n.Windows),e.Store,m)}else if(r===n.MacOS){var S;if(void 0===(S=t[n.MacOS]))return Promise.reject(K(f));i=S.timeout;p=J(S.scheme),b=S.bundleId,y=S.trackId,h=J(S.fallback),m=S.allowWebStore;void 0!==b&&void 0===y&&(y=D(b)),z(u,p,e.Scheme),z(u,h,e.Fallback),z(u,B(y,n.MacOS),e.Store),z(u,V(y,n.MacOS),e.Store,m)}void 0===i&&(i=G(r));return new Promise((function(e,t){return function n(r){if(void 0===r&&(r=0),r>=u.length)return t(K(f));var o=u[r],a=o[0],c=o[1];if("string"==typeof c)return f[r]=c,C(c,r,i).then((function(){e(a)})).catch((function(){n(r+1)}));f[r]="[function fallback]",c(),e(a)}()}))},messenger:(H={},H[t.Telephone]=function(e){return Z(e,"tel")},H[t.Message]=function(e){return Z(e,"sms")},H[t.Mail]=function(e){return Z(e,"mailto")},H)};function D(e){try{var t=new XMLHttpRequest;if(t.open("GET","https://itunes.apple.com/lookup?bundleId="+e,!1),t.send(),200===t.status)try{var n=JSON.parse(t.response);if(void 0===n.results)return;var i=n.results;if(!Array.isArray(i)||0===i.length)return;var r=i[0];if(void 0===r)return;return r.trackId}catch(e){return}return}catch(e){return}}function B(e,t){if(void 0!==e)switch(t){case n.Android:return"market://details?id="+e;case n.iOS:return"itms-apps://itunes.apple.com/app/id"+e+"?mt=8";case n.Windows:return"ms-windows-store://pdp/?ProductId="+e;case n.MacOS:return"macappstore://itunes.apple.com/app/id"+e+"?mt=12";default:throw new j('Unsupported OS: "'+a+'"')}}function V(e,t){if(void 0!==e)switch(t){case n.Android:return"https://play.google.com/store/apps/details?id="+e;case n.iOS:return"https://itunes.apple.com/app/id"+e+"?mt=8";case n.Windows:return"https://apps.microsoft.com/detail/"+e;case n.MacOS:return"https://apps.apple.com/app/id"+e+"?mt=12";default:throw new j('Unsupported OS: "'+a+'"')}}function G(e){switch(e){case n.iOS:return 2e3;case n.Android:return 1e3;default:return 750}}function K(e){for(var t="",n=0;n<e.length;n++)t+="\n"+(n+1)+": "+e[n];return t.length>0&&(t="\n"+t+"\n"),new j("Failed to open any of the provided URLs: "+t)}function z(e,t,n,i){void 0===i&&(i=!0),void 0!==t&&i&&e.push([n,t])}function X(e,t,n){void 0===n&&(n=",");for(var i=e.length,r="",o=0;o<i;o++)r+=t(e[o]),o!==i-1&&(r+=n);return r}function q(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16)}))}function J(e){return e instanceof URL?e.toString():e}function Q(e){if("string"==typeof e)return q(e);if("number"==typeof e||"boolean"==typeof e)return q(String(e));if(null==e)return"";if(function(e){if(null==e||"string"==typeof e)return!1;var t=e.length;return"number"==typeof t&&t>=0&&!(t%1)}(e))return X(e,(function(e){return Q(e)}));if(e instanceof HTMLInputElement){var t=e.type;if("checkbox"===t)return q(e.checked.toString());if("radio"===t)return e.checked?q(e.value):"";if("file"===t){var n=e.files;return null===n?"":X(n,(function(e){return q(e.name)}))}return q(e.value)}return e instanceof HTMLSelectElement?e.multiple?X(e.selectedOptions,(function(e){return q(e.value)})):q(e.value):e instanceof HTMLTextAreaElement?q(e.value):e instanceof HTMLElement?q(e.innerText):e instanceof Node?Q(e.textContent):q(e.toString())}function Y(e){if(e instanceof HTMLFormElement)return Y(new FormData(e));if(e instanceof FormData){var t={};return e.forEach((function(e,n){var i;if(i=e instanceof File?e.name:e,Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];Array.isArray(r)?r.push(i):t[n]=[r,i]}else t[n]=i})),Y(t)}for(var n={},i=Object.keys(e),r=0;r<i.length;r++){var o=i[r];n[o]=Q(e[o])}return void 0===n.to&&(n.to=""),void 0===n.cc&&(n.cc=""),void 0===n.bcc&&(n.bcc=""),void 0===n.subject&&(n.subject=""),void 0===n.body&&(n.body=""),n}function Z(e,t){return C(t+":"+(e=Y(e)).to+"?cc="+e.cc+"&bcc="+e.bcc+"&subject="+e.subject+"&body="+e.body,0,G(c))}var $={installed:!1,name:"App",module:R,Constants:{AppOpenState:e,Messengers:t},Errors:{URLOpenError:j}};export{$ as default};
|