selenium-webdriver 3.5.0 → 4.0.0-alpha.4
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/CHANGES.md +246 -0
- package/LICENSE +1 -1
- package/NOTICE +1 -1
- package/README.md +40 -40
- package/chrome.js +118 -134
- package/edge.js +43 -117
- package/example/chrome_android.js +8 -9
- package/example/chrome_mobile_emulation.js +8 -9
- package/example/firefox_channels.js +23 -19
- package/example/google_search.js +3 -3
- package/example/google_search_test.js +38 -27
- package/example/{chrome_headless.js → headless.js} +15 -7
- package/example/logging.js +40 -7
- package/firefox.js +789 -0
- package/http/index.js +62 -9
- package/http/util.js +11 -6
- package/ie.js +83 -97
- package/index.js +198 -114
- package/io/exec.js +29 -15
- package/io/index.js +1 -1
- package/io/zip.js +1 -1
- package/lib/actions.js +68 -63
- package/lib/atoms/get-attribute.js +86 -0
- package/lib/atoms/is-displayed.js +76 -76
- package/lib/by.js +7 -4
- package/lib/capabilities.js +310 -210
- package/lib/command.js +27 -51
- package/lib/error.js +100 -41
- package/lib/http.js +161 -120
- package/lib/input.js +1044 -8
- package/lib/logging.js +1 -5
- package/lib/promise.js +222 -3331
- package/lib/proxy.js +134 -39
- package/lib/session.js +2 -2
- package/lib/symbols.js +0 -0
- package/lib/until.js +1 -1
- package/lib/webdriver.js +717 -953
- package/net/index.js +21 -25
- package/net/portprober.js +51 -68
- package/package.json +17 -12
- package/proxy.js +0 -0
- package/remote/index.js +63 -44
- package/safari.js +41 -128
- package/testing/index.js +386 -315
- package/.npmignore +0 -2
- package/example/async_await_test.js +0 -68
- package/example/google_search_generator.js +0 -50
- package/example/parallel_flows.js +0 -54
- package/firefox/binary.js +0 -344
- package/firefox/extension.js +0 -224
- package/firefox/index.js +0 -626
- package/firefox/profile.js +0 -394
- package/lib/README +0 -5
- package/lib/atoms/getAttribute.js +0 -9
- package/lib/devmode.js +0 -34
- package/lib/events.js +0 -210
- package/lib/firefox/webdriver.json +0 -70
- package/lib/test/build.js +0 -151
- package/lib/test/data/ClickTest_testClicksASurroundingStrongTag.html +0 -11
- package/lib/test/data/Page.aspx +0 -17
- package/lib/test/data/Page.aspx.cs +0 -22
- package/lib/test/data/Redirect.aspx +0 -11
- package/lib/test/data/Redirect.aspx.cs +0 -9
- package/lib/test/data/Settings.StyleCop +0 -759
- package/lib/test/data/Web.Config +0 -59
- package/lib/test/data/actualXhtmlPage.xhtml +0 -14
- package/lib/test/data/ajaxy_page.html +0 -81
- package/lib/test/data/alerts.html +0 -85
- package/lib/test/data/banner.gif +0 -0
- package/lib/test/data/beach.jpg +0 -0
- package/lib/test/data/blank.html +0 -1
- package/lib/test/data/bodyTypingTest.html +0 -41
- package/lib/test/data/booleanAttributes.html +0 -19
- package/lib/test/data/child/childPage.html +0 -8
- package/lib/test/data/child/grandchild/grandchildPage.html +0 -8
- package/lib/test/data/clickEventPage.html +0 -26
- package/lib/test/data/click_frames.html +0 -10
- package/lib/test/data/click_jacker.html +0 -38
- package/lib/test/data/click_out_of_bounds.html +0 -23
- package/lib/test/data/click_out_of_bounds_overflow.html +0 -85
- package/lib/test/data/click_rtl.html +0 -19
- package/lib/test/data/click_source.html +0 -18
- package/lib/test/data/click_tests/click_iframe.html +0 -6
- package/lib/test/data/click_tests/click_in_iframe.html +0 -8
- package/lib/test/data/click_tests/disabled_element.html +0 -12
- package/lib/test/data/click_tests/disappearing_element.html +0 -62
- package/lib/test/data/click_tests/google_map.html +0 -15
- package/lib/test/data/click_tests/google_map.png +0 -0
- package/lib/test/data/click_tests/html5_submit_buttons.html +0 -16
- package/lib/test/data/click_tests/issue5237.html +0 -9
- package/lib/test/data/click_tests/issue5237_frame.html +0 -1
- package/lib/test/data/click_tests/issue5237_target.html +0 -10
- package/lib/test/data/click_tests/link_that_wraps.html +0 -11
- package/lib/test/data/click_tests/mapped_page1.html +0 -9
- package/lib/test/data/click_tests/mapped_page2.html +0 -9
- package/lib/test/data/click_tests/mapped_page3.html +0 -9
- package/lib/test/data/click_tests/overlapping_elements.html +0 -70
- package/lib/test/data/click_tests/partially_overlapping_elements.html +0 -124
- package/lib/test/data/click_tests/span_that_wraps.html +0 -11
- package/lib/test/data/click_tests/submitted_page.html +0 -9
- package/lib/test/data/click_tests/wrapped_overlapping_elements.html +0 -13
- package/lib/test/data/click_too_big.html +0 -10
- package/lib/test/data/click_too_big_in_frame.html +0 -11
- package/lib/test/data/clicks.html +0 -35
- package/lib/test/data/closeable_window.html +0 -8
- package/lib/test/data/cn-test.html +0 -156
- package/lib/test/data/colorPage.html +0 -20
- package/lib/test/data/cookies.html +0 -30
- package/lib/test/data/coordinates_tests/element_in_frame.html +0 -9
- package/lib/test/data/coordinates_tests/element_in_nested_frame.html +0 -9
- package/lib/test/data/coordinates_tests/page_with_element_out_of_view.html +0 -11
- package/lib/test/data/coordinates_tests/page_with_empty_element.html +0 -10
- package/lib/test/data/coordinates_tests/page_with_fixed_element.html +0 -12
- package/lib/test/data/coordinates_tests/page_with_hidden_element.html +0 -10
- package/lib/test/data/coordinates_tests/page_with_invisible_element.html +0 -10
- package/lib/test/data/coordinates_tests/page_with_transparent_element.html +0 -10
- package/lib/test/data/coordinates_tests/simple_page.html +0 -10
- package/lib/test/data/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- package/lib/test/data/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- package/lib/test/data/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
- package/lib/test/data/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- package/lib/test/data/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- package/lib/test/data/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- package/lib/test/data/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- package/lib/test/data/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- package/lib/test/data/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- package/lib/test/data/css/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
- package/lib/test/data/css/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
- package/lib/test/data/css/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
- package/lib/test/data/css/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
- package/lib/test/data/css/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
- package/lib/test/data/css/ui-lightness/jquery-ui-1.8.10.custom.css +0 -573
- package/lib/test/data/cssTransform.html +0 -61
- package/lib/test/data/cssTransform2.html +0 -20
- package/lib/test/data/document_write_in_onload.html +0 -13
- package/lib/test/data/dragAndDropInsideScrolledDiv.html +0 -67
- package/lib/test/data/dragAndDropTest.html +0 -102
- package/lib/test/data/dragDropOverflow.html +0 -104
- package/lib/test/data/draggableLists.html +0 -67
- package/lib/test/data/droppableItems.html +0 -65
- package/lib/test/data/dynamic.html +0 -39
- package/lib/test/data/dynamicallyModifiedPage.html +0 -42
- package/lib/test/data/errors.html +0 -15
- package/lib/test/data/firefox/jetpack-sample.xpi +0 -0
- package/lib/test/data/firefox/sample.xpi +0 -0
- package/lib/test/data/firefox/webextension.xpi +0 -0
- package/lib/test/data/fixedFooterNoScroll.html +0 -13
- package/lib/test/data/fixedFooterNoScrollQuirksMode.html +0 -12
- package/lib/test/data/formPage.html +0 -175
- package/lib/test/data/formSelectionPage.html +0 -46
- package/lib/test/data/form_handling_js_submit.html +0 -30
- package/lib/test/data/framePage3.html +0 -7
- package/lib/test/data/frameScrollChild.html +0 -26
- package/lib/test/data/frameScrollPage.html +0 -14
- package/lib/test/data/frameScrollParent.html +0 -11
- package/lib/test/data/frameWithAnimals.html +0 -11
- package/lib/test/data/frame_switching_tests/bug4876.html +0 -9
- package/lib/test/data/frame_switching_tests/bug4876_iframe.html +0 -9
- package/lib/test/data/frame_switching_tests/deletingFrame.html +0 -29
- package/lib/test/data/frame_switching_tests/deletingFrame_iframe.html +0 -8
- package/lib/test/data/frame_switching_tests/deletingFrame_iframe2.html +0 -7
- package/lib/test/data/frameset.html +0 -14
- package/lib/test/data/framesetPage2.html +0 -7
- package/lib/test/data/framesetPage3.html +0 -4
- package/lib/test/data/globalscope.html +0 -15
- package/lib/test/data/hidden.html +0 -5
- package/lib/test/data/hidden_partially.html +0 -45
- package/lib/test/data/html5/blue.jpg +0 -0
- package/lib/test/data/html5/database.js +0 -84
- package/lib/test/data/html5/geolocation.js +0 -18
- package/lib/test/data/html5/green.jpg +0 -0
- package/lib/test/data/html5/red.jpg +0 -0
- package/lib/test/data/html5/status.html +0 -1
- package/lib/test/data/html5/test.appcache +0 -11
- package/lib/test/data/html5/yellow.jpg +0 -0
- package/lib/test/data/html5Page.html +0 -32
- package/lib/test/data/icon.gif +0 -0
- package/lib/test/data/idElements.html +0 -2
- package/lib/test/data/iframeAtBottom.html +0 -15
- package/lib/test/data/iframeWithAlert.html +0 -1
- package/lib/test/data/iframeWithIframe.html +0 -1
- package/lib/test/data/iframes.html +0 -11
- package/lib/test/data/injectableContent.html +0 -22
- package/lib/test/data/javascriptEnhancedForm.html +0 -30
- package/lib/test/data/javascriptPage.html +0 -285
- package/lib/test/data/jquery-1.3.2.js +0 -4376
- package/lib/test/data/js/jquery-1.4.4.min.js +0 -167
- package/lib/test/data/js/jquery-ui-1.8.10.custom.min.js +0 -782
- package/lib/test/data/js/skins/lightgray/content.inline.min.css +0 -1
- package/lib/test/data/js/skins/lightgray/content.min.css +0 -1
- package/lib/test/data/js/skins/lightgray/fonts/readme.md +0 -1
- package/lib/test/data/js/skins/lightgray/fonts/tinymce-small.dev.svg +0 -175
- package/lib/test/data/js/skins/lightgray/fonts/tinymce-small.eot +0 -0
- package/lib/test/data/js/skins/lightgray/fonts/tinymce-small.svg +0 -62
- package/lib/test/data/js/skins/lightgray/fonts/tinymce-small.ttf +0 -0
- package/lib/test/data/js/skins/lightgray/fonts/tinymce-small.woff +0 -0
- package/lib/test/data/js/skins/lightgray/fonts/tinymce.dev.svg +0 -153
- package/lib/test/data/js/skins/lightgray/fonts/tinymce.eot +0 -0
- package/lib/test/data/js/skins/lightgray/fonts/tinymce.svg +0 -63
- package/lib/test/data/js/skins/lightgray/fonts/tinymce.ttf +0 -0
- package/lib/test/data/js/skins/lightgray/fonts/tinymce.woff +0 -0
- package/lib/test/data/js/skins/lightgray/img/anchor.gif +0 -0
- package/lib/test/data/js/skins/lightgray/img/loader.gif +0 -0
- package/lib/test/data/js/skins/lightgray/img/object.gif +0 -0
- package/lib/test/data/js/skins/lightgray/img/trans.gif +0 -0
- package/lib/test/data/js/skins/lightgray/skin.ie7.min.css +0 -1
- package/lib/test/data/js/skins/lightgray/skin.min.css +0 -1
- package/lib/test/data/js/themes/modern/theme.min.js +0 -1
- package/lib/test/data/js/tinymce.min.js +0 -10
- package/lib/test/data/key_logger.html +0 -34
- package/lib/test/data/key_tests/remove_on_keypress.html +0 -36
- package/lib/test/data/keyboard_shortcut.html +0 -36
- package/lib/test/data/linked_image.html +0 -16
- package/lib/test/data/locators_tests/boolean_attribute_selected.html +0 -13
- package/lib/test/data/locators_tests/boolean_attribute_selected_html4.html +0 -13
- package/lib/test/data/longContentPage.html +0 -55
- package/lib/test/data/macbeth.html +0 -5255
- package/lib/test/data/map.png +0 -0
- package/lib/test/data/map_visibility.html +0 -8
- package/lib/test/data/markerTransparent.png +0 -0
- package/lib/test/data/messages.html +0 -15
- package/lib/test/data/meta-redirect.html +0 -11
- package/lib/test/data/missedJsReference.html +0 -11
- package/lib/test/data/modal_dialogs/modal_1.html +0 -21
- package/lib/test/data/modal_dialogs/modal_2.html +0 -21
- package/lib/test/data/modal_dialogs/modal_3.html +0 -15
- package/lib/test/data/modal_dialogs/modalindex.html +0 -21
- package/lib/test/data/mouseOver.html +0 -17
- package/lib/test/data/mousePositionTracker.html +0 -33
- package/lib/test/data/nestedElements.html +0 -164
- package/lib/test/data/overflow/x_auto_y_auto.html +0 -30
- package/lib/test/data/overflow/x_auto_y_hidden.html +0 -30
- package/lib/test/data/overflow/x_auto_y_scroll.html +0 -30
- package/lib/test/data/overflow/x_hidden_y_auto.html +0 -30
- package/lib/test/data/overflow/x_hidden_y_hidden.html +0 -30
- package/lib/test/data/overflow/x_hidden_y_scroll.html +0 -30
- package/lib/test/data/overflow/x_scroll_y_auto.html +0 -30
- package/lib/test/data/overflow/x_scroll_y_hidden.html +0 -30
- package/lib/test/data/overflow/x_scroll_y_scroll.html +0 -30
- package/lib/test/data/overflow-body.html +0 -15
- package/lib/test/data/pageWithOnBeforeUnloadMessage.html +0 -20
- package/lib/test/data/pageWithOnLoad.html +0 -6
- package/lib/test/data/pageWithOnUnload.html +0 -6
- package/lib/test/data/page_with_link_to_slow_loading_page.html +0 -6
- package/lib/test/data/plain.txt +0 -1
- package/lib/test/data/proxy/page1.html +0 -20
- package/lib/test/data/proxy/page2.html +0 -24
- package/lib/test/data/proxy/page3.html +0 -5
- package/lib/test/data/readOnlyPage.html +0 -24
- package/lib/test/data/rectangles.html +0 -40
- package/lib/test/data/resultPage.html +0 -25
- package/lib/test/data/rich_text.html +0 -161
- package/lib/test/data/safari/frames_benchmark.html +0 -31
- package/lib/test/data/screen/screen.css +0 -19
- package/lib/test/data/screen/screen.html +0 -72
- package/lib/test/data/screen/screen.js +0 -7
- package/lib/test/data/screen/screen_frame1.html +0 -72
- package/lib/test/data/screen/screen_frame2.html +0 -72
- package/lib/test/data/screen/screen_frames.html +0 -11
- package/lib/test/data/screen/screen_iframes.html +0 -12
- package/lib/test/data/screen/screen_too_long.html +0 -68
- package/lib/test/data/screen/screen_x_long.html +0 -72
- package/lib/test/data/screen/screen_x_too_long.html +0 -72
- package/lib/test/data/screen/screen_y_long.html +0 -72
- package/lib/test/data/screen/screen_y_too_long.html +0 -72
- package/lib/test/data/scroll.html +0 -27
- package/lib/test/data/scroll2.html +0 -21
- package/lib/test/data/scroll3.html +0 -8
- package/lib/test/data/scroll4.html +0 -7
- package/lib/test/data/scroll5.html +0 -18
- package/lib/test/data/scrolling_tests/frame_with_height_above_200.html +0 -26
- package/lib/test/data/scrolling_tests/frame_with_height_above_2000.html +0 -26
- package/lib/test/data/scrolling_tests/frame_with_nested_scrolling_frame.html +0 -11
- package/lib/test/data/scrolling_tests/frame_with_nested_scrolling_frame_out_of_view.html +0 -12
- package/lib/test/data/scrolling_tests/frame_with_small_height.html +0 -10
- package/lib/test/data/scrolling_tests/page_with_double_overflow_auto.html +0 -19
- package/lib/test/data/scrolling_tests/page_with_frame_out_of_view.html +0 -12
- package/lib/test/data/scrolling_tests/page_with_nested_scrolling_frames.html +0 -11
- package/lib/test/data/scrolling_tests/page_with_nested_scrolling_frames_out_of_view.html +0 -12
- package/lib/test/data/scrolling_tests/page_with_non_scrolling_frame.html +0 -11
- package/lib/test/data/scrolling_tests/page_with_scrolling_frame.html +0 -11
- package/lib/test/data/scrolling_tests/page_with_scrolling_frame_out_of_view.html +0 -12
- package/lib/test/data/scrolling_tests/page_with_tall_frame.html +0 -11
- package/lib/test/data/scrolling_tests/page_with_y_overflow_auto.html +0 -14
- package/lib/test/data/scrolling_tests/target_page.html +0 -9
- package/lib/test/data/selectPage.html +0 -58
- package/lib/test/data/selectableItems.html +0 -65
- package/lib/test/data/sessionCookie.html +0 -21
- package/lib/test/data/sessionCookieDest.html +0 -34
- package/lib/test/data/simple.xml +0 -5
- package/lib/test/data/simpleTest.html +0 -98
- package/lib/test/data/single_text_input.html +0 -12
- package/lib/test/data/slowLoadingAlert.html +0 -10
- package/lib/test/data/slowLoadingResourcePage.html +0 -12
- package/lib/test/data/slow_loading_iframes.html +0 -14
- package/lib/test/data/styledPage.html +0 -28
- package/lib/test/data/svgPiechart.xhtml +0 -81
- package/lib/test/data/svgTest.svg +0 -4
- package/lib/test/data/tables.html +0 -36
- package/lib/test/data/tinymce.html +0 -10
- package/lib/test/data/transformable.xml +0 -11
- package/lib/test/data/transformable.xsl +0 -37
- package/lib/test/data/transparentUpload.html +0 -70
- package/lib/test/data/underscore.html +0 -9
- package/lib/test/data/unicode_ltr.html +0 -8
- package/lib/test/data/upload.html +0 -45
- package/lib/test/data/userDefinedProperty.html +0 -8
- package/lib/test/data/veryLargeCanvas.html +0 -81
- package/lib/test/data/visibility-css.html +0 -21
- package/lib/test/data/win32frameset.html +0 -8
- package/lib/test/data/window_switching_tests/page_with_frame.html +0 -12
- package/lib/test/data/window_switching_tests/simple_page.html +0 -9
- package/lib/test/data/xhtmlFormPage.xhtml +0 -17
- package/lib/test/data/xhtmlTest.html +0 -76
- package/lib/test/fileserver.js +0 -321
- package/lib/test/httpserver.js +0 -120
- package/lib/test/index.js +0 -270
- package/lib/test/promise.js +0 -79
- package/lib/test/resources.js +0 -44
- package/opera.js +0 -405
- package/phantomjs.js +0 -282
- package/test/actions_test.js +0 -52
- package/test/chrome/options_test.js +0 -227
- package/test/chrome/service_test.js +0 -45
- package/test/cookie_test.js +0 -214
- package/test/element_finding_test.js +0 -426
- package/test/execute_script_test.js +0 -350
- package/test/fingerprint_test.js +0 -62
- package/test/firefox/extension_test.js +0 -120
- package/test/firefox/firefox_test.js +0 -261
- package/test/firefox/profile_test.js +0 -140
- package/test/http/http_test.js +0 -223
- package/test/http/util_test.js +0 -178
- package/test/io/io_test.js +0 -360
- package/test/io/zip_test.js +0 -128
- package/test/lib/by_test.js +0 -160
- package/test/lib/capabilities_test.js +0 -111
- package/test/lib/error_test.js +0 -305
- package/test/lib/events_test.js +0 -177
- package/test/lib/http_test.js +0 -696
- package/test/lib/logging_test.js +0 -272
- package/test/lib/promise_aplus_test.js +0 -78
- package/test/lib/promise_error_test.js +0 -884
- package/test/lib/promise_flow_test.js +0 -2288
- package/test/lib/promise_generator_test.js +0 -310
- package/test/lib/promise_test.js +0 -1109
- package/test/lib/testutil.js +0 -90
- package/test/lib/until_test.js +0 -478
- package/test/lib/webdriver_test.js +0 -2311
- package/test/logging_test.js +0 -167
- package/test/net/index_test.js +0 -60
- package/test/net/portprober_test.js +0 -128
- package/test/page_loading_test.js +0 -166
- package/test/phantomjs/execute_phantomjs_test.js +0 -59
- package/test/proxy_test.js +0 -180
- package/test/rect_test.js +0 -60
- package/test/remote_test.js +0 -117
- package/test/safari_test.js +0 -108
- package/test/session_test.js +0 -99
- package/test/stale_element_test.js +0 -63
- package/test/tag_name_test.js +0 -36
- package/test/testing/assert_test.js +0 -373
- package/test/testing/index_test.js +0 -224
- package/test/upload_test.js +0 -86
- package/test/window_test.js +0 -161
- package/testing/assert.js +0 -378
package/lib/actions.js
CHANGED
|
@@ -70,7 +70,7 @@ function checkModifierKey(key) {
|
|
|
70
70
|
*
|
|
71
71
|
* Sample usage:
|
|
72
72
|
*
|
|
73
|
-
* driver
|
|
73
|
+
* new LegacyActions(driver).
|
|
74
74
|
* keyDown(Key.SHIFT).
|
|
75
75
|
* click(element1).
|
|
76
76
|
* click(element2).
|
|
@@ -78,8 +78,14 @@ function checkModifierKey(key) {
|
|
|
78
78
|
* keyUp(Key.SHIFT).
|
|
79
79
|
* perform();
|
|
80
80
|
*
|
|
81
|
+
* @deprecated This class is strongly deprecated and will be removed once
|
|
82
|
+
* [Google's Chrome][Chrome] and [Microsoft's Edge][Edge] browsers
|
|
83
|
+
* support the new action sequence API.
|
|
84
|
+
*
|
|
85
|
+
* [Chrome]: https://chromium.googlesource.com/chromium/src/+/master/docs/chromedriver_status.md
|
|
86
|
+
* [Edge]: https://docs.microsoft.com/en-us/microsoft-edge/webdriver
|
|
81
87
|
*/
|
|
82
|
-
class
|
|
88
|
+
class LegacyActionSequence {
|
|
83
89
|
/**
|
|
84
90
|
* @param {!./webdriver.WebDriver} driver The driver that should be used to
|
|
85
91
|
* perform this action sequence.
|
|
@@ -110,21 +116,17 @@ class ActionSequence {
|
|
|
110
116
|
/**
|
|
111
117
|
* Executes this action sequence.
|
|
112
118
|
*
|
|
113
|
-
* @return {
|
|
114
|
-
*
|
|
119
|
+
* @return {!Promise} A promise that will be resolved once this sequence has
|
|
120
|
+
* completed.
|
|
115
121
|
*/
|
|
116
|
-
perform() {
|
|
122
|
+
async perform() {
|
|
117
123
|
// Make a protected copy of the scheduled actions. This will protect against
|
|
118
124
|
// users defining additional commands before this sequence is actually
|
|
119
125
|
// executed.
|
|
120
126
|
let actions = this.actions_.concat();
|
|
121
|
-
let
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
return driver.schedule(action.command, action.description);
|
|
125
|
-
});
|
|
126
|
-
return Promise.all(results);
|
|
127
|
-
}, 'ActionSequence.perform');
|
|
127
|
+
for (let action of actions) {
|
|
128
|
+
await this.driver_.execute(action.command);
|
|
129
|
+
}
|
|
128
130
|
}
|
|
129
131
|
|
|
130
132
|
/**
|
|
@@ -140,10 +142,10 @@ class ActionSequence {
|
|
|
140
142
|
* an offset within that element. The offset should be specified in pixels
|
|
141
143
|
* relative to the top-left corner of the element's bounding box. If
|
|
142
144
|
* omitted, the element's center will be used as the target offset.
|
|
143
|
-
* @return {!
|
|
145
|
+
* @return {!LegacyActionSequence} A self reference.
|
|
144
146
|
*/
|
|
145
147
|
mouseMove(location, opt_offset) {
|
|
146
|
-
let cmd = new command.Command(command.Name.
|
|
148
|
+
let cmd = new command.Command(command.Name.LEGACY_ACTION_MOUSE_MOVE);
|
|
147
149
|
|
|
148
150
|
if (typeof location.x === 'number') {
|
|
149
151
|
setOffset(/** @type {{x: number, y: number}} */(location));
|
|
@@ -176,7 +178,7 @@ class ActionSequence {
|
|
|
176
178
|
* @param {input.Button=} opt_button The button to use. Defaults to
|
|
177
179
|
* {@link input.Button.LEFT}. Ignored if the previous argument is
|
|
178
180
|
* provided as a button.
|
|
179
|
-
* @return {!
|
|
181
|
+
* @return {!LegacyActionSequence} A self reference.
|
|
180
182
|
* @private
|
|
181
183
|
*/
|
|
182
184
|
scheduleMouseAction_(
|
|
@@ -219,11 +221,11 @@ class ActionSequence {
|
|
|
219
221
|
* @param {input.Button=} opt_button The button to use. Defaults to
|
|
220
222
|
* {@link input.Button.LEFT}. Ignored if a button is provided as the
|
|
221
223
|
* first argument.
|
|
222
|
-
* @return {!
|
|
224
|
+
* @return {!LegacyActionSequence} A self reference.
|
|
223
225
|
*/
|
|
224
226
|
mouseDown(opt_elementOrButton, opt_button) {
|
|
225
227
|
return this.scheduleMouseAction_('mouseDown',
|
|
226
|
-
command.Name.
|
|
228
|
+
command.Name.LEGACY_ACTION_MOUSE_DOWN, opt_elementOrButton, opt_button);
|
|
227
229
|
}
|
|
228
230
|
|
|
229
231
|
/**
|
|
@@ -245,11 +247,11 @@ class ActionSequence {
|
|
|
245
247
|
* @param {input.Button=} opt_button The button to use. Defaults to
|
|
246
248
|
* {@link input.Button.LEFT}. Ignored if a button is provided as the
|
|
247
249
|
* first argument.
|
|
248
|
-
* @return {!
|
|
250
|
+
* @return {!LegacyActionSequence} A self reference.
|
|
249
251
|
*/
|
|
250
252
|
mouseUp(opt_elementOrButton, opt_button) {
|
|
251
253
|
return this.scheduleMouseAction_('mouseUp',
|
|
252
|
-
command.Name.
|
|
254
|
+
command.Name.LEGACY_ACTION_MOUSE_UP, opt_elementOrButton, opt_button);
|
|
253
255
|
}
|
|
254
256
|
|
|
255
257
|
/**
|
|
@@ -261,7 +263,7 @@ class ActionSequence {
|
|
|
261
263
|
* @param {(!./webdriver.WebElement|{x: number, y: number})} location The
|
|
262
264
|
* location to drag to, either as another WebElement or an offset in
|
|
263
265
|
* pixels.
|
|
264
|
-
* @return {!
|
|
266
|
+
* @return {!LegacyActionSequence} A self reference.
|
|
265
267
|
*/
|
|
266
268
|
dragAndDrop(element, location) {
|
|
267
269
|
return this.mouseDown(element).mouseMove(location).mouseUp();
|
|
@@ -282,11 +284,11 @@ class ActionSequence {
|
|
|
282
284
|
* @param {input.Button=} opt_button The button to use. Defaults to
|
|
283
285
|
* {@link input.Button.LEFT}. Ignored if a button is provided as the
|
|
284
286
|
* first argument.
|
|
285
|
-
* @return {!
|
|
287
|
+
* @return {!LegacyActionSequence} A self reference.
|
|
286
288
|
*/
|
|
287
289
|
click(opt_elementOrButton, opt_button) {
|
|
288
290
|
return this.scheduleMouseAction_('click',
|
|
289
|
-
command.Name.
|
|
291
|
+
command.Name.LEGACY_ACTION_CLICK, opt_elementOrButton, opt_button);
|
|
290
292
|
}
|
|
291
293
|
|
|
292
294
|
/**
|
|
@@ -307,11 +309,12 @@ class ActionSequence {
|
|
|
307
309
|
* @param {input.Button=} opt_button The button to use. Defaults to
|
|
308
310
|
* {@link input.Button.LEFT}. Ignored if a button is provided as the
|
|
309
311
|
* first argument.
|
|
310
|
-
* @return {!
|
|
312
|
+
* @return {!LegacyActionSequence} A self reference.
|
|
311
313
|
*/
|
|
312
314
|
doubleClick(opt_elementOrButton, opt_button) {
|
|
313
315
|
return this.scheduleMouseAction_('doubleClick',
|
|
314
|
-
command.Name.
|
|
316
|
+
command.Name.LEGACY_ACTION_DOUBLE_CLICK, opt_elementOrButton,
|
|
317
|
+
opt_button);
|
|
315
318
|
}
|
|
316
319
|
|
|
317
320
|
/**
|
|
@@ -320,11 +323,11 @@ class ActionSequence {
|
|
|
320
323
|
* @param {string} description A simple descriptive label for the scheduled
|
|
321
324
|
* action.
|
|
322
325
|
* @param {!Array<(string|!input.Key)>} keys The keys to send.
|
|
323
|
-
* @return {!
|
|
326
|
+
* @return {!LegacyActionSequence} A self reference.
|
|
324
327
|
* @private
|
|
325
328
|
*/
|
|
326
329
|
scheduleKeyboardAction_(description, keys) {
|
|
327
|
-
let cmd = new command.Command(command.Name.
|
|
330
|
+
let cmd = new command.Command(command.Name.LEGACY_ACTION_SEND_KEYS)
|
|
328
331
|
.setParameter('value', keys);
|
|
329
332
|
this.schedule_(description, cmd);
|
|
330
333
|
return this;
|
|
@@ -337,7 +340,7 @@ class ActionSequence {
|
|
|
337
340
|
*
|
|
338
341
|
* @param {!input.Key} key The modifier key to push. Must be one of
|
|
339
342
|
* {ALT, CONTROL, SHIFT, COMMAND, META}.
|
|
340
|
-
* @return {!
|
|
343
|
+
* @return {!LegacyActionSequence} A self reference.
|
|
341
344
|
* @throws {error.InvalidArgumentError} If the key is not a valid modifier
|
|
342
345
|
* key.
|
|
343
346
|
*/
|
|
@@ -351,7 +354,7 @@ class ActionSequence {
|
|
|
351
354
|
* focused element.
|
|
352
355
|
* @param {!input.Key} key The modifier key to release. Must be one of
|
|
353
356
|
* {ALT, CONTROL, SHIFT, COMMAND, META}.
|
|
354
|
-
* @return {!
|
|
357
|
+
* @return {!LegacyActionSequence} A self reference.
|
|
355
358
|
* @throws {error.InvalidArgumentError} If the key is not a valid modifier
|
|
356
359
|
* key.
|
|
357
360
|
*/
|
|
@@ -367,7 +370,7 @@ class ActionSequence {
|
|
|
367
370
|
*
|
|
368
371
|
* @param {...(string|!input.Key|!Array<(string|!input.Key)>)} var_args
|
|
369
372
|
* The keys to type.
|
|
370
|
-
* @return {!
|
|
373
|
+
* @return {!LegacyActionSequence} A self reference.
|
|
371
374
|
* @throws {Error} If the key is not a valid modifier key.
|
|
372
375
|
*/
|
|
373
376
|
sendKeys(var_args) {
|
|
@@ -386,14 +389,20 @@ class ActionSequence {
|
|
|
386
389
|
*
|
|
387
390
|
* Sample usage:
|
|
388
391
|
*
|
|
389
|
-
* driver
|
|
392
|
+
* new LegacyActions(driver).
|
|
390
393
|
* tapAndHold({x: 0, y: 0}).
|
|
391
394
|
* move({x: 3, y: 4}).
|
|
392
395
|
* release({x: 10, y: 10}).
|
|
393
396
|
* perform();
|
|
394
397
|
*
|
|
398
|
+
* @deprecated This class is strongly deprecated and will be removed once
|
|
399
|
+
* [Google's Chrome][Chrome] and [Microsoft's Edge][Edge] browsers
|
|
400
|
+
* support the new action sequence API.
|
|
401
|
+
*
|
|
402
|
+
* [Chrome]: https://chromium.googlesource.com/chromium/src/+/master/docs/chromedriver_status.md
|
|
403
|
+
* [Edge]: https://docs.microsoft.com/en-us/microsoft-edge/webdriver
|
|
395
404
|
*/
|
|
396
|
-
class
|
|
405
|
+
class LegacyTouchSequence {
|
|
397
406
|
/**
|
|
398
407
|
* @param {!./webdriver.WebDriver} driver The driver that should be used to
|
|
399
408
|
* perform this action sequence.
|
|
@@ -422,31 +431,27 @@ class TouchSequence {
|
|
|
422
431
|
|
|
423
432
|
/**
|
|
424
433
|
* Executes this action sequence.
|
|
425
|
-
* @return {
|
|
426
|
-
*
|
|
434
|
+
* @return {!Promise} A promise that will be resolved once this sequence has
|
|
435
|
+
* completed.
|
|
427
436
|
*/
|
|
428
|
-
perform() {
|
|
437
|
+
async perform() {
|
|
429
438
|
// Make a protected copy of the scheduled actions. This will protect against
|
|
430
439
|
// users defining additional commands before this sequence is actually
|
|
431
440
|
// executed.
|
|
432
441
|
let actions = this.actions_.concat();
|
|
433
|
-
let
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
return driver.schedule(action.command, action.description);
|
|
437
|
-
});
|
|
438
|
-
return Promise.all(results);
|
|
439
|
-
}, 'TouchSequence.perform');
|
|
442
|
+
for (let action of actions) {
|
|
443
|
+
await this.driver_.execute(action.command);
|
|
444
|
+
}
|
|
440
445
|
}
|
|
441
446
|
|
|
442
447
|
/**
|
|
443
448
|
* Taps an element.
|
|
444
449
|
*
|
|
445
450
|
* @param {!./webdriver.WebElement} elem The element to tap.
|
|
446
|
-
* @return {!
|
|
451
|
+
* @return {!LegacyTouchSequence} A self reference.
|
|
447
452
|
*/
|
|
448
453
|
tap(elem) {
|
|
449
|
-
let cmd = new command.Command(command.Name.
|
|
454
|
+
let cmd = new command.Command(command.Name.LEGACY_ACTION_TOUCH_SINGLE_TAP).
|
|
450
455
|
setParameter('element', elem.getId());
|
|
451
456
|
|
|
452
457
|
this.schedule_('tap', cmd);
|
|
@@ -457,10 +462,10 @@ class TouchSequence {
|
|
|
457
462
|
* Double taps an element.
|
|
458
463
|
*
|
|
459
464
|
* @param {!./webdriver.WebElement} elem The element to double tap.
|
|
460
|
-
* @return {!
|
|
465
|
+
* @return {!LegacyTouchSequence} A self reference.
|
|
461
466
|
*/
|
|
462
467
|
doubleTap(elem) {
|
|
463
|
-
let cmd = new command.Command(command.Name.
|
|
468
|
+
let cmd = new command.Command(command.Name.LEGACY_ACTION_TOUCH_DOUBLE_TAP).
|
|
464
469
|
setParameter('element', elem.getId());
|
|
465
470
|
|
|
466
471
|
this.schedule_('doubleTap', cmd);
|
|
@@ -471,10 +476,10 @@ class TouchSequence {
|
|
|
471
476
|
* Long press on an element.
|
|
472
477
|
*
|
|
473
478
|
* @param {!./webdriver.WebElement} elem The element to long press.
|
|
474
|
-
* @return {!
|
|
479
|
+
* @return {!LegacyTouchSequence} A self reference.
|
|
475
480
|
*/
|
|
476
481
|
longPress(elem) {
|
|
477
|
-
let cmd = new command.Command(command.Name.
|
|
482
|
+
let cmd = new command.Command(command.Name.LEGACY_ACTION_TOUCH_LONG_PRESS).
|
|
478
483
|
setParameter('element', elem.getId());
|
|
479
484
|
|
|
480
485
|
this.schedule_('longPress', cmd);
|
|
@@ -485,10 +490,10 @@ class TouchSequence {
|
|
|
485
490
|
* Touch down at the given location.
|
|
486
491
|
*
|
|
487
492
|
* @param {{x: number, y: number}} location The location to touch down at.
|
|
488
|
-
* @return {!
|
|
493
|
+
* @return {!LegacyTouchSequence} A self reference.
|
|
489
494
|
*/
|
|
490
495
|
tapAndHold(location) {
|
|
491
|
-
let cmd = new command.Command(command.Name.
|
|
496
|
+
let cmd = new command.Command(command.Name.LEGACY_ACTION_TOUCH_DOWN).
|
|
492
497
|
setParameter('x', location.x).
|
|
493
498
|
setParameter('y', location.y);
|
|
494
499
|
|
|
@@ -500,10 +505,10 @@ class TouchSequence {
|
|
|
500
505
|
* Move a held {@linkplain #tapAndHold touch} to the specified location.
|
|
501
506
|
*
|
|
502
507
|
* @param {{x: number, y: number}} location The location to move to.
|
|
503
|
-
* @return {!
|
|
508
|
+
* @return {!LegacyTouchSequence} A self reference.
|
|
504
509
|
*/
|
|
505
510
|
move(location) {
|
|
506
|
-
let cmd = new command.Command(command.Name.
|
|
511
|
+
let cmd = new command.Command(command.Name.LEGACY_ACTION_TOUCH_MOVE).
|
|
507
512
|
setParameter('x', location.x).
|
|
508
513
|
setParameter('y', location.y);
|
|
509
514
|
|
|
@@ -515,10 +520,10 @@ class TouchSequence {
|
|
|
515
520
|
* Release a held {@linkplain #tapAndHold touch} at the specified location.
|
|
516
521
|
*
|
|
517
522
|
* @param {{x: number, y: number}} location The location to release at.
|
|
518
|
-
* @return {!
|
|
523
|
+
* @return {!LegacyTouchSequence} A self reference.
|
|
519
524
|
*/
|
|
520
525
|
release(location) {
|
|
521
|
-
let cmd = new command.Command(command.Name.
|
|
526
|
+
let cmd = new command.Command(command.Name.LEGACY_ACTION_TOUCH_UP).
|
|
522
527
|
setParameter('x', location.x).
|
|
523
528
|
setParameter('y', location.y);
|
|
524
529
|
|
|
@@ -530,10 +535,10 @@ class TouchSequence {
|
|
|
530
535
|
* Scrolls the touch screen by the given offset.
|
|
531
536
|
*
|
|
532
537
|
* @param {{x: number, y: number}} offset The offset to scroll to.
|
|
533
|
-
* @return {!
|
|
538
|
+
* @return {!LegacyTouchSequence} A self reference.
|
|
534
539
|
*/
|
|
535
540
|
scroll(offset) {
|
|
536
|
-
let cmd = new command.Command(command.Name.
|
|
541
|
+
let cmd = new command.Command(command.Name.LEGACY_ACTION_TOUCH_SCROLL).
|
|
537
542
|
setParameter('xoffset', offset.x).
|
|
538
543
|
setParameter('yoffset', offset.y);
|
|
539
544
|
|
|
@@ -547,10 +552,10 @@ class TouchSequence {
|
|
|
547
552
|
*
|
|
548
553
|
* @param {!./webdriver.WebElement} elem The element where scroll starts.
|
|
549
554
|
* @param {{x: number, y: number}} offset The offset to scroll to.
|
|
550
|
-
* @return {!
|
|
555
|
+
* @return {!LegacyTouchSequence} A self reference.
|
|
551
556
|
*/
|
|
552
557
|
scrollFromElement(elem, offset) {
|
|
553
|
-
let cmd = new command.Command(command.Name.
|
|
558
|
+
let cmd = new command.Command(command.Name.LEGACY_ACTION_TOUCH_SCROLL).
|
|
554
559
|
setParameter('element', elem.getId()).
|
|
555
560
|
setParameter('xoffset', offset.x).
|
|
556
561
|
setParameter('yoffset', offset.y);
|
|
@@ -564,10 +569,10 @@ class TouchSequence {
|
|
|
564
569
|
*
|
|
565
570
|
* @param {{xspeed: number, yspeed: number}} speed The speed to flick in each
|
|
566
571
|
direction, in pixels per second.
|
|
567
|
-
* @return {!
|
|
572
|
+
* @return {!LegacyTouchSequence} A self reference.
|
|
568
573
|
*/
|
|
569
574
|
flick(speed) {
|
|
570
|
-
let cmd = new command.Command(command.Name.
|
|
575
|
+
let cmd = new command.Command(command.Name.LEGACY_ACTION_TOUCH_FLICK).
|
|
571
576
|
setParameter('xspeed', speed.xspeed).
|
|
572
577
|
setParameter('yspeed', speed.yspeed);
|
|
573
578
|
|
|
@@ -581,10 +586,10 @@ class TouchSequence {
|
|
|
581
586
|
* @param {!./webdriver.WebElement} elem The element where flick starts.
|
|
582
587
|
* @param {{x: number, y: number}} offset The offset to flick to.
|
|
583
588
|
* @param {number} speed The speed to flick at in pixels per second.
|
|
584
|
-
* @return {!
|
|
589
|
+
* @return {!LegacyTouchSequence} A self reference.
|
|
585
590
|
*/
|
|
586
591
|
flickElement(elem, offset, speed) {
|
|
587
|
-
let cmd = new command.Command(command.Name.
|
|
592
|
+
let cmd = new command.Command(command.Name.LEGACY_ACTION_TOUCH_FLICK).
|
|
588
593
|
setParameter('element', elem.getId()).
|
|
589
594
|
setParameter('xoffset', offset.x).
|
|
590
595
|
setParameter('yoffset', offset.y).
|
|
@@ -599,6 +604,6 @@ class TouchSequence {
|
|
|
599
604
|
// PUBLIC API
|
|
600
605
|
|
|
601
606
|
module.exports = {
|
|
602
|
-
|
|
603
|
-
|
|
607
|
+
LegacyActionSequence,
|
|
608
|
+
LegacyTouchSequence,
|
|
604
609
|
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// GENERATED CODE - DO NOT EDIT
|
|
2
|
+
module.exports = function(){return (function(){var g=this;function l(a){return"string"==typeof a}function aa(a,b){a=a.split(".");var c=g;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b}
|
|
3
|
+
function ba(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
|
|
4
|
+
else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ca(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function da(a,b,c){return a.call.apply(a.bind,arguments)}function ea(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var e=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(e,d);return a.apply(b,e)}}return function(){return a.apply(b,arguments)}}
|
|
5
|
+
function fa(a,b,c){Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?fa=da:fa=ea;return fa.apply(null,arguments)}function ha(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var d=c.slice();d.push.apply(d,arguments);return a.apply(this,d)}}
|
|
6
|
+
function m(a,b){function c(){}c.prototype=b.prototype;a.M=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.L=function(d,e,f){for(var h=Array(arguments.length-2),k=2;k<arguments.length;k++)h[k-2]=arguments[k];return b.prototype[e].apply(d,h)}};/*
|
|
7
|
+
|
|
8
|
+
The MIT License
|
|
9
|
+
|
|
10
|
+
Copyright (c) 2007 Cybozu Labs, Inc.
|
|
11
|
+
Copyright (c) 2012 Google Inc.
|
|
12
|
+
|
|
13
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
14
|
+
of this software and associated documentation files (the "Software"), to
|
|
15
|
+
deal in the Software without restriction, including without limitation the
|
|
16
|
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
17
|
+
sell copies of the Software, and to permit persons to whom the Software is
|
|
18
|
+
furnished to do so, subject to the following conditions:
|
|
19
|
+
|
|
20
|
+
The above copyright notice and this permission notice shall be included in
|
|
21
|
+
all copies or substantial portions of the Software.
|
|
22
|
+
|
|
23
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
24
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
25
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
26
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
27
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
28
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
29
|
+
IN THE SOFTWARE.
|
|
30
|
+
*/
|
|
31
|
+
function n(a,b,c){this.a=a;this.b=b||1;this.f=c||1};var ia=Array.prototype.indexOf?function(a,b){return Array.prototype.indexOf.call(a,b,void 0)}:function(a,b){if(l(a))return l(b)&&1==b.length?a.indexOf(b,0):-1;for(var c=0;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},p=Array.prototype.forEach?function(a,b){Array.prototype.forEach.call(a,b,void 0)}:function(a,b){for(var c=a.length,d=l(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(void 0,d[e],e,a)},ja=Array.prototype.filter?function(a,b){return Array.prototype.filter.call(a,b,void 0)}:function(a,
|
|
32
|
+
b){for(var c=a.length,d=[],e=0,f=l(a)?a.split(""):a,h=0;h<c;h++)if(h in f){var k=f[h];b.call(void 0,k,h,a)&&(d[e++]=k)}return d},q=Array.prototype.reduce?function(a,b,c){return Array.prototype.reduce.call(a,b,c)}:function(a,b,c){var d=c;p(a,function(e,f){d=b.call(void 0,d,e,f,a)});return d},ka=Array.prototype.some?function(a,b){return Array.prototype.some.call(a,b,void 0)}:function(a,b){for(var c=a.length,d=l(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a))return!0;return!1};
|
|
33
|
+
function la(a,b){a:{for(var c=a.length,d=l(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){b=e;break a}b=-1}return 0>b?null:l(a)?a.charAt(b):a[b]}function ma(a){return Array.prototype.concat.apply([],arguments)}function na(a,b,c){return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)};var r;a:{var oa=g.navigator;if(oa){var pa=oa.userAgent;if(pa){r=pa;break a}}r=""}function u(a){return-1!=r.indexOf(a)};function qa(){return u("Firefox")||u("FxiOS")}function ra(){return(u("Chrome")||u("CriOS"))&&!u("Edge")};function sa(){return u("iPhone")&&!u("iPod")&&!u("iPad")};var ta=u("Opera"),v=u("Trident")||u("MSIE"),ua=u("Edge"),va=u("Gecko")&&!(-1!=r.toLowerCase().indexOf("webkit")&&!u("Edge"))&&!(u("Trident")||u("MSIE"))&&!u("Edge"),wa=-1!=r.toLowerCase().indexOf("webkit")&&!u("Edge"),xa=u("Macintosh"),ya=u("Windows");function za(){var a=g.document;return a?a.documentMode:void 0}var Aa;
|
|
34
|
+
a:{var Ba="",Ca=function(){var a=r;if(va)return/rv:([^\);]+)(\)|;)/.exec(a);if(ua)return/Edge\/([\d\.]+)/.exec(a);if(v)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(wa)return/WebKit\/(\S+)/.exec(a);if(ta)return/(?:Version)[ \/]?(\S+)/.exec(a)}();Ca&&(Ba=Ca?Ca[1]:"");if(v){var Da=za();if(null!=Da&&Da>parseFloat(Ba)){Aa=String(Da);break a}}Aa=Ba}var w;var Ea=g.document;w=Ea&&v?za()||("CSS1Compat"==Ea.compatMode?parseInt(Aa,10):5):void 0;var x=v&&!(9<=Number(w)),Fa=v&&!(8<=Number(w));function y(a,b,c,d){this.a=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.parentNode=this.ownerElement=b}function Ga(a,b){var c=Fa&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new y(b,a,b.nodeName,c)};function Ha(a){this.b=a;this.a=0}function Ia(a){a=a.match(Ja);for(var b=0;b<a.length;b++)Ka.test(a[b])&&a.splice(b,1);return new Ha(a)}var Ja=/\$?(?:(?![0-9-\.])(?:\*|[\w-\.]+):)?(?![0-9-\.])(?:\*|[\w-\.]+)|\/\/|\.\.|::|\d+(?:\.\d*)?|\.\d+|"[^"]*"|'[^']*'|[!<>]=|\s+|./g,Ka=/^\s/;function A(a,b){return a.b[a.a+(b||0)]}function B(a){return a.b[a.a++]}function La(a){return a.b.length<=a.a};function Ma(a,b){if(!a||!b)return!1;if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||!!(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a}
|
|
35
|
+
function Na(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(v&&!(9<=Number(w))){if(9==a.nodeType)return-1;if(9==b.nodeType)return 1}if("sourceIndex"in a||a.parentNode&&"sourceIndex"in a.parentNode){var c=1==a.nodeType,d=1==b.nodeType;if(c&&d)return a.sourceIndex-b.sourceIndex;var e=a.parentNode,f=b.parentNode;return e==f?Oa(a,b):!c&&Ma(e,b)?-1*Pa(a,b):!d&&Ma(f,a)?Pa(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=9==a.nodeType?
|
|
36
|
+
a:a.ownerDocument||a.document;c=d.createRange();c.selectNode(a);c.collapse(!0);a=d.createRange();a.selectNode(b);a.collapse(!0);return c.compareBoundaryPoints(g.Range.START_TO_END,a)}function Pa(a,b){var c=a.parentNode;if(c==b)return-1;for(;b.parentNode!=c;)b=b.parentNode;return Oa(b,a)}function Oa(a,b){for(;b=b.previousSibling;)if(b==a)return-1;return 1}var Qa={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},Ra={IMG:" ",BR:"\n"};
|
|
37
|
+
function Sa(a,b,c){if(!(a.nodeName in Qa))if(3==a.nodeType)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in Ra)b.push(Ra[a.nodeName]);else for(a=a.firstChild;a;)Sa(a,b,c),a=a.nextSibling};function C(a){var b=null,c=a.nodeType;1==c&&(b=a.textContent,b=void 0==b||null==b?a.innerText:b,b=void 0==b||null==b?"":b);if("string"!=typeof b)if(x&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;c=0;var d=[];for(b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),x&&"title"==a.nodeName.toLowerCase()&&(b+=a.text),d[c++]=a;while(a=a.firstChild);for(;c&&!(a=d[--c].nextSibling););}}else b=a.nodeValue;return b}
|
|
38
|
+
function D(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}Fa&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function Ta(a,b,c,d,e){return(x?Ua:Va).call(null,a,b,l(c)?c:null,l(d)?d:null,e||new E)}
|
|
39
|
+
function Ua(a,b,c,d,e){if(a instanceof F||8==a.b||c&&null===a.b){var f=b.all;if(!f)return e;a=Wa(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var h=[],k=0;b=f[k++];)D(b,c,d)&&h.push(b);f=h}for(k=0;b=f[k++];)"*"==a&&"!"==b.tagName||e.add(b);return e}Xa(a,b,c,d,e);return e}
|
|
40
|
+
function Va(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!v?(b=b.getElementsByName(d),p(b,function(f){a.a(f)&&e.add(f)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),p(b,function(f){f.className==d&&a.a(f)&&e.add(f)})):a instanceof G?Xa(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.f()),p(b,function(f){D(f,c,d)&&e.add(f)}));return e}
|
|
41
|
+
function Ya(a,b,c,d,e){var f;if((a instanceof F||8==a.b||c&&null===a.b)&&(f=b.childNodes)){var h=Wa(a);if("*"!=h&&(f=ja(f,function(k){return k.tagName&&k.tagName.toLowerCase()==h}),!f))return e;c&&(f=ja(f,function(k){return D(k,c,d)}));p(f,function(k){"*"==h&&("!"==k.tagName||"*"==h&&1!=k.nodeType)||e.add(k)});return e}return Za(a,b,c,d,e)}function Za(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)D(b,c,d)&&a.a(b)&&e.add(b);return e}
|
|
42
|
+
function Xa(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)D(b,c,d)&&a.a(b)&&e.add(b),Xa(a,b,c,d,e)}function Wa(a){if(a instanceof G){if(8==a.b)return"!";if(null===a.b)return"*"}return a.f()};function E(){this.b=this.a=null;this.o=0}function $a(a){this.f=a;this.a=this.b=null}function ab(a,b){if(!a.a)return b;if(!b.a)return a;var c=a.a;b=b.a;for(var d=null,e,f=0;c&&b;){e=c.f;var h=b.f;e==h||e instanceof y&&h instanceof y&&e.a==h.a?(e=c,c=c.a,b=b.a):0<Na(c.f,b.f)?(e=b,b=b.a):(e=c,c=c.a);(e.b=d)?d.a=e:a.a=e;d=e;f++}for(e=c||b;e;)e.b=d,d=d.a=e,f++,e=e.a;a.b=d;a.o=f;return a}function bb(a,b){b=new $a(b);b.a=a.a;a.b?a.a.b=b:a.a=a.b=b;a.a=b;a.o++}
|
|
43
|
+
E.prototype.add=function(a){a=new $a(a);a.b=this.b;this.a?this.b.a=a:this.a=this.b=a;this.b=a;this.o++};function cb(a){return(a=a.a)?a.f:null}function db(a){return(a=cb(a))?C(a):""}function H(a,b){return new eb(a,!!b)}function eb(a,b){this.f=a;this.b=(this.v=b)?a.b:a.a;this.a=null}function I(a){var b=a.b;if(null==b)return null;var c=a.a=b;a.b=a.v?b.b:b.a;return c.f};function J(a){this.l=a;this.b=this.i=!1;this.f=null}function K(a){return"\n "+a.toString().split("\n").join("\n ")}function fb(a,b){a.i=b}function gb(a,b){a.b=b}function L(a,b){a=a.a(b);return a instanceof E?+db(a):+a}function M(a,b){a=a.a(b);return a instanceof E?db(a):""+a}function N(a,b){a=a.a(b);return a instanceof E?!!a.o:!!a};function hb(a,b,c){J.call(this,a.l);this.c=a;this.j=b;this.u=c;this.i=b.i||c.i;this.b=b.b||c.b;this.c==ib&&(c.b||c.i||4==c.l||0==c.l||!b.f?b.b||b.i||4==b.l||0==b.l||!c.f||(this.f={name:c.f.name,w:b}):this.f={name:b.f.name,w:c})}m(hb,J);
|
|
44
|
+
function O(a,b,c,d,e){b=b.a(d);c=c.a(d);var f;if(b instanceof E&&c instanceof E){b=H(b);for(d=I(b);d;d=I(b))for(e=H(c),f=I(e);f;f=I(e))if(a(C(d),C(f)))return!0;return!1}if(b instanceof E||c instanceof E){b instanceof E?(e=b,d=c):(e=c,d=b);f=H(e);for(var h=typeof d,k=I(f);k;k=I(f)){switch(h){case "number":k=+C(k);break;case "boolean":k=!!C(k);break;case "string":k=C(k);break;default:throw Error("Illegal primitive type for comparison.");}if(e==b&&a(k,d)||e==c&&a(d,k))return!0}return!1}return e?"boolean"==
|
|
45
|
+
typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}hb.prototype.a=function(a){return this.c.s(this.j,this.u,a)};hb.prototype.toString=function(){var a="Binary Expression: "+this.c;a+=K(this.j);return a+=K(this.u)};function jb(a,b,c,d){this.J=a;this.F=b;this.l=c;this.s=d}jb.prototype.toString=function(){return this.J};var kb={};
|
|
46
|
+
function P(a,b,c,d){if(kb.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new jb(a,b,c,d);return kb[a.toString()]=a}P("div",6,1,function(a,b,c){return L(a,c)/L(b,c)});P("mod",6,1,function(a,b,c){return L(a,c)%L(b,c)});P("*",6,1,function(a,b,c){return L(a,c)*L(b,c)});P("+",5,1,function(a,b,c){return L(a,c)+L(b,c)});P("-",5,1,function(a,b,c){return L(a,c)-L(b,c)});P("<",4,2,function(a,b,c){return O(function(d,e){return d<e},a,b,c)});
|
|
47
|
+
P(">",4,2,function(a,b,c){return O(function(d,e){return d>e},a,b,c)});P("<=",4,2,function(a,b,c){return O(function(d,e){return d<=e},a,b,c)});P(">=",4,2,function(a,b,c){return O(function(d,e){return d>=e},a,b,c)});var ib=P("=",3,2,function(a,b,c){return O(function(d,e){return d==e},a,b,c,!0)});P("!=",3,2,function(a,b,c){return O(function(d,e){return d!=e},a,b,c,!0)});P("and",2,2,function(a,b,c){return N(a,c)&&N(b,c)});P("or",1,2,function(a,b,c){return N(a,c)||N(b,c)});function lb(a,b){if(b.a.length&&4!=a.l)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");J.call(this,a.l);this.c=a;this.j=b;this.i=a.i;this.b=a.b}m(lb,J);lb.prototype.a=function(a){a=this.c.a(a);return mb(this.j,a)};lb.prototype.toString=function(){var a="Filter:"+K(this.c);return a+=K(this.j)};function nb(a,b){if(b.length<a.D)throw Error("Function "+a.m+" expects at least"+a.D+" arguments, "+b.length+" given");if(null!==a.C&&b.length>a.C)throw Error("Function "+a.m+" expects at most "+a.C+" arguments, "+b.length+" given");a.I&&p(b,function(c,d){if(4!=c.l)throw Error("Argument "+d+" to function "+a.m+" is not of type Nodeset: "+c);});J.call(this,a.l);this.A=a;this.c=b;fb(this,a.i||ka(b,function(c){return c.i}));gb(this,a.H&&!b.length||a.G&&!!b.length||ka(b,function(c){return c.b}))}
|
|
48
|
+
m(nb,J);nb.prototype.a=function(a){return this.A.s.apply(null,ma(a,this.c))};nb.prototype.toString=function(){var a="Function: "+this.A;if(this.c.length){var b=q(this.c,function(c,d){return c+K(d)},"Arguments:");a+=K(b)}return a};function ob(a,b,c,d,e,f,h,k){this.m=a;this.l=b;this.i=c;this.H=d;this.G=!1;this.s=e;this.D=f;this.C=void 0!==h?h:f;this.I=!!k}ob.prototype.toString=function(){return this.m};var pb={};
|
|
49
|
+
function Q(a,b,c,d,e,f,h,k){if(pb.hasOwnProperty(a))throw Error("Function already created: "+a+".");pb[a]=new ob(a,b,c,d,e,f,h,k)}Q("boolean",2,!1,!1,function(a,b){return N(b,a)},1);Q("ceiling",1,!1,!1,function(a,b){return Math.ceil(L(b,a))},1);Q("concat",3,!1,!1,function(a,b){return q(na(arguments,1),function(c,d){return c+M(d,a)},"")},2,null);Q("contains",2,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);return-1!=b.indexOf(a)},2);Q("count",1,!1,!1,function(a,b){return b.a(a).o},1,1,!0);
|
|
50
|
+
Q("false",2,!1,!1,function(){return!1},0);Q("floor",1,!1,!1,function(a,b){return Math.floor(L(b,a))},1);Q("id",4,!1,!1,function(a,b){function c(k){if(x){var t=e.all[k];if(t){if(t.nodeType&&k==t.id)return t;if(t.length)return la(t,function(z){return k==z.id})}return null}return e.getElementById(k)}var d=a.a,e=9==d.nodeType?d:d.ownerDocument;a=M(b,a).split(/\s+/);var f=[];p(a,function(k){k=c(k);!k||0<=ia(f,k)||f.push(k)});f.sort(Na);var h=new E;p(f,function(k){h.add(k)});return h},1);
|
|
51
|
+
Q("lang",2,!1,!1,function(){return!1},1);Q("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.f},0);Q("local-name",3,!1,!0,function(a,b){return(a=b?cb(b.a(a)):a.a)?a.localName||a.nodeName.toLowerCase():""},0,1,!0);Q("name",3,!1,!0,function(a,b){return(a=b?cb(b.a(a)):a.a)?a.nodeName.toLowerCase():""},0,1,!0);Q("namespace-uri",3,!0,!1,function(){return""},0,1,!0);
|
|
52
|
+
Q("normalize-space",3,!1,!0,function(a,b){return(b?M(b,a):C(a.a)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1);Q("not",2,!1,!1,function(a,b){return!N(b,a)},1);Q("number",1,!1,!0,function(a,b){return b?L(b,a):+C(a.a)},0,1);Q("position",1,!0,!1,function(a){return a.b},0);Q("round",1,!1,!1,function(a,b){return Math.round(L(b,a))},1);Q("starts-with",2,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);return 0==b.lastIndexOf(a,0)},2);Q("string",3,!1,!0,function(a,b){return b?M(b,a):C(a.a)},0,1);
|
|
53
|
+
Q("string-length",1,!1,!0,function(a,b){return(b?M(b,a):C(a.a)).length},0,1);Q("substring",3,!1,!1,function(a,b,c,d){c=L(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?L(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=M(b,a);return Infinity==d?a.substring(e):a.substring(e,c+Math.round(d))},2,3);Q("substring-after",3,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2);
|
|
54
|
+
Q("substring-before",3,!1,!1,function(a,b,c){b=M(b,a);a=M(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);Q("sum",1,!1,!1,function(a,b){a=H(b.a(a));b=0;for(var c=I(a);c;c=I(a))b+=+C(c);return b},1,1,!0);Q("translate",3,!1,!1,function(a,b,c,d){b=M(b,a);c=M(c,a);var e=M(d,a);a={};for(d=0;d<c.length;d++){var f=c.charAt(d);f in a||(a[f]=e.charAt(d))}c="";for(d=0;d<b.length;d++)f=b.charAt(d),c+=f in a?a[f]:f;return c},3);Q("true",2,!1,!1,function(){return!0},0);function G(a,b){this.j=a;this.c=void 0!==b?b:null;this.b=null;switch(a){case "comment":this.b=8;break;case "text":this.b=3;break;case "processing-instruction":this.b=7;break;case "node":break;default:throw Error("Unexpected argument");}}function qb(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}G.prototype.a=function(a){return null===this.b||this.b==a.nodeType};G.prototype.f=function(){return this.j};
|
|
55
|
+
G.prototype.toString=function(){var a="Kind Test: "+this.j;null===this.c||(a+=K(this.c));return a};function rb(a){J.call(this,3);this.c=a.substring(1,a.length-1)}m(rb,J);rb.prototype.a=function(){return this.c};rb.prototype.toString=function(){return"Literal: "+this.c};function F(a,b){this.m=a.toLowerCase();a="*"==this.m?"*":"http://www.w3.org/1999/xhtml";this.c=b?b.toLowerCase():a}F.prototype.a=function(a){var b=a.nodeType;if(1!=b&&2!=b)return!1;b=void 0!==a.localName?a.localName:a.nodeName;return"*"!=this.m&&this.m!=b.toLowerCase()?!1:"*"==this.c?!0:this.c==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};F.prototype.f=function(){return this.m};
|
|
56
|
+
F.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.c?"":this.c+":")+this.m};function sb(a){J.call(this,1);this.c=a}m(sb,J);sb.prototype.a=function(){return this.c};sb.prototype.toString=function(){return"Number: "+this.c};function tb(a,b){J.call(this,a.l);this.j=a;this.c=b;this.i=a.i;this.b=a.b;1==this.c.length&&(a=this.c[0],a.B||a.c!=ub||(a=a.u,"*"!=a.f()&&(this.f={name:a.f(),w:null})))}m(tb,J);function vb(){J.call(this,4)}m(vb,J);vb.prototype.a=function(a){var b=new E;a=a.a;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};vb.prototype.toString=function(){return"Root Helper Expression"};function wb(){J.call(this,4)}m(wb,J);wb.prototype.a=function(a){var b=new E;b.add(a.a);return b};wb.prototype.toString=function(){return"Context Helper Expression"};
|
|
57
|
+
function xb(a){return"/"==a||"//"==a}tb.prototype.a=function(a){var b=this.j.a(a);if(!(b instanceof E))throw Error("Filter expression must evaluate to nodeset.");a=this.c;for(var c=0,d=a.length;c<d&&b.o;c++){var e=a[c],f=H(b,e.c.v);if(e.i||e.c!=yb)if(e.i||e.c!=zb){var h=I(f);for(b=e.a(new n(h));null!=(h=I(f));)h=e.a(new n(h)),b=ab(b,h)}else h=I(f),b=e.a(new n(h));else{for(h=I(f);(b=I(f))&&(!h.contains||h.contains(b))&&b.compareDocumentPosition(h)&8;h=b);b=e.a(new n(h))}}return b};
|
|
58
|
+
tb.prototype.toString=function(){var a="Path Expression:"+K(this.j);if(this.c.length){var b=q(this.c,function(c,d){return c+K(d)},"Steps:");a+=K(b)}return a};function Ab(a,b){this.a=a;this.v=!!b}
|
|
59
|
+
function mb(a,b,c){for(c=c||0;c<a.a.length;c++)for(var d=a.a[c],e=H(b),f=b.o,h,k=0;h=I(e);k++){var t=a.v?f-k:k+1;h=d.a(new n(h,t,f));if("number"==typeof h)t=t==h;else if("string"==typeof h||"boolean"==typeof h)t=!!h;else if(h instanceof E)t=0<h.o;else throw Error("Predicate.evaluate returned an unexpected type.");if(!t){t=e;h=t.f;var z=t.a;if(!z)throw Error("Next must be called at least once before remove.");var Y=z.b;z=z.a;Y?Y.a=z:h.a=z;z?z.b=Y:h.b=Y;h.o--;t.a=null}}return b}
|
|
60
|
+
Ab.prototype.toString=function(){return q(this.a,function(a,b){return a+K(b)},"Predicates:")};function R(a,b,c,d){J.call(this,4);this.c=a;this.u=b;this.j=c||new Ab([]);this.B=!!d;b=this.j;b=0<b.a.length?b.a[0].f:null;a.K&&b&&(a=b.name,a=x?a.toLowerCase():a,this.f={name:a,w:b.w});a:{a=this.j;for(b=0;b<a.a.length;b++)if(c=a.a[b],c.i||1==c.l||0==c.l){a=!0;break a}a=!1}this.i=a}m(R,J);
|
|
61
|
+
R.prototype.a=function(a){var b=a.a,c=this.f,d=null,e=null,f=0;c&&(d=c.name,e=c.w?M(c.w,a):null,f=1);if(this.B)if(this.i||this.c!=Bb)if(b=H((new R(Cb,new G("node"))).a(a)),c=I(b))for(a=this.s(c,d,e,f);null!=(c=I(b));)a=ab(a,this.s(c,d,e,f));else a=new E;else a=Ta(this.u,b,d,e),a=mb(this.j,a,f);else a=this.s(a.a,d,e,f);return a};R.prototype.s=function(a,b,c,d){a=this.c.A(this.u,a,b,c);return a=mb(this.j,a,d)};
|
|
62
|
+
R.prototype.toString=function(){var a="Step:"+K("Operator: "+(this.B?"//":"/"));this.c.m&&(a+=K("Axis: "+this.c));a+=K(this.u);if(this.j.a.length){var b=q(this.j.a,function(c,d){return c+K(d)},"Predicates:");a+=K(b)}return a};function Db(a,b,c,d){this.m=a;this.A=b;this.v=c;this.K=d}Db.prototype.toString=function(){return this.m};var Eb={};function S(a,b,c,d){if(Eb.hasOwnProperty(a))throw Error("Axis already created: "+a);b=new Db(a,b,c,!!d);return Eb[a]=b}
|
|
63
|
+
S("ancestor",function(a,b){for(var c=new E;b=b.parentNode;)a.a(b)&&bb(c,b);return c},!0);S("ancestor-or-self",function(a,b){var c=new E;do a.a(b)&&bb(c,b);while(b=b.parentNode);return c},!0);
|
|
64
|
+
var ub=S("attribute",function(a,b){var c=new E,d=a.f();if("style"==d&&x&&b.style)return c.add(new y(b.style,b,"style",b.style.cssText)),c;var e=b.attributes;if(e)if(a instanceof G&&null===a.b||"*"==d)for(a=0;d=e[a];a++)x?d.nodeValue&&c.add(Ga(b,d)):c.add(d);else(d=e.getNamedItem(d))&&(x?d.nodeValue&&c.add(Ga(b,d)):c.add(d));return c},!1),Bb=S("child",function(a,b,c,d,e){return(x?Ya:Za).call(null,a,b,l(c)?c:null,l(d)?d:null,e||new E)},!1,!0);S("descendant",Ta,!1,!0);
|
|
65
|
+
var Cb=S("descendant-or-self",function(a,b,c,d){var e=new E;D(b,c,d)&&a.a(b)&&e.add(b);return Ta(a,b,c,d,e)},!1,!0),yb=S("following",function(a,b,c,d){var e=new E;do for(var f=b;f=f.nextSibling;)D(f,c,d)&&a.a(f)&&e.add(f),e=Ta(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);S("following-sibling",function(a,b){for(var c=new E;b=b.nextSibling;)a.a(b)&&c.add(b);return c},!1);S("namespace",function(){return new E},!1);
|
|
66
|
+
var Fb=S("parent",function(a,b){var c=new E;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;b=b.parentNode;a.a(b)&&c.add(b);return c},!1),zb=S("preceding",function(a,b,c,d){var e=new E,f=[];do f.unshift(b);while(b=b.parentNode);for(var h=1,k=f.length;h<k;h++){var t=[];for(b=f[h];b=b.previousSibling;)t.unshift(b);for(var z=0,Y=t.length;z<Y;z++)b=t[z],D(b,c,d)&&a.a(b)&&e.add(b),e=Ta(a,b,c,d,e)}return e},!0,!0);
|
|
67
|
+
S("preceding-sibling",function(a,b){for(var c=new E;b=b.previousSibling;)a.a(b)&&bb(c,b);return c},!0);var Gb=S("self",function(a,b){var c=new E;a.a(b)&&c.add(b);return c},!1);function Hb(a){J.call(this,1);this.c=a;this.i=a.i;this.b=a.b}m(Hb,J);Hb.prototype.a=function(a){return-L(this.c,a)};Hb.prototype.toString=function(){return"Unary Expression: -"+K(this.c)};function Ib(a){J.call(this,4);this.c=a;fb(this,ka(this.c,function(b){return b.i}));gb(this,ka(this.c,function(b){return b.b}))}m(Ib,J);Ib.prototype.a=function(a){var b=new E;p(this.c,function(c){c=c.a(a);if(!(c instanceof E))throw Error("Path expression must evaluate to NodeSet.");b=ab(b,c)});return b};Ib.prototype.toString=function(){return q(this.c,function(a,b){return a+K(b)},"Union Expression:")};function Jb(a,b){this.a=a;this.b=b}function Kb(a){for(var b,c=[];;){T(a,"Missing right hand side of binary expression.");b=Lb(a);var d=B(a.a);if(!d)break;var e=(d=kb[d]||null)&&d.F;if(!e){a.a.a--;break}for(;c.length&&e<=c[c.length-1].F;)b=new hb(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new hb(c.pop(),c.pop(),b);return b}function T(a,b){if(La(a.a))throw Error(b);}function Mb(a,b){a=B(a.a);if(a!=b)throw Error("Bad token, expected: "+b+" got: "+a);}
|
|
68
|
+
function Nb(a){a=B(a.a);if(")"!=a)throw Error("Bad token: "+a);}function Ob(a){a=B(a.a);if(2>a.length)throw Error("Unclosed literal string");return new rb(a)}
|
|
69
|
+
function Pb(a){var b=[];if(xb(A(a.a))){var c=B(a.a);var d=A(a.a);if("/"==c&&(La(a.a)||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new vb;d=new vb;T(a,"Missing next location step.");c=Qb(a,c);b.push(c)}else{a:{c=A(a.a);d=c.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":B(a.a);c=Kb(a);T(a,'unclosed "("');Mb(a,")");break;case '"':case "'":c=Ob(a);break;default:if(isNaN(+c))if(!qb(c)&&/(?![0-9])[\w]/.test(d)&&"("==A(a.a,1)){c=B(a.a);
|
|
70
|
+
c=pb[c]||null;B(a.a);for(d=[];")"!=A(a.a);){T(a,"Missing function argument list.");d.push(Kb(a));if(","!=A(a.a))break;B(a.a)}T(a,"Unclosed function argument list.");Nb(a);c=new nb(c,d)}else{c=null;break a}else c=new sb(+B(a.a))}"["==A(a.a)&&(d=new Ab(Rb(a)),c=new lb(c,d))}if(c)if(xb(A(a.a)))d=c;else return c;else c=Qb(a,"/"),d=new wb,b.push(c)}for(;xb(A(a.a));)c=B(a.a),T(a,"Missing next location step."),c=Qb(a,c),b.push(c);return new tb(d,b)}
|
|
71
|
+
function Qb(a,b){if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==A(a.a)){var c=new R(Gb,new G("node"));B(a.a);return c}if(".."==A(a.a))return c=new R(Fb,new G("node")),B(a.a),c;if("@"==A(a.a)){var d=ub;B(a.a);T(a,"Missing attribute name")}else if("::"==A(a.a,1)){if(!/(?![0-9])[\w]/.test(A(a.a).charAt(0)))throw Error("Bad token: "+B(a.a));var e=B(a.a);d=Eb[e]||null;if(!d)throw Error("No axis with name: "+e);B(a.a);T(a,"Missing node name")}else d=Bb;e=A(a.a);if(/(?![0-9])[\w\*]/.test(e.charAt(0)))if("("==
|
|
72
|
+
A(a.a,1)){if(!qb(e))throw Error("Invalid node type: "+e);e=B(a.a);if(!qb(e))throw Error("Invalid type name: "+e);Mb(a,"(");T(a,"Bad nodetype");var f=A(a.a).charAt(0),h=null;if('"'==f||"'"==f)h=Ob(a);T(a,"Bad nodetype");Nb(a);e=new G(e,h)}else if(e=B(a.a),f=e.indexOf(":"),-1==f)e=new F(e);else{h=e.substring(0,f);if("*"==h)var k="*";else if(k=a.b(h),!k)throw Error("Namespace prefix not declared: "+h);e=e.substr(f+1);e=new F(e,k)}else throw Error("Bad token: "+B(a.a));a=new Ab(Rb(a),d.v);return c||new R(d,
|
|
73
|
+
e,a,"//"==b)}function Rb(a){for(var b=[];"["==A(a.a);){B(a.a);T(a,"Missing predicate expression.");var c=Kb(a);b.push(c);T(a,"Unclosed predicate expression.");Mb(a,"]")}return b}function Lb(a){if("-"==A(a.a))return B(a.a),new Hb(Lb(a));var b=Pb(a);if("|"!=A(a.a))a=b;else{for(b=[b];"|"==B(a.a);)T(a,"Missing next union location path."),b.push(Pb(a));a.a.a--;a=new Ib(b)}return a};function Sb(a){switch(a.nodeType){case 1:return ha(Tb,a);case 9:return Sb(a.documentElement);case 11:case 10:case 6:case 12:return Ub;default:return a.parentNode?Sb(a.parentNode):Ub}}function Ub(){return null}function Tb(a,b){if(a.prefix==b)return a.namespaceURI||"http://www.w3.org/1999/xhtml";var c=a.getAttributeNode("xmlns:"+b);return c&&c.specified?c.value||null:a.parentNode&&9!=a.parentNode.nodeType?Tb(a.parentNode,b):null};function Vb(a,b){if(!a.length)throw Error("Empty XPath expression.");a=Ia(a);if(La(a))throw Error("Invalid XPath expression.");b?"function"==ba(b)||(b=fa(b.lookupNamespaceURI,b)):b=function(){return null};var c=Kb(new Jb(a,b));if(!La(a))throw Error("Bad token: "+B(a));this.evaluate=function(d,e){d=c.a(new n(d));return new U(d,e)}}
|
|
74
|
+
function U(a,b){if(0==b)if(a instanceof E)b=4;else if("string"==typeof a)b=2;else if("number"==typeof a)b=1;else if("boolean"==typeof a)b=3;else throw Error("Unexpected evaluation result.");if(2!=b&&1!=b&&3!=b&&!(a instanceof E))throw Error("value could not be converted to the specified type");this.resultType=b;switch(b){case 2:this.stringValue=a instanceof E?db(a):""+a;break;case 1:this.numberValue=a instanceof E?+db(a):+a;break;case 3:this.booleanValue=a instanceof E?0<a.o:!!a;break;case 4:case 5:case 6:case 7:var c=
|
|
75
|
+
H(a);var d=[];for(var e=I(c);e;e=I(c))d.push(e instanceof y?e.a:e);this.snapshotLength=a.o;this.invalidIteratorState=!1;break;case 8:case 9:a=cb(a);this.singleNodeValue=a instanceof y?a.a:a;break;default:throw Error("Unknown XPathResult type.");}var f=0;this.iterateNext=function(){if(4!=b&&5!=b)throw Error("iterateNext called with wrong result type");return f>=d.length?null:d[f++]};this.snapshotItem=function(h){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return h>=d.length||
|
|
76
|
+
0>h?null:d[h]}}U.ANY_TYPE=0;U.NUMBER_TYPE=1;U.STRING_TYPE=2;U.BOOLEAN_TYPE=3;U.UNORDERED_NODE_ITERATOR_TYPE=4;U.ORDERED_NODE_ITERATOR_TYPE=5;U.UNORDERED_NODE_SNAPSHOT_TYPE=6;U.ORDERED_NODE_SNAPSHOT_TYPE=7;U.ANY_UNORDERED_NODE_TYPE=8;U.FIRST_ORDERED_NODE_TYPE=9;function Wb(a){this.lookupNamespaceURI=Sb(a)}
|
|
77
|
+
function Xb(a,b){a=a||g;var c=a.Document&&a.Document.prototype||a.document;if(!c.evaluate||b)a.XPathResult=U,c.evaluate=function(d,e,f,h){return(new Vb(d,f)).evaluate(e,h)},c.createExpression=function(d,e){return new Vb(d,e)},c.createNSResolver=function(d){return new Wb(d)}}aa("wgxpath.install",Xb);aa("wgxpath.install",Xb);function Yb(a,b){this.code=a;this.a=V[a]||Zb;this.message=b||"";a=this.a.replace(/((?:^|\s+)[a-z])/g,function(c){return c.toUpperCase().replace(/^[\s\xa0]+/g,"")});b=a.length-5;if(0>b||a.indexOf("Error",b)!=b)a+="Error";this.name=a;a=Error(this.message);a.name=this.name;this.stack=a.stack||""}m(Yb,Error);var Zb="unknown error",V={15:"element not selectable",11:"element not visible"};V[31]=Zb;V[30]=Zb;V[24]="invalid cookie domain";V[29]="invalid element coordinates";V[12]="invalid element state";
|
|
78
|
+
V[32]="invalid selector";V[51]="invalid selector";V[52]="invalid selector";V[17]="javascript error";V[405]="unsupported operation";V[34]="move target out of bounds";V[27]="no such alert";V[7]="no such element";V[8]="no such frame";V[23]="no such window";V[28]="script timeout";V[33]="session not created";V[10]="stale element reference";V[21]="timeout";V[25]="unable to set cookie";V[26]="unexpected alert open";V[13]=Zb;V[9]="unknown command";var $b=qa(),ac=sa()||u("iPod"),bc=u("iPad"),cc=u("Android")&&!(ra()||qa()||u("Opera")||u("Silk")),dc=ra(),ec=u("Safari")&&!(ra()||u("Coast")||u("Opera")||u("Edge")||qa()||u("Silk")||u("Android"))&&!(sa()||u("iPad")||u("iPod"));function W(a){return(a=a.exec(r))?a[1]:""}(function(){if($b)return W(/Firefox\/([0-9.]+)/);if(v||ua||ta)return Aa;if(dc)return sa()||u("iPad")||u("iPod")?W(/CriOS\/([0-9.]+)/):W(/Chrome\/([0-9.]+)/);if(ec&&!(sa()||u("iPad")||u("iPod")))return W(/Version\/([0-9.]+)/);if(ac||bc){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(r);if(a)return a[1]+"."+a[2]}else if(cc)return(a=W(/Android\s+([0-9.]+)/))?a:W(/Version\/([0-9.]+)/);return""})();var fc,gc,X=function(){if(!va)return!1;var a=g.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(f){return!1}var b=a.classes;a=a.interfaces;var c=b["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator);b=b["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo);var d=b.platformVersion,e=b.version;fc=function(f){c.compare(d,""+f)};gc=function(f){c.compare(e,""+f)};return!0}(),hc=v&&!(8<=Number(w)),ic=v&&!(9<=Number(w));cc&&X&&gc(2.3);cc&&X&&gc(4);ec&&X&&gc(6);function jc(a,b){b=b.toLowerCase();return"style"==b?kc(a.style.cssText):hc&&"value"==b&&lc(a,"INPUT")?a.value:ic&&!0===a[b]?String(a.getAttribute(b)):(a=a.getAttributeNode(b))&&a.specified?a.value:null}var mc=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/;
|
|
79
|
+
function kc(a){var b=[];p(a.split(mc),function(c){var d=c.indexOf(":");0<d&&(c=[c.slice(0,d),c.slice(d+1)],2==c.length&&b.push(c[0].toLowerCase(),":",c[1],";"))});b=b.join("");return b=";"==b.charAt(b.length-1)?b:b+";"}function nc(a,b){hc&&"value"==b&&lc(a,"OPTION")&&null===jc(a,"value")?(b=[],Sa(a,b,!1),a=b.join("")):a=a[b];return a}function lc(a,b){b&&"string"!==typeof b&&(b=b.toString());return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}
|
|
80
|
+
function oc(a){return lc(a,"OPTION")?!0:lc(a,"INPUT")?(a=a.type.toLowerCase(),"checkbox"==a||"radio"==a):!1};v&&X&&fc(10);cc&&X&&gc(4);wa||X&&X&&gc(3.6);function pc(a,b){this.b={};this.a=[];this.f=0;var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a)if(a instanceof pc)for(c=qc(a),d=0;d<c.length;d++)this.set(c[d],a.get(c[d]));else for(d in a)this.set(d,a[d])}
|
|
81
|
+
function qc(a){if(a.f!=a.a.length){for(var b=0,c=0;b<a.a.length;){var d=a.a[b];Object.prototype.hasOwnProperty.call(a.b,d)&&(a.a[c++]=d);b++}a.a.length=c}if(a.f!=a.a.length){var e={};for(c=b=0;b<a.a.length;)d=a.a[b],Object.prototype.hasOwnProperty.call(e,d)||(a.a[c++]=d,e[d]=1),b++;a.a.length=c}return a.a.concat()}pc.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.b,a)?this.b[a]:b};
|
|
82
|
+
pc.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.b,a)||(this.f++,this.a.push(a));this.b[a]=b};var rc={};function Z(a,b,c){ca(a)&&(a=va?a.g:a.h);a=new sc(a);!b||b in rc&&!c||(rc[b]={key:a,shift:!1},c&&(rc[c]={key:a,shift:!0}));return a}function sc(a){this.code=a}Z(8);Z(9);Z(13);var tc=Z(16),uc=Z(17),vc=Z(18);Z(19);Z(20);Z(27);Z(32," ");Z(33);Z(34);Z(35);Z(36);Z(37);Z(38);Z(39);Z(40);Z(44);Z(45);Z(46);Z(48,"0",")");Z(49,"1","!");Z(50,"2","@");Z(51,"3","#");Z(52,"4","$");Z(53,"5","%");Z(54,"6","^");Z(55,"7","&");Z(56,"8","*");Z(57,"9","(");Z(65,"a","A");Z(66,"b","B");Z(67,"c","C");Z(68,"d","D");
|
|
83
|
+
Z(69,"e","E");Z(70,"f","F");Z(71,"g","G");Z(72,"h","H");Z(73,"i","I");Z(74,"j","J");Z(75,"k","K");Z(76,"l","L");Z(77,"m","M");Z(78,"n","N");Z(79,"o","O");Z(80,"p","P");Z(81,"q","Q");Z(82,"r","R");Z(83,"s","S");Z(84,"t","T");Z(85,"u","U");Z(86,"v","V");Z(87,"w","W");Z(88,"x","X");Z(89,"y","Y");Z(90,"z","Z");var wc=Z(ya?{g:91,h:91}:xa?{g:224,h:91}:{g:0,h:91});Z(ya?{g:92,h:92}:xa?{g:224,h:93}:{g:0,h:92});Z(ya?{g:93,h:93}:xa?{g:0,h:0}:{g:93,h:null});Z({g:96,h:96},"0");Z({g:97,h:97},"1");
|
|
84
|
+
Z({g:98,h:98},"2");Z({g:99,h:99},"3");Z({g:100,h:100},"4");Z({g:101,h:101},"5");Z({g:102,h:102},"6");Z({g:103,h:103},"7");Z({g:104,h:104},"8");Z({g:105,h:105},"9");Z({g:106,h:106},"*");Z({g:107,h:107},"+");Z({g:109,h:109},"-");Z({g:110,h:110},".");Z({g:111,h:111},"/");Z(144);Z(112);Z(113);Z(114);Z(115);Z(116);Z(117);Z(118);Z(119);Z(120);Z(121);Z(122);Z(123);Z({g:107,h:187},"=","+");Z(108,",");Z({g:109,h:189},"-","_");Z(188,",","<");Z(190,".",">");Z(191,"/","?");Z(192,"`","~");Z(219,"[","{");
|
|
85
|
+
Z(220,"\\","|");Z(221,"]","}");Z({g:59,h:186},";",":");Z(222,"'",'"');var xc=new pc;xc.set(1,tc);xc.set(2,uc);xc.set(4,vc);xc.set(8,wc);(function(a){var b=new pc;p(qc(a),function(c){b.set(a.get(c).code,c)});return b})(xc);va&&X&&fc(12);var yc={"class":"className",readonly:"readOnly"},zc="allowfullscreen allowpaymentrequest allowusermedia async autofocus autoplay checked compact complete controls declare default defaultchecked defaultselected defer disabled ended formnovalidate hidden indeterminate iscontenteditable ismap itemscope loop multiple muted nohref nomodule noresize noshade novalidate nowrap open paused playsinline pubdate readonly required reversed scoped seamless seeking selected truespeed typemustmatch willvalidate".split(" ");aa("_",function(a,b){var c=null,d=b.toLowerCase();if("style"==d)return(c=a.style)&&!l(c)&&(c=c.cssText),c;if(("selected"==d||"checked"==d)&&oc(a)){if(!oc(a))throw new Yb(15,"Element is not selectable");b="selected";c=a.type&&a.type.toLowerCase();if("checkbox"==c||"radio"==c)b="checked";return nc(a,b)?"true":null}var e=lc(a,"A");if(lc(a,"IMG")&&"src"==d||e&&"href"==d)return(c=jc(a,d))&&(c=nc(a,d)),c;if("spellcheck"==d){c=jc(a,d);if(null!==c){if("false"==c.toLowerCase())return"false";if("true"==c.toLowerCase())return"true"}return nc(a,
|
|
86
|
+
d)+""}e=yc[b]||b;if(0<=ia(zc,d))return(c=null!==jc(a,b)||nc(a,e))?"true":null;try{var f=nc(a,e)}catch(h){}null==f||ca(f)?c=jc(a,b):c=f;return null!=c?c.toString():null});; return this._.apply(null,arguments);}).apply({navigator:typeof window!='undefined'?window.navigator:null,document:typeof window!='undefined'?window.document:null}, arguments);};
|