@patternfly/patternfly-doc-core 1.12.0 → 1.12.2
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/.astro/collections/{examples.schema.json → react-component-docs.schema.json} +4 -3
- package/.astro/content-modules.mjs +84 -2
- package/.astro/content.d.ts +3 -11
- package/cli/cli.ts +35 -16
- package/cli/convertToMDX.ts +10 -3
- package/cli/createCollectionContent.ts +2 -1
- package/dist/cli/cli.js +17 -6
- package/dist/cli/convertToMDX.js +8 -3
- package/dist/cli/createCollectionContent.js +2 -1
- package/dist/docs/_astro/AutoLinkHeader.BijNRLMB.js +1 -0
- package/dist/docs/_astro/CSSTable.-Emc9iTg.js +1 -0
- package/dist/docs/_astro/DropdownList.DP2npVYh.js +1 -0
- package/dist/docs/_astro/Label.CM_es7Cu.js +1 -0
- package/dist/docs/_astro/LiveExample.B5R4Dzng.js +263 -0
- package/dist/docs/_astro/Navigation.B2RHZcqO.js +1 -0
- package/dist/docs/_astro/PageSidebarBody.DgDLnRuY.js +1 -0
- package/dist/docs/_astro/PropsTables.D6ZI3FGj.css +1 -0
- package/dist/docs/_astro/PropsTables.YkW1puJk.js +1 -0
- package/dist/docs/_astro/SearchInput.CQ7aDztp.js +1 -0
- package/dist/docs/_astro/SectionGallery.B0I2mi5J.js +1 -0
- package/dist/docs/_astro/StackItem.CMxajCCo.js +1 -0
- package/dist/docs/_astro/Toolbar.BNjGRsAQ.js +1 -0
- package/dist/docs/_astro/ToolbarContent.CAAHjZHW.js +1 -0
- package/dist/{_astro/_page_.D1z73Byz.css → docs/_astro/_page_.BG_fQ4i5.css} +1 -1
- package/dist/docs/_astro/angle-down-icon.Dqz5ba9D.js +1 -0
- package/dist/docs/_astro/c_table__sticky_cell_InsetInlineStart.DGzYmtkF.js +8 -0
- package/dist/{_astro/divider.BLVh3KnH.js → docs/_astro/divider.BP4XR7uq.js} +1 -1
- package/dist/docs/_astro/index.DGdw5tfb.js +16 -0
- package/dist/{_astro/patternfly_charts.Dp3KzAU6.js → docs/_astro/patternfly_charts.CpLYMsW2.js} +23 -30
- package/dist/docs/_astro/resizeObserver.BgQpxO8W.js +1 -0
- package/dist/{_routes.json → docs/_routes.json} +1 -3
- package/dist/{_worker.js → docs/_worker.js}/_@astrojs-ssr-adapter.mjs +1 -1
- package/dist/{_worker.js → docs/_worker.js}/_astro-internal_middleware.mjs +3 -3
- package/dist/docs/_worker.js/chunks/Backdrop_ByJvccKQ.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Backdrop_D12wBLrB.mjs +1 -0
- package/dist/docs/_worker.js/chunks/BackgroundImage_7zaRIuh-.mjs +1 -0
- package/dist/docs/_worker.js/chunks/BackgroundImage_BFUrU51J.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Badge_DloPmeMn.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Badge_DxGDbEGv.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Banner_4Te4yy7I.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Banner_FbFCGml0.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Brand_Cjeb58fX.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Brand_DZEvbkMH.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Breadcrumb_DkNDUMw0.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Breadcrumb_bVSwIfTk.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Button_BqggYTWh.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Button_DbZb-z5h.mjs +1 -0
- package/dist/docs/_worker.js/chunks/CalendarMonth_BdoIQD1o.mjs +1 -0
- package/dist/docs/_worker.js/chunks/CalendarMonth_BqZc2rYW.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Card_BW6WmwTW.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Card_CEDol7Xx.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Checkbox_BqVpiIvF.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Checkbox_DSYhfv7p.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Chip_BciXepRF.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Chip_C23BxFTk.mjs +1 -0
- package/dist/docs/_worker.js/chunks/ClipboardCopy_BjySfoK1.mjs +1 -0
- package/dist/docs/_worker.js/chunks/ClipboardCopy_CvrD2b3T.mjs +1 -0
- package/dist/docs/_worker.js/chunks/CodeBlock_CuH1PrfL.mjs +1 -0
- package/dist/docs/_worker.js/chunks/CodeBlock_DK5AauFn.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Content_BfZIFUr8.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Content_lBUC3eEp.mjs +1 -0
- package/dist/docs/_worker.js/chunks/DataList_CSJAkMMZ.mjs +1 -0
- package/dist/docs/_worker.js/chunks/DataList_CaFvg0uz.mjs +1 -0
- package/dist/docs/_worker.js/chunks/DatePicker_Cw2abdEU.mjs +1 -0
- package/dist/docs/_worker.js/chunks/DatePicker_bYwsFHXL.mjs +1 -0
- package/dist/docs/_worker.js/chunks/DescriptionList_BTTyevMb.mjs +1 -0
- package/dist/docs/_worker.js/chunks/DescriptionList_Dr51d-67.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Divider_BgOt1--F.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Divider_Bh7n4QTo.mjs +1 -0
- package/dist/docs/_worker.js/chunks/DragDrop_BF-aF6Z8.mjs +1 -0
- package/dist/docs/_worker.js/chunks/DragDrop_DId590rN.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Drawer_BVywTMVo.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Drawer_RrCnySEa.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Dropdown_BjtqviYW.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Dropdown_GiUvjFPw.mjs +1 -0
- package/dist/docs/_worker.js/chunks/DualListSelector_8uLukfP0.mjs +1 -0
- package/dist/docs/_worker.js/chunks/DualListSelector_Bgj1IWqe.mjs +1 -0
- package/dist/docs/_worker.js/chunks/DualListSelector_C5QjTplp.mjs +1 -0
- package/dist/docs/_worker.js/chunks/DualListSelector_DLgspM0s.mjs +1 -0
- package/dist/docs/_worker.js/chunks/EmptyState_Ct_PJba3.mjs +1 -0
- package/dist/docs/_worker.js/chunks/EmptyState_Dk3hKJlg.mjs +1 -0
- package/dist/docs/_worker.js/chunks/ExpandableSection_DSw76PjZ.mjs +1 -0
- package/dist/docs/_worker.js/chunks/ExpandableSection_vUQO3FgG.mjs +1 -0
- package/dist/docs/_worker.js/chunks/FileUpload_CEvZ0G-d.mjs +1 -0
- package/dist/docs/_worker.js/chunks/FileUpload_Ci_s8Ghd.mjs +1 -0
- package/dist/docs/_worker.js/chunks/FormSelect_C2YPRAlw.mjs +1 -0
- package/dist/docs/_worker.js/chunks/FormSelect_DWShl8Fb.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Form_Dyb98Nez.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Form_olaoRN4o.mjs +1 -0
- package/dist/docs/_worker.js/chunks/HelperText_2CcHVaih.mjs +1 -0
- package/dist/docs/_worker.js/chunks/HelperText_DthGttZo.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Hint_BXDZKYhJ.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Hint_DHoiYdn6.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Icon_C4IPnIAg.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Icon_C_Dqbg9w.mjs +1 -0
- package/dist/docs/_worker.js/chunks/InputGroup_CDKP-uXZ.mjs +1 -0
- package/dist/docs/_worker.js/chunks/InputGroup_CmZgaEyr.mjs +1 -0
- package/dist/docs/_worker.js/chunks/JumpLinks_DvM3PVg0.mjs +1 -0
- package/dist/docs/_worker.js/chunks/JumpLinks_Dvdlxdps.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Label_C7fP9Jp9.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Label_Cxir7_Q4.mjs +1 -0
- package/dist/docs/_worker.js/chunks/List_CUgwFnXa.mjs +1 -0
- package/dist/docs/_worker.js/chunks/List_CWAsiYnN.mjs +1 -0
- package/dist/docs/_worker.js/chunks/LoginPage_BDfliKtU.mjs +1 -0
- package/dist/docs/_worker.js/chunks/LoginPage_BjIl_nF9.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Masthead_BWjm5CFj.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Masthead_BZnYzDu_.mjs +1 -0
- package/dist/docs/_worker.js/chunks/MenuToggle_DeKwv469.mjs +1 -0
- package/dist/docs/_worker.js/chunks/MenuToggle_DmJISlPR.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Menu_DRRoq5PM.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Menu_Sl-QVQ_w.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Modal_6WZzoDHU.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Modal_BI2dVPRJ.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Modal_CdokBUDP.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Modal_DJRobnfc.mjs +1 -0
- package/dist/docs/_worker.js/chunks/MultipleFileUpload_BaHVtkF_.mjs +1 -0
- package/dist/docs/_worker.js/chunks/MultipleFileUpload_BznvLbsj.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Nav_DwqATcJ4.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Nav_GZ0nRYXE.mjs +1 -0
- package/dist/docs/_worker.js/chunks/NotificationBadge_DO4OLgvO.mjs +1 -0
- package/dist/docs/_worker.js/chunks/NotificationBadge_DjINhOQ5.mjs +1 -0
- package/dist/docs/_worker.js/chunks/NotificationDrawer_BtpQ4pmZ.mjs +1 -0
- package/dist/docs/_worker.js/chunks/NotificationDrawer_D1lmMCgd.mjs +1 -0
- package/dist/docs/_worker.js/chunks/NumberInput_CggpJ5ge.mjs +1 -0
- package/dist/docs/_worker.js/chunks/NumberInput_zMcSUUwH.mjs +1 -0
- package/dist/docs/_worker.js/chunks/OverflowMenu_BX4nwFvK.mjs +1 -0
- package/dist/docs/_worker.js/chunks/OverflowMenu_DnQ7wMy-.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Page_Cw_XTB6Y.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Page_UhywZXdY.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Pagination_7rr0n7-V.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Pagination_Dc5L6yaI.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Panel_Bl_LqCWS.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Panel_s8-TwBlS.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Popover_CjipqBWs.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Popover_DvQgGJTf.mjs +1 -0
- package/dist/docs/_worker.js/chunks/ProgressStepper_DXBI4K2w.mjs +1 -0
- package/dist/docs/_worker.js/chunks/ProgressStepper_lBd5mTHE.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Progress_BZA5taDC.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Progress_CIgybc-D.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Radio_3tPx1coq.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Radio_BG7VZAk6.mjs +1 -0
- package/dist/docs/_worker.js/chunks/SearchInput_BZ43-Elo.mjs +1 -0
- package/dist/docs/_worker.js/chunks/SearchInput_aCFv-N1U.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Select_B4cumL7U.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Select_CJ78kBVM.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Sidebar_Bto2_gKJ.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Sidebar_DOfifBRA.mjs +1 -0
- package/dist/docs/_worker.js/chunks/SimpleList_CVkO5Odp.mjs +1 -0
- package/dist/docs/_worker.js/chunks/SimpleList_oJajk3_z.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Skeleton_CCJNka-d.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Skeleton_N02yA_k6.mjs +1 -0
- package/dist/docs/_worker.js/chunks/SkipToContent_DvOYRCWm.mjs +1 -0
- package/dist/docs/_worker.js/chunks/SkipToContent_o7vh-U_u.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Slider_C0bH-JMY.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Slider_CWRDqhx4.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Spinner_B-x8bJt0.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Spinner_hzAAbZdS.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Switch_Cpr1OETy.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Switch_Du7AKJ4O.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Tabs_CzDrfKA-.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Tabs_KXDkISY4.mjs +1 -0
- package/dist/docs/_worker.js/chunks/TextArea_C1dmG8mr.mjs +1 -0
- package/dist/docs/_worker.js/chunks/TextArea_Dtm0m8LO.mjs +1 -0
- package/dist/docs/_worker.js/chunks/TextInputGroup_D0NXU95v.mjs +1 -0
- package/dist/docs/_worker.js/chunks/TextInputGroup_mJpBrogC.mjs +1 -0
- package/dist/docs/_worker.js/chunks/TextInput_B0XLYaVA.mjs +1 -0
- package/dist/docs/_worker.js/chunks/TextInput_CmLcsUiv.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Tile_CF_12LPU.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Tile_DJ0LawLW.mjs +1 -0
- package/dist/docs/_worker.js/chunks/TimePicker_CijfSKJQ.mjs +1 -0
- package/dist/docs/_worker.js/chunks/TimePicker_VX9VE-Uy.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Timestamp_D7uyrIK7.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Timestamp_c2Mozpr4.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Title_DbrwFEEy.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Title_DlFn7G9R.mjs +1 -0
- package/dist/docs/_worker.js/chunks/ToggleGroup_DpLWzfAW.mjs +1 -0
- package/dist/docs/_worker.js/chunks/ToggleGroup_j1ooRpX3.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Toolbar_BEIh7r7J.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Toolbar_mjrD3_l-.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Tooltip_Bp5XOVoV.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Tooltip_BrFKk02i.mjs +1 -0
- package/dist/docs/_worker.js/chunks/TreeView_BImfKPD_.mjs +1 -0
- package/dist/docs/_worker.js/chunks/TreeView_CgO4iC1E.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Truncate_Bn55QoeZ.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Truncate_S939OotH.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Wizard_B28f3non.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Wizard_B4Dw5Yc8.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Wizard_BOCBVIjJ.mjs +1 -0
- package/dist/docs/_worker.js/chunks/Wizard_C2sit354.mjs +1 -0
- package/dist/{_worker.js/renderers.mjs → docs/_worker.js/chunks/_@astro-renderers_D4IG6Oyo.mjs} +55 -3
- package/dist/{_worker.js/chunks/_@astrojs-ssr-adapter_IMtcR503.mjs → docs/_worker.js/chunks/_@astrojs-ssr-adapter_CBRUgCDy.mjs} +4 -4
- package/dist/docs/_worker.js/chunks/_astro_assets_Dcv7PKDL.mjs +1 -0
- package/dist/docs/_worker.js/chunks/_astro_data-layer-content_CPgQSQEx.mjs +1 -0
- package/dist/{_worker.js/chunks/astro/server_YsSSp7Ny.mjs → docs/_worker.js/chunks/astro/server_CVEnF9i1.mjs} +1 -3
- package/dist/{_worker.js/chunks/astro-designed-error-pages_MEt0E9xn.mjs → docs/_worker.js/chunks/astro-designed-error-pages_CXRddWNa.mjs} +1 -1
- package/dist/docs/_worker.js/chunks/content-assets_XqCgPAV2.mjs +1 -0
- package/dist/docs/_worker.js/chunks/content-modules_pw1AqUgZ.mjs +1 -0
- package/dist/{_worker.js/chunks/index_BE2AHcwI.mjs → docs/_worker.js/chunks/index_CYXMeXT4.mjs} +2 -2
- package/dist/{_worker.js/chunks/noop-middleware_CMUpAQ6F.mjs → docs/_worker.js/chunks/noop-middleware_DIXVCvyq.mjs} +1 -1
- package/dist/docs/_worker.js/chunks/sharp_BKxWP4lT.mjs +1 -0
- package/dist/{_worker.js → docs/_worker.js}/index.js +4 -8
- package/dist/docs/_worker.js/manifest_Dsi4HnVg.mjs +100 -0
- package/dist/{_worker.js → docs/_worker.js}/pages/_image.astro.mjs +1 -1
- package/dist/docs/_worker.js/pages/_section_/_---page_.astro.mjs +1 -0
- package/dist/docs/_worker.js/pages/_section_/_page_/_---tab_.astro.mjs +1 -0
- package/dist/docs/_worker.js/pages/index.astro.mjs +1 -0
- package/dist/{_worker.js → docs/_worker.js}/pages/props.astro.mjs +1 -1
- package/dist/docs/_worker.js/renderers.mjs +2 -0
- package/dist/docs/components/about-modal/index.html +56 -0
- package/dist/docs/components/about-modal/react/index.html +56 -0
- package/dist/docs/components/accordion/index.html +62 -0
- package/dist/docs/components/accordion/react/index.html +62 -0
- package/dist/docs/components/action-list/index.html +59 -0
- package/dist/docs/components/action-list/react/index.html +59 -0
- package/dist/docs/components/alert/index.html +428 -0
- package/dist/docs/components/alert/react/index.html +428 -0
- package/dist/docs/components/avatar/index.html +56 -0
- package/dist/docs/components/avatar/react/index.html +56 -0
- package/dist/docs/components/back-to-top/index.html +53 -0
- package/dist/docs/components/back-to-top/react/index.html +53 -0
- package/dist/docs/components/backdrop/index.html +49 -0
- package/dist/docs/components/backdrop/react/index.html +49 -0
- package/dist/docs/components/background-image/index.html +49 -0
- package/dist/docs/components/background-image/react/index.html +49 -0
- package/dist/docs/components/badge/index.html +57 -0
- package/dist/docs/components/badge/react/index.html +57 -0
- package/dist/docs/components/banner/index.html +57 -0
- package/dist/docs/components/banner/react/index.html +57 -0
- package/dist/docs/components/brand/index.html +55 -0
- package/dist/docs/components/brand/react/index.html +55 -0
- package/dist/docs/components/breadcrumb/index.html +59 -0
- package/dist/docs/components/breadcrumb/react/index.html +59 -0
- package/dist/docs/components/button/index.html +152 -0
- package/dist/docs/components/button/react/index.html +152 -0
- package/dist/docs/components/calendar-month/index.html +55 -0
- package/dist/docs/components/calendar-month/react/index.html +55 -0
- package/dist/docs/components/card/index.html +159 -0
- package/dist/docs/components/card/react/index.html +159 -0
- package/dist/docs/components/checkbox/index.html +78 -0
- package/dist/docs/components/checkbox/react/index.html +78 -0
- package/dist/docs/components/chip/index.html +61 -0
- package/dist/docs/components/chip/react-deprecated/index.html +61 -0
- package/dist/docs/components/clipboard-copy/index.html +84 -0
- package/dist/docs/components/clipboard-copy/react/index.html +84 -0
- package/dist/docs/components/code-block/index.html +55 -0
- package/dist/docs/components/code-block/react/index.html +55 -0
- package/dist/docs/components/content/index.html +79 -0
- package/dist/docs/components/content/react/index.html +79 -0
- package/dist/docs/components/data-list/index.html +86 -0
- package/dist/docs/components/data-list/react/index.html +86 -0
- package/dist/docs/components/date-picker/index.html +77 -0
- package/dist/docs/components/date-picker/react/index.html +77 -0
- package/dist/docs/components/description-list/index.html +135 -0
- package/dist/docs/components/description-list/react/index.html +135 -0
- package/dist/docs/components/divider/index.html +74 -0
- package/dist/docs/components/divider/react/index.html +74 -0
- package/dist/docs/components/drag-and-drop/index.html +69 -0
- package/dist/docs/components/drag-and-drop/react-deprecated/index.html +69 -0
- package/dist/docs/components/drawer/index.html +108 -0
- package/dist/docs/components/drawer/react/index.html +108 -0
- package/dist/docs/components/dropdown/index.html +71 -0
- package/dist/docs/components/dropdown/react/index.html +71 -0
- package/dist/docs/components/dual-list-selector/index.html +89 -0
- package/dist/docs/components/dual-list-selector/react/index.html +89 -0
- package/dist/docs/components/dual-list-selector/react-deprecated/index.html +106 -0
- package/dist/docs/components/empty-state/index.html +71 -0
- package/dist/docs/components/empty-state/react/index.html +71 -0
- package/dist/docs/components/expandable-section/index.html +76 -0
- package/dist/docs/components/expandable-section/react/index.html +76 -0
- package/dist/docs/components/form/index.html +87 -0
- package/dist/docs/components/form/react/index.html +87 -0
- package/dist/docs/components/form-select/index.html +59 -0
- package/dist/docs/components/form-select/react/index.html +59 -0
- package/dist/docs/components/helper-text/index.html +57 -0
- package/dist/docs/components/helper-text/react/index.html +57 -0
- package/dist/docs/components/hint/index.html +59 -0
- package/dist/docs/components/hint/react/index.html +59 -0
- package/dist/docs/components/icon/index.html +80 -0
- package/dist/docs/components/icon/react/index.html +80 -0
- package/dist/docs/components/input-group/index.html +62 -0
- package/dist/docs/components/input-group/react/index.html +62 -0
- package/dist/docs/components/jump-links/index.html +66 -0
- package/dist/docs/components/jump-links/react/index.html +66 -0
- package/dist/docs/components/label/index.html +103 -0
- package/dist/docs/components/label/react/index.html +103 -0
- package/dist/docs/components/list/index.html +68 -0
- package/dist/docs/components/list/react/index.html +68 -0
- package/dist/docs/components/login-page/index.html +56 -0
- package/dist/docs/components/login-page/react/index.html +56 -0
- package/dist/docs/components/masthead/index.html +76 -0
- package/dist/docs/components/masthead/react/index.html +76 -0
- package/dist/docs/components/menu/index.html +160 -0
- package/dist/docs/components/menu/react/index.html +160 -0
- package/dist/docs/components/menu-toggle/index.html +201 -0
- package/dist/docs/components/menu-toggle/react/index.html +201 -0
- package/dist/docs/components/modal/index.html +113 -0
- package/dist/docs/components/modal/react/index.html +113 -0
- package/dist/docs/components/modal/react-deprecated/index.html +117 -0
- package/dist/docs/components/multiple-file-upload/index.html +84 -0
- package/dist/docs/components/multiple-file-upload/react/index.html +84 -0
- package/dist/docs/components/navigation/index.html +89 -0
- package/dist/docs/components/navigation/react/index.html +89 -0
- package/dist/docs/components/notification-badge/index.html +65 -0
- package/dist/docs/components/notification-badge/react/index.html +65 -0
- package/dist/docs/components/notification-drawer/index.html +56 -0
- package/dist/docs/components/notification-drawer/react/index.html +56 -0
- package/dist/docs/components/number-input/index.html +72 -0
- package/dist/docs/components/number-input/react/index.html +72 -0
- package/dist/docs/components/overflow-menu/index.html +64 -0
- package/dist/docs/components/overflow-menu/react/index.html +64 -0
- package/dist/docs/components/page/index.html +114 -0
- package/dist/docs/components/page/react/index.html +114 -0
- package/dist/docs/components/pagination/index.html +77 -0
- package/dist/docs/components/pagination/react/index.html +77 -0
- package/dist/docs/components/panel/index.html +196 -0
- package/dist/docs/components/panel/react/index.html +196 -0
- package/dist/docs/components/popover/index.html +89 -0
- package/dist/docs/components/popover/react/index.html +89 -0
- package/dist/docs/components/progress/index.html +101 -0
- package/dist/docs/components/progress/react/index.html +101 -0
- package/dist/docs/components/progress-stepper/index.html +74 -0
- package/dist/docs/components/progress-stepper/react/index.html +74 -0
- package/dist/docs/components/radio/index.html +75 -0
- package/dist/docs/components/radio/react/index.html +75 -0
- package/dist/docs/components/search-input/index.html +76 -0
- package/dist/docs/components/search-input/react/index.html +76 -0
- package/dist/docs/components/select/index.html +129 -0
- package/dist/docs/components/select/react/index.html +129 -0
- package/dist/docs/components/sidebar/index.html +77 -0
- package/dist/docs/components/sidebar/react/index.html +77 -0
- package/dist/docs/components/simple-file-upload/index.html +93 -0
- package/dist/docs/components/simple-file-upload/react/index.html +93 -0
- package/dist/docs/components/simple-list/index.html +59 -0
- package/dist/docs/components/simple-list/react/index.html +59 -0
- package/dist/docs/components/skeleton/index.html +62 -0
- package/dist/docs/components/skeleton/react/index.html +62 -0
- package/dist/docs/components/skip-to-content/index.html +49 -0
- package/dist/docs/components/skip-to-content/react/index.html +49 -0
- package/dist/docs/components/slider/index.html +78 -0
- package/dist/docs/components/slider/react/index.html +78 -0
- package/dist/docs/components/spinner/index.html +59 -0
- package/dist/docs/components/spinner/react/index.html +59 -0
- package/dist/docs/components/switch/index.html +66 -0
- package/dist/docs/components/switch/react/index.html +66 -0
- package/dist/docs/components/tabs/index.html +169 -0
- package/dist/docs/components/tabs/react/index.html +169 -0
- package/dist/docs/components/text-area/index.html +77 -0
- package/dist/docs/components/text-area/react/index.html +77 -0
- package/dist/docs/components/text-input/index.html +71 -0
- package/dist/docs/components/text-input/react/index.html +71 -0
- package/dist/docs/components/text-input-group/index.html +68 -0
- package/dist/docs/components/text-input-group/react/index.html +68 -0
- package/dist/docs/components/tile/index.html +153 -0
- package/dist/docs/components/tile/react-deprecated/index.html +153 -0
- package/dist/docs/components/time-picker/index.html +67 -0
- package/dist/docs/components/time-picker/react/index.html +67 -0
- package/dist/docs/components/timestamp/index.html +75 -0
- package/dist/docs/components/timestamp/react/index.html +75 -0
- package/dist/docs/components/title/index.html +53 -0
- package/dist/docs/components/title/react/index.html +53 -0
- package/dist/docs/components/toggle-group/index.html +74 -0
- package/dist/docs/components/toggle-group/react/index.html +74 -0
- package/dist/docs/components/toolbar/index.html +111 -0
- package/dist/docs/components/toolbar/react/index.html +111 -0
- package/dist/docs/components/tooltip/index.html +65 -0
- package/dist/docs/components/tooltip/react/index.html +65 -0
- package/dist/docs/components/tree-view/index.html +93 -0
- package/dist/docs/components/tree-view/react/index.html +93 -0
- package/dist/docs/components/truncate/index.html +80 -0
- package/dist/docs/components/truncate/react/index.html +80 -0
- package/dist/docs/components/wizard/index.html +120 -0
- package/dist/docs/components/wizard/react/index.html +120 -0
- package/dist/docs/components/wizard/react-deprecated/index.html +372 -0
- package/dist/docs/index.html +43 -0
- package/dist/props.json +1 -0
- package/package.json +10 -6
- package/src/components/AutoLinkHeader.tsx +3 -11
- package/src/components/DocsTables.astro +10 -4
- package/src/components/LiveExample.tsx +2 -0
- package/src/components/PropsTables.tsx +62 -0
- package/src/content.config.ts +2 -4
- package/src/content.ts +1 -15
- package/src/layouts/Main.astro +1 -0
- package/src/pages/[section]/[...page].astro +1 -5
- package/src/pages/[section]/[page]/[...tab].astro +1 -1
- package/.astro/collections/textContent.schema.json +0 -59
- package/dist/_astro/CSSTable.E6iSHjec.js +0 -1
- package/dist/_astro/DropdownList.-xE7qrND.js +0 -1
- package/dist/_astro/LiveExample.CVVccYEB.js +0 -259
- package/dist/_astro/Navigation.CONcolRR.js +0 -1
- package/dist/_astro/PageSidebarBody.CDWZuFeK.js +0 -1
- package/dist/_astro/SearchInput.BNt7BTX_.js +0 -1
- package/dist/_astro/SectionGallery.Dwb-QA5z.js +0 -1
- package/dist/_astro/Toolbar.DNd68Ck-.js +0 -1
- package/dist/_astro/ToolbarContent.C58gpKLu.js +0 -1
- package/dist/_astro/_page_.CtheD08_.css +0 -1
- package/dist/_astro/index.jm6QVFFy.js +0 -16
- package/dist/_worker.js/chunks/AutoLinkHeader_DLgn_YRm.mjs +0 -739
- package/dist/_worker.js/chunks/Button_CBcC0ViE.mjs +0 -709
- package/dist/_worker.js/chunks/CSSTable_C1dV02qV.mjs +0 -18
- package/dist/_worker.js/chunks/DocsTables_Br4g5x5_.mjs +0 -20
- package/dist/_worker.js/chunks/PropsTables_Dcd7znAq.mjs +0 -6628
- package/dist/_worker.js/chunks/angle-down-icon_VyCXUC7F.mjs +0 -3686
- package/dist/_worker.js/chunks/index_CBCp_CJ0.mjs +0 -57
- package/dist/_worker.js/manifest_CyDNnCoC.mjs +0 -100
- package/dist/components/accordion/index.html +0 -60
- package/dist/components/accordion/react/index.html +0 -60
- package/dist/components/all-components/index.html +0 -47
- package/dist/design-foundations/typography/index.html +0 -198
- package/dist/design-foundations/usage-and-behavior/index.html +0 -347
- package/dist/get-started/contribute/index.html +0 -94
- package/dist/index.html +0 -43
- package/src/components/PropsTables.astro +0 -52
- /package/dist/{.assetsignore → docs/.assetsignore} +0 -0
- /package/dist/{PF-HorizontalLogo-Color.svg → docs/PF-HorizontalLogo-Color.svg} +0 -0
- /package/dist/{PF-HorizontalLogo-Reverse.svg → docs/PF-HorizontalLogo-Reverse.svg} +0 -0
- /package/dist/{_astro/_page_.Chv_bGyU.css → docs/_astro/AutoLinkHeader.Chv_bGyU.css} +0 -0
- /package/dist/{_astro → docs/_astro}/Button.BVfR1y85.js +0 -0
- /package/dist/{_astro → docs/_astro}/ClientRouter.astro_astro_type_script_index_0_lang.CtSceO8m.js +0 -0
- /package/dist/{_astro → docs/_astro}/Content.CYLxURqU.js +0 -0
- /package/dist/{_astro → docs/_astro}/LiveExample.CxJsMvEq.css +0 -0
- /package/dist/{_astro → docs/_astro}/PageContext.BUbWpNW2.js +0 -0
- /package/dist/{_astro → docs/_astro}/PageToggle.Dnbvoa7R.js +0 -0
- /package/dist/{_astro → docs/_astro}/RedHatDisplayVF-Italic.CRpusWc8.woff2 +0 -0
- /package/dist/{_astro → docs/_astro}/RedHatDisplayVF.CYDHf1NI.woff2 +0 -0
- /package/dist/{_astro → docs/_astro}/RedHatMonoVF-Italic.DGQo2ogW.woff2 +0 -0
- /package/dist/{_astro → docs/_astro}/RedHatMonoVF.C4fMH6Vz.woff2 +0 -0
- /package/dist/{_astro → docs/_astro}/RedHatTextVF-Italic.Dkj_WqbA.woff2 +0 -0
- /package/dist/{_astro → docs/_astro}/RedHatTextVF.wYvZ7prR.woff2 +0 -0
- /package/dist/{_astro → docs/_astro}/_page_.DxJDkZPc.css +0 -0
- /package/dist/{_astro → docs/_astro}/angle-left-icon.CfKwuSCS.js +0 -0
- /package/dist/{_astro → docs/_astro}/bars-icon.wdJgEs3A.js +0 -0
- /package/dist/{_astro → docs/_astro}/client.DN8ES6L5.js +0 -0
- /package/dist/{_astro → docs/_astro}/fa-solid-900.DguXoeIz.woff2 +0 -0
- /package/dist/{_astro → docs/_astro}/github-icon.DzpohUp_.js +0 -0
- /package/dist/{_astro → docs/_astro}/index.BQFV5hT1.js +0 -0
- /package/dist/{_astro → docs/_astro}/index.CAChmxYj.js +0 -0
- /package/dist/{_astro → docs/_astro}/index.eCxJ45ll.js +0 -0
- /package/dist/{_astro → docs/_astro}/page.BTC3Kf3x.js +0 -0
- /package/dist/{_astro → docs/_astro}/pf-v6-pficon.Dy6oiu9u.woff2 +0 -0
- /package/dist/{_worker.js → docs/_worker.js}/_noop-actions.mjs +0 -0
- /package/dist/{_worker.js/chunks/Accordion_CQUal4ef.mjs → docs/_worker.js/chunks/AboutModal_CrdYiVZ2.mjs} +0 -0
- /package/dist/{_worker.js/chunks/Accordion_R7bP3pwr.mjs → docs/_worker.js/chunks/AboutModal_D3R-r6ju.mjs} +0 -0
- /package/dist/{_worker.js/chunks/AllComponents_BDKlE-WJ.mjs → docs/_worker.js/chunks/Accordion_Dbx8tdfD.mjs} +0 -0
- /package/dist/{_worker.js/chunks/AllComponents_DWDph25H.mjs → docs/_worker.js/chunks/Accordion_sjy0EnPK.mjs} +0 -0
- /package/dist/{_worker.js/chunks/_astro_assets_uN1DLT1q.mjs → docs/_worker.js/chunks/ActionList_Bx7eAKgV.mjs} +0 -0
- /package/dist/{_worker.js/chunks/_astro_data-layer-content_D0hm6p8E.mjs → docs/_worker.js/chunks/ActionList_CuygbYGp.mjs} +0 -0
- /package/dist/{_worker.js/chunks/content-assets_XqCgPAV2.mjs → docs/_worker.js/chunks/Alert_Cgh0pfMA.mjs} +0 -0
- /package/dist/{_worker.js/chunks/content-modules_BbCqcGJp.mjs → docs/_worker.js/chunks/Alert_CplJ22O9.mjs} +0 -0
- /package/dist/{_worker.js/chunks/sharp_Cc2xj7B1.mjs → docs/_worker.js/chunks/Avatar_BszzDSZB.mjs} +0 -0
- /package/dist/{_worker.js/pages/_section_/_---page_.astro.mjs → docs/_worker.js/chunks/Avatar_DuNXB-Tl.mjs} +0 -0
- /package/dist/{_worker.js/pages/_section_/_page_/_---tab_.astro.mjs → docs/_worker.js/chunks/BackToTop_B_0NN1kJ.mjs} +0 -0
- /package/dist/{_worker.js/pages/index.astro.mjs → docs/_worker.js/chunks/BackToTop_DKY1zHBL.mjs} +0 -0
- /package/dist/{_worker.js → docs/_worker.js}/chunks/cloudflare-kv-binding_DMly_2Gl.mjs +0 -0
- /package/dist/{_worker.js → docs/_worker.js}/chunks/parse_EttCPxrw.mjs +0 -0
- /package/dist/{_worker.js → docs/_worker.js}/chunks/path_C-ZOwaTP.mjs +0 -0
- /package/dist/{avatarImg.svg → docs/avatarImg.svg} +0 -0
- /package/dist/{avatarImgDark.svg → docs/avatarImgDark.svg} +0 -0
- /package/dist/{content → docs/content}/typography/line-height.png +0 -0
- /package/dist/{favicon.svg → docs/favicon.svg} +0 -0
|
@@ -1,3686 +0,0 @@
|
|
|
1
|
-
globalThis.process ??= {}; globalThis.process.env ??= {};
|
|
2
|
-
import { v as getUniqueId, a as canUseDOM, x as getLanguageDirection, y as clearTimeouts, c as css, j as jsxRuntimeExports, b as createIcon, _ as __rest, K as KeyTypes, g as getDefaultOUIAId, e as getOUIAProps, B as Button, d as ExclamationCircleIcon, E as ExclamationTriangleIcon, C as CheckCircleIcon, m as formatBreakpointMods, u as useOUIAProps } from './Button_CBcC0ViE.mjs';
|
|
3
|
-
import { r as reactExports, a as requireReact } from './index_CBCp_CJ0.mjs';
|
|
4
|
-
/* empty css */
|
|
5
|
-
|
|
6
|
-
/** This Component can be used to wrap a functional component in order to generate a random ID
|
|
7
|
-
* Example of how to use this component
|
|
8
|
-
*
|
|
9
|
-
* const Component = ({id}: {id: string}) => (
|
|
10
|
-
* <GenerateId>{randomId => (
|
|
11
|
-
* <div id={id || randomId}>
|
|
12
|
-
* div with random ID
|
|
13
|
-
* </div>
|
|
14
|
-
* )}
|
|
15
|
-
* </GenerateId>
|
|
16
|
-
* );
|
|
17
|
-
*/
|
|
18
|
-
let currentId = 0;
|
|
19
|
-
// gives us a unique (enough) id to add to the generated id that it should prevent issues with duplicate ids
|
|
20
|
-
function getRandomId() {
|
|
21
|
-
if (typeof crypto !== 'undefined' && crypto.randomUUID) {
|
|
22
|
-
return crypto.randomUUID();
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
return getUniqueId();
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
class GenerateId extends reactExports.Component {
|
|
29
|
-
constructor() {
|
|
30
|
-
super(...arguments);
|
|
31
|
-
this.uniqueElement = this.props.isRandom ? getRandomId() : currentId++;
|
|
32
|
-
this.id = `${this.props.prefix}${this.uniqueElement}`;
|
|
33
|
-
}
|
|
34
|
-
render() {
|
|
35
|
-
return this.props.children(this.id);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
GenerateId.displayName = 'GenerateId';
|
|
39
|
-
GenerateId.defaultProps = {
|
|
40
|
-
prefix: 'pf-random-id-',
|
|
41
|
-
isRandom: false
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
const ASTERISK = '*';
|
|
45
|
-
|
|
46
|
-
var reactDom = {exports: {}};
|
|
47
|
-
|
|
48
|
-
var reactDom_production_min = {};
|
|
49
|
-
|
|
50
|
-
var scheduler = {exports: {}};
|
|
51
|
-
|
|
52
|
-
var scheduler_production_min = {};
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* @license React
|
|
56
|
-
* scheduler.production.min.js
|
|
57
|
-
*
|
|
58
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
59
|
-
*
|
|
60
|
-
* This source code is licensed under the MIT license found in the
|
|
61
|
-
* LICENSE file in the root directory of this source tree.
|
|
62
|
-
*/
|
|
63
|
-
|
|
64
|
-
var hasRequiredScheduler_production_min;
|
|
65
|
-
|
|
66
|
-
function requireScheduler_production_min () {
|
|
67
|
-
if (hasRequiredScheduler_production_min) return scheduler_production_min;
|
|
68
|
-
hasRequiredScheduler_production_min = 1;
|
|
69
|
-
(function (exports) {
|
|
70
|
-
function f(a,b){var c=a.length;a.push(b);a:for(;0<c;){var d=c-1>>>1,e=a[d];if(0<g(e,b))a[d]=b,a[c]=e,c=d;else break a}}function h(a){return 0===a.length?null:a[0]}function k(a){if(0===a.length)return null;var b=a[0],c=a.pop();if(c!==b){a[0]=c;a:for(var d=0,e=a.length,w=e>>>1;d<w;){var m=2*(d+1)-1,C=a[m],n=m+1,x=a[n];if(0>g(C,c))n<e&&0>g(x,C)?(a[d]=x,a[n]=c,d=n):(a[d]=C,a[m]=c,d=m);else if(n<e&&0>g(x,c))a[d]=x,a[n]=c,d=n;else break a}}return b}
|
|
71
|
-
function g(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}if("object"===typeof performance&&"function"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()};}else {var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q};}var r=[],t=[],u=1,v=null,y=3,z=false,A=false,B=false,D="function"===typeof setTimeout?setTimeout:null,E="function"===typeof clearTimeout?clearTimeout:null,F="undefined"!==typeof setImmediate?setImmediate:null;
|
|
72
|
-
"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function G(a){for(var b=h(t);null!==b;){if(null===b.callback)k(t);else if(b.startTime<=a)k(t),b.sortIndex=b.expirationTime,f(r,b);else break;b=h(t);}}function H(a){B=false;G(a);if(!A)if(null!==h(r))A=true,I(J);else {var b=h(t);null!==b&&K(H,b.startTime-a);}}
|
|
73
|
-
function J(a,b){A=false;B&&(B=false,E(L),L=-1);z=true;var c=y;try{G(b);for(v=h(r);null!==v&&(!(v.expirationTime>b)||a&&!M());){var d=v.callback;if("function"===typeof d){v.callback=null;y=v.priorityLevel;var e=d(v.expirationTime<=b);b=exports.unstable_now();"function"===typeof e?v.callback=e:v===h(r)&&k(r);G(b);}else k(r);v=h(r);}if(null!==v)var w=!0;else {var m=h(t);null!==m&&K(H,m.startTime-b);w=!1;}return w}finally{v=null,y=c,z=false;}}var N=false,O=null,L=-1,P=5,Q=-1;
|
|
74
|
-
function M(){return exports.unstable_now()-Q<P?false:true}function R(){if(null!==O){var a=exports.unstable_now();Q=a;var b=true;try{b=O(!0,a);}finally{b?S():(N=false,O=null);}}else N=false;}var S;if("function"===typeof F)S=function(){F(R);};else if("undefined"!==typeof MessageChannel){var T=new MessageChannel,U=T.port2;T.port1.onmessage=R;S=function(){U.postMessage(null);};}else S=function(){D(R,0);};function I(a){O=a;N||(N=true,S());}function K(a,b){L=D(function(){a(exports.unstable_now());},b);}
|
|
75
|
-
exports.unstable_IdlePriority=5;exports.unstable_ImmediatePriority=1;exports.unstable_LowPriority=4;exports.unstable_NormalPriority=3;exports.unstable_Profiling=null;exports.unstable_UserBlockingPriority=2;exports.unstable_cancelCallback=function(a){a.callback=null;};exports.unstable_continueExecution=function(){A||z||(A=true,I(J));};
|
|
76
|
-
exports.unstable_forceFrameRate=function(a){0>a||125<a?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<a?Math.floor(1E3/a):5;};exports.unstable_getCurrentPriorityLevel=function(){return y};exports.unstable_getFirstCallbackNode=function(){return h(r)};exports.unstable_next=function(a){switch(y){case 1:case 2:case 3:var b=3;break;default:b=y;}var c=y;y=b;try{return a()}finally{y=c;}};exports.unstable_pauseExecution=function(){};
|
|
77
|
-
exports.unstable_requestPaint=function(){};exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3;}var c=y;y=a;try{return b()}finally{y=c;}};
|
|
78
|
-
exports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();"object"===typeof c&&null!==c?(c=c.delay,c="number"===typeof c&&0<c?d+c:d):c=d;switch(a){case 1:var e=-1;break;case 2:e=250;break;case 5:e=1073741823;break;case 4:e=1E4;break;default:e=5E3;}e=c+e;a={id:u++,callback:b,priorityLevel:a,startTime:c,expirationTime:e,sortIndex:-1};c>d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=true,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=true,I(J)));return a};
|
|
79
|
-
exports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c;}}};
|
|
80
|
-
} (scheduler_production_min));
|
|
81
|
-
return scheduler_production_min;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
var hasRequiredScheduler;
|
|
85
|
-
|
|
86
|
-
function requireScheduler () {
|
|
87
|
-
if (hasRequiredScheduler) return scheduler.exports;
|
|
88
|
-
hasRequiredScheduler = 1;
|
|
89
|
-
{
|
|
90
|
-
scheduler.exports = requireScheduler_production_min();
|
|
91
|
-
}
|
|
92
|
-
return scheduler.exports;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* @license React
|
|
97
|
-
* react-dom.production.min.js
|
|
98
|
-
*
|
|
99
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
100
|
-
*
|
|
101
|
-
* This source code is licensed under the MIT license found in the
|
|
102
|
-
* LICENSE file in the root directory of this source tree.
|
|
103
|
-
*/
|
|
104
|
-
|
|
105
|
-
var hasRequiredReactDom_production_min;
|
|
106
|
-
|
|
107
|
-
function requireReactDom_production_min () {
|
|
108
|
-
if (hasRequiredReactDom_production_min) return reactDom_production_min;
|
|
109
|
-
hasRequiredReactDom_production_min = 1;
|
|
110
|
-
var aa=requireReact(),ca=requireScheduler();function p(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return "Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var da=new Set,ea={};function fa(a,b){ha(a,b);ha(a+"Capture",b);}
|
|
111
|
-
function ha(a,b){ea[a]=b;for(a=0;a<b.length;a++)da.add(b[a]);}
|
|
112
|
-
var ia=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),ja=Object.prototype.hasOwnProperty,ka=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,la=
|
|
113
|
-
{},ma={};function oa(a){if(ja.call(ma,a))return true;if(ja.call(la,a))return false;if(ka.test(a))return ma[a]=true;la[a]=true;return false}function pa(a,b,c,d){if(null!==c&&0===c.type)return false;switch(typeof b){case "function":case "symbol":return true;case "boolean":if(d)return false;if(null!==c)return !c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return "data-"!==a&&"aria-"!==a;default:return false}}
|
|
114
|
-
function qa(a,b,c,d){if(null===b||"undefined"===typeof b||pa(a,b,c,d))return true;if(d)return false;if(null!==c)switch(c.type){case 3:return !b;case 4:return false===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return false}function v(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g;}var z={};
|
|
115
|
-
"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){z[a]=new v(a,0,false,a,null,false,false);});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];z[b]=new v(b,1,false,a[1],null,false,false);});["contentEditable","draggable","spellCheck","value"].forEach(function(a){z[a]=new v(a,2,false,a.toLowerCase(),null,false,false);});
|
|
116
|
-
["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){z[a]=new v(a,2,false,a,null,false,false);});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){z[a]=new v(a,3,false,a.toLowerCase(),null,false,false);});
|
|
117
|
-
["checked","multiple","muted","selected"].forEach(function(a){z[a]=new v(a,3,true,a,null,false,false);});["capture","download"].forEach(function(a){z[a]=new v(a,4,false,a,null,false,false);});["cols","rows","size","span"].forEach(function(a){z[a]=new v(a,6,false,a,null,false,false);});["rowSpan","start"].forEach(function(a){z[a]=new v(a,5,false,a.toLowerCase(),null,false,false);});var ra=/[\-:]([a-z])/g;function sa(a){return a[1].toUpperCase()}
|
|
118
|
-
"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(ra,
|
|
119
|
-
sa);z[b]=new v(b,1,false,a,null,false,false);});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,false,a,"http://www.w3.org/1999/xlink",false,false);});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,false,a,"http://www.w3.org/XML/1998/namespace",false,false);});["tabIndex","crossOrigin"].forEach(function(a){z[a]=new v(a,1,false,a.toLowerCase(),null,false,false);});
|
|
120
|
-
z.xlinkHref=new v("xlinkHref",1,false,"xlink:href","http://www.w3.org/1999/xlink",true,false);["src","href","action","formAction"].forEach(function(a){z[a]=new v(a,1,false,a.toLowerCase(),null,true,true);});
|
|
121
|
-
function ta(a,b,c,d){var e=z.hasOwnProperty(b)?z[b]:null;if(null!==e?0!==e.type:d||!(2<b.length)||"o"!==b[0]&&"O"!==b[0]||"n"!==b[1]&&"N"!==b[1])qa(b,c,e,d)&&(c=null),d||null===e?oa(b)&&(null===c?a.removeAttribute(b):a.setAttribute(b,""+c)):e.mustUseProperty?a[e.propertyName]=null===c?3===e.type?false:"":c:(b=e.attributeName,d=e.attributeNamespace,null===c?a.removeAttribute(b):(e=e.type,c=3===e||4===e&&true===c?"":""+c,d?a.setAttributeNS(d,b,c):a.setAttribute(b,c)));}
|
|
122
|
-
var ua=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,va=Symbol.for("react.element"),wa=Symbol.for("react.portal"),ya=Symbol.for("react.fragment"),za=Symbol.for("react.strict_mode"),Aa=Symbol.for("react.profiler"),Ba=Symbol.for("react.provider"),Ca=Symbol.for("react.context"),Da=Symbol.for("react.forward_ref"),Ea=Symbol.for("react.suspense"),Fa=Symbol.for("react.suspense_list"),Ga=Symbol.for("react.memo"),Ha=Symbol.for("react.lazy"); var Ia=Symbol.for("react.offscreen");var Ja=Symbol.iterator;function Ka(a){if(null===a||"object"!==typeof a)return null;a=Ja&&a[Ja]||a["@@iterator"];return "function"===typeof a?a:null}var A=Object.assign,La;function Ma(a){if(void 0===La)try{throw Error();}catch(c){var b=c.stack.trim().match(/\n( *(at )?)/);La=b&&b[1]||"";}return "\n"+La+a}var Na=false;
|
|
123
|
-
function Oa(a,b){if(!a||Na)return "";Na=true;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(b)if(b=function(){throw Error();},Object.defineProperty(b.prototype,"props",{set:function(){throw Error();}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(b,[]);}catch(l){var d=l;}Reflect.construct(a,[],b);}else {try{b.call();}catch(l){d=l;}a.call(b.prototype);}else {try{throw Error();}catch(l){d=l;}a();}}catch(l){if(l&&d&&"string"===typeof l.stack){for(var e=l.stack.split("\n"),
|
|
124
|
-
f=d.stack.split("\n"),g=e.length-1,h=f.length-1;1<=g&&0<=h&&e[g]!==f[h];)h--;for(;1<=g&&0<=h;g--,h--)if(e[g]!==f[h]){if(1!==g||1!==h){do if(g--,h--,0>h||e[g]!==f[h]){var k="\n"+e[g].replace(" at new "," at ");a.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",a.displayName));return k}while(1<=g&&0<=h)}break}}}finally{Na=false,Error.prepareStackTrace=c;}return (a=a?a.displayName||a.name:"")?Ma(a):""}
|
|
125
|
-
function Pa(a){switch(a.tag){case 5:return Ma(a.type);case 16:return Ma("Lazy");case 13:return Ma("Suspense");case 19:return Ma("SuspenseList");case 0:case 2:case 15:return a=Oa(a.type,false),a;case 11:return a=Oa(a.type.render,false),a;case 1:return a=Oa(a.type,true),a;default:return ""}}
|
|
126
|
-
function Qa(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case ya:return "Fragment";case wa:return "Portal";case Aa:return "Profiler";case za:return "StrictMode";case Ea:return "Suspense";case Fa:return "SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case Ca:return (a.displayName||"Context")+".Consumer";case Ba:return (a._context.displayName||"Context")+".Provider";case Da:var b=a.render;a=a.displayName;a||(a=b.displayName||
|
|
127
|
-
b.name||"",a=""!==a?"ForwardRef("+a+")":"ForwardRef");return a;case Ga:return b=a.displayName||null,null!==b?b:Qa(a.type)||"Memo";case Ha:b=a._payload;a=a._init;try{return Qa(a(b))}catch(c){}}return null}
|
|
128
|
-
function Ra(a){var b=a.type;switch(a.tag){case 24:return "Cache";case 9:return (b.displayName||"Context")+".Consumer";case 10:return (b._context.displayName||"Context")+".Provider";case 18:return "DehydratedFragment";case 11:return a=b.render,a=a.displayName||a.name||"",b.displayName||(""!==a?"ForwardRef("+a+")":"ForwardRef");case 7:return "Fragment";case 5:return b;case 4:return "Portal";case 3:return "Root";case 6:return "Text";case 16:return Qa(b);case 8:return b===za?"StrictMode":"Mode";case 22:return "Offscreen";
|
|
129
|
-
case 12:return "Profiler";case 21:return "Scope";case 13:return "Suspense";case 19:return "SuspenseList";case 25:return "TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof b)return b.displayName||b.name||null;if("string"===typeof b)return b}return null}function Sa(a){switch(typeof a){case "boolean":case "number":case "string":case "undefined":return a;case "object":return a;default:return ""}}
|
|
130
|
-
function Ta(a){var b=a.type;return (a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)}
|
|
131
|
-
function Ua(a){var b=Ta(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:true,get:function(){return e.call(this)},set:function(a){d=""+a;f.call(this,a);}});Object.defineProperty(a,b,{enumerable:c.enumerable});return {getValue:function(){return d},setValue:function(a){d=""+a;},stopTracking:function(){a._valueTracker=
|
|
132
|
-
null;delete a[b];}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a));}function Wa(a){if(!a)return false;var b=a._valueTracker;if(!b)return true;var c=b.getValue();var d="";a&&(d=Ta(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),true):false}function Xa(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}
|
|
133
|
-
function Ya(a,b){var c=b.checked;return A({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value};}function ab(a,b){b=b.checked;null!=b&&ta(a,"checked",b,false);}
|
|
134
|
-
function bb(a,b){ab(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if("number"===d){if(0===c&&""===a.value||a.value!=c)a.value=""+c;}else a.value!==""+c&&(a.value=""+c);else if("submit"===d||"reset"===d){a.removeAttribute("value");return}b.hasOwnProperty("value")?cb(a,b.type,c):b.hasOwnProperty("defaultValue")&&cb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked);}
|
|
135
|
-
function db(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b;}c=a.name;""!==c&&(a.name="");a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c);}
|
|
136
|
-
function cb(a,b,c){if("number"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c);}var eb=Array.isArray;
|
|
137
|
-
function fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e<c.length;e++)b["$"+c[e]]=true;for(c=0;c<a.length;c++)e=b.hasOwnProperty("$"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=true);}else {c=""+Sa(c);b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=true;d&&(a[e].defaultSelected=true);return}null!==b||a[e].disabled||(b=a[e]);}null!==b&&(b.selected=true);}}
|
|
138
|
-
function gb(a,b){if(null!=b.dangerouslySetInnerHTML)throw Error(p(91));return A({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function hb(a,b){var c=b.value;if(null==c){c=b.children;b=b.defaultValue;if(null!=c){if(null!=b)throw Error(p(92));if(eb(c)){if(1<c.length)throw Error(p(93));c=c[0];}b=c;}null==b&&(b="");c=b;}a._wrapperState={initialValue:Sa(c)};}
|
|
139
|
-
function ib(a,b){var c=Sa(b.value),d=Sa(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d);}function jb(a){var b=a.textContent;b===a._wrapperState.initialValue&&""!==b&&null!==b&&(a.value=b);}function kb(a){switch(a){case "svg":return "http://www.w3.org/2000/svg";case "math":return "http://www.w3.org/1998/Math/MathML";default:return "http://www.w3.org/1999/xhtml"}}
|
|
140
|
-
function lb(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?kb(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a}
|
|
141
|
-
var mb,nb=function(a){return "undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)});}:a}(function(a,b){if("http://www.w3.org/2000/svg"!==a.namespaceURI||"innerHTML"in a)a.innerHTML=b;else {mb=mb||document.createElement("div");mb.innerHTML="<svg>"+b.valueOf().toString()+"</svg>";for(b=mb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild);}});
|
|
142
|
-
function ob(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b;}
|
|
143
|
-
var pb={animationIterationCount:true,aspectRatio:true,borderImageOutset:true,borderImageSlice:true,borderImageWidth:true,boxFlex:true,boxFlexGroup:true,boxOrdinalGroup:true,columnCount:true,columns:true,flex:true,flexGrow:true,flexPositive:true,flexShrink:true,flexNegative:true,flexOrder:true,gridArea:true,gridRow:true,gridRowEnd:true,gridRowSpan:true,gridRowStart:true,gridColumn:true,gridColumnEnd:true,gridColumnSpan:true,gridColumnStart:true,fontWeight:true,lineClamp:true,lineHeight:true,opacity:true,order:true,orphans:true,tabSize:true,widows:true,zIndex:true,
|
|
144
|
-
zoom:true,fillOpacity:true,floodOpacity:true,stopOpacity:true,strokeDasharray:true,strokeDashoffset:true,strokeMiterlimit:true,strokeOpacity:true,strokeWidth:true},qb=["Webkit","ms","Moz","O"];Object.keys(pb).forEach(function(a){qb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);pb[b]=pb[a];});});function rb(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||pb.hasOwnProperty(a)&&pb[a]?(""+b).trim():b+"px"}
|
|
145
|
-
function sb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=rb(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e;}}var tb=A({menuitem:true},{area:true,base:true,br:true,col:true,embed:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true});
|
|
146
|
-
function ub(a,b){if(b){if(tb[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(p(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(p(60));if("object"!==typeof b.dangerouslySetInnerHTML||!("__html"in b.dangerouslySetInnerHTML))throw Error(p(61));}if(null!=b.style&&"object"!==typeof b.style)throw Error(p(62));}}
|
|
147
|
-
function vb(a,b){if(-1===a.indexOf("-"))return "string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return false;default:return true}}var wb=null;function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null;
|
|
148
|
-
function Bb(a){if(a=Cb(a)){if("function"!==typeof yb)throw Error(p(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b));}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a;}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;a<b.length;a++)Bb(b[a]);}}function Gb(a,b){return a(b)}function Hb(){}var Ib=false;function Jb(a,b,c){if(Ib)return a(b,c);Ib=true;try{return Gb(a,b,c)}finally{if(Ib=false,null!==zb||null!==Ab)Hb(),Fb();}}
|
|
149
|
-
function Kb(a,b){var c=a.stateNode;if(null===c)return null;var d=Db(c);if(null===d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(d=!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=false;}if(a)return null;if(c&&"function"!==
|
|
150
|
-
typeof c)throw Error(p(231,b,typeof c));return c}var Lb=false;if(ia)try{var Mb={};Object.defineProperty(Mb,"passive",{get:function(){Lb=!0;}});window.addEventListener("test",Mb,Mb);window.removeEventListener("test",Mb,Mb);}catch(a){Lb=false;}function Nb(a,b,c,d,e,f,g,h,k){var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,l);}catch(m){this.onError(m);}}var Ob=false,Pb=null,Qb=false,Rb=null,Sb={onError:function(a){Ob=true;Pb=a;}};function Tb(a,b,c,d,e,f,g,h,k){Ob=false;Pb=null;Nb.apply(Sb,arguments);}
|
|
151
|
-
function Ub(a,b,c,d,e,f,g,h,k){Tb.apply(this,arguments);if(Ob){if(Ob){var l=Pb;Ob=false;Pb=null;}else throw Error(p(198));Qb||(Qb=true,Rb=l);}}function Vb(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else {a=b;do b=a,0!==(b.flags&4098)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function Wb(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function Xb(a){if(Vb(a)!==a)throw Error(p(188));}
|
|
152
|
-
function Yb(a){var b=a.alternate;if(!b){b=Vb(a);if(null===b)throw Error(p(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return Xb(e),a;if(f===d)return Xb(e),b;f=f.sibling;}throw Error(p(188));}if(c.return!==d.return)c=e,d=f;else {for(var g=false,h=e.child;h;){if(h===c){g=true;c=e;d=f;break}if(h===d){g=true;d=e;c=f;break}h=h.sibling;}if(!g){for(h=f.child;h;){if(h===
|
|
153
|
-
c){g=true;c=f;d=e;break}if(h===d){g=true;d=f;c=e;break}h=h.sibling;}if(!g)throw Error(p(189));}}if(c.alternate!==d)throw Error(p(190));}if(3!==c.tag)throw Error(p(188));return c.stateNode.current===c?a:b}function Zb(a){a=Yb(a);return null!==a?$b(a):null}function $b(a){if(5===a.tag||6===a.tag)return a;for(a=a.child;null!==a;){var b=$b(a);if(null!==b)return b;a=a.sibling;}return null}
|
|
154
|
-
var ac=ca.unstable_scheduleCallback,bc=ca.unstable_cancelCallback,cc=ca.unstable_shouldYield,dc=ca.unstable_requestPaint,B=ca.unstable_now,ec=ca.unstable_getCurrentPriorityLevel,fc=ca.unstable_ImmediatePriority,gc=ca.unstable_UserBlockingPriority,hc=ca.unstable_NormalPriority,ic=ca.unstable_LowPriority,jc=ca.unstable_IdlePriority,kc=null,lc=null;function mc(a){if(lc&&"function"===typeof lc.onCommitFiberRoot)try{lc.onCommitFiberRoot(kc,a,void 0,128===(a.current.flags&128));}catch(b){}}
|
|
155
|
-
var oc=Math.clz32?Math.clz32:nc,pc=Math.log,qc=Math.LN2;function nc(a){a>>>=0;return 0===a?32:31-(pc(a)/qc|0)|0}var rc=64,sc=4194304;
|
|
156
|
-
function tc(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;
|
|
157
|
-
default:return a}}function uc(a,b){var c=a.pendingLanes;if(0===c)return 0;var d=0,e=a.suspendedLanes,f=a.pingedLanes,g=c&268435455;if(0!==g){var h=g&~e;0!==h?d=tc(h):(f&=g,0!==f&&(d=tc(f)));}else g=c&~e,0!==g?d=tc(g):0!==f&&(d=tc(f));if(0===d)return 0;if(0!==b&&b!==d&&0===(b&e)&&(e=d&-d,f=b&-b,e>=f||16===e&&0!==(f&4194240)))return b;0!==(d&4)&&(d|=c&16);b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0<b;)c=31-oc(b),e=1<<c,d|=a[c],b&=~e;return d}
|
|
158
|
-
function vc(a,b){switch(a){case 1:case 2:case 4:return b+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return b+5E3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return -1;case 134217728:case 268435456:case 536870912:case 1073741824:return -1;default:return -1}}
|
|
159
|
-
function wc(a,b){for(var c=a.suspendedLanes,d=a.pingedLanes,e=a.expirationTimes,f=a.pendingLanes;0<f;){var g=31-oc(f),h=1<<g,k=e[g];if(-1===k){if(0===(h&c)||0!==(h&d))e[g]=vc(h,b);}else k<=b&&(a.expiredLanes|=h);f&=~h;}}function xc(a){a=a.pendingLanes&-1073741825;return 0!==a?a:a&1073741824?1073741824:0}function yc(){var a=rc;rc<<=1;0===(rc&4194240)&&(rc=64);return a}function zc(a){for(var b=[],c=0;31>c;c++)b.push(a);return b}
|
|
160
|
-
function Ac(a,b,c){a.pendingLanes|=b;536870912!==b&&(a.suspendedLanes=0,a.pingedLanes=0);a=a.eventTimes;b=31-oc(b);a[b]=c;}function Bc(a,b){var c=a.pendingLanes&~b;a.pendingLanes=b;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=b;a.mutableReadLanes&=b;a.entangledLanes&=b;b=a.entanglements;var d=a.eventTimes;for(a=a.expirationTimes;0<c;){var e=31-oc(c),f=1<<e;b[e]=0;d[e]=-1;a[e]=-1;c&=~f;}}
|
|
161
|
-
function Cc(a,b){var c=a.entangledLanes|=b;for(a=a.entanglements;c;){var d=31-oc(c),e=1<<d;e&b|a[d]&b&&(a[d]|=b);c&=~e;}}var C=0;function Dc(a){a&=-a;return 1<a?4<a?0!==(a&268435455)?16:536870912:4:1}var Ec,Fc,Gc,Hc,Ic,Jc=false,Kc=[],Lc=null,Mc=null,Nc=null,Oc=new Map,Pc=new Map,Qc=[],Rc="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");
|
|
162
|
-
function Sc(a,b){switch(a){case "focusin":case "focusout":Lc=null;break;case "dragenter":case "dragleave":Mc=null;break;case "mouseover":case "mouseout":Nc=null;break;case "pointerover":case "pointerout":Oc.delete(b.pointerId);break;case "gotpointercapture":case "lostpointercapture":Pc.delete(b.pointerId);}}
|
|
163
|
-
function Tc(a,b,c,d,e,f){if(null===a||a.nativeEvent!==f)return a={blockedOn:b,domEventName:c,eventSystemFlags:d,nativeEvent:f,targetContainers:[e]},null!==b&&(b=Cb(b),null!==b&&Fc(b)),a;a.eventSystemFlags|=d;b=a.targetContainers;null!==e&&-1===b.indexOf(e)&&b.push(e);return a}
|
|
164
|
-
function Uc(a,b,c,d,e){switch(b){case "focusin":return Lc=Tc(Lc,a,b,c,d,e),true;case "dragenter":return Mc=Tc(Mc,a,b,c,d,e),true;case "mouseover":return Nc=Tc(Nc,a,b,c,d,e),true;case "pointerover":var f=e.pointerId;Oc.set(f,Tc(Oc.get(f)||null,a,b,c,d,e));return true;case "gotpointercapture":return f=e.pointerId,Pc.set(f,Tc(Pc.get(f)||null,a,b,c,d,e)),true}return false}
|
|
165
|
-
function Vc(a){var b=Wc(a.target);if(null!==b){var c=Vb(b);if(null!==c)if(b=c.tag,13===b){if(b=Wb(c),null!==b){a.blockedOn=b;Ic(a.priority,function(){Gc(c);});return}}else if(3===b&&c.stateNode.current.memoizedState.isDehydrated){a.blockedOn=3===c.tag?c.stateNode.containerInfo:null;return}}a.blockedOn=null;}
|
|
166
|
-
function Xc(a){if(null!==a.blockedOn)return false;for(var b=a.targetContainers;0<b.length;){var c=Yc(a.domEventName,a.eventSystemFlags,b[0],a.nativeEvent);if(null===c){c=a.nativeEvent;var d=new c.constructor(c.type,c);wb=d;c.target.dispatchEvent(d);wb=null;}else return b=Cb(c),null!==b&&Fc(b),a.blockedOn=c,false;b.shift();}return true}function Zc(a,b,c){Xc(a)&&c.delete(b);}function $c(){Jc=false;null!==Lc&&Xc(Lc)&&(Lc=null);null!==Mc&&Xc(Mc)&&(Mc=null);null!==Nc&&Xc(Nc)&&(Nc=null);Oc.forEach(Zc);Pc.forEach(Zc);}
|
|
167
|
-
function ad(a,b){a.blockedOn===b&&(a.blockedOn=null,Jc||(Jc=true,ca.unstable_scheduleCallback(ca.unstable_NormalPriority,$c)));}
|
|
168
|
-
function bd(a){function b(b){return ad(b,a)}if(0<Kc.length){ad(Kc[0],a);for(var c=1;c<Kc.length;c++){var d=Kc[c];d.blockedOn===a&&(d.blockedOn=null);}}null!==Lc&&ad(Lc,a);null!==Mc&&ad(Mc,a);null!==Nc&&ad(Nc,a);Oc.forEach(b);Pc.forEach(b);for(c=0;c<Qc.length;c++)d=Qc[c],d.blockedOn===a&&(d.blockedOn=null);for(;0<Qc.length&&(c=Qc[0],null===c.blockedOn);)Vc(c),null===c.blockedOn&&Qc.shift();}var cd=ua.ReactCurrentBatchConfig,dd=true;
|
|
169
|
-
function ed(a,b,c,d){var e=C,f=cd.transition;cd.transition=null;try{C=1,fd(a,b,c,d);}finally{C=e,cd.transition=f;}}function gd(a,b,c,d){var e=C,f=cd.transition;cd.transition=null;try{C=4,fd(a,b,c,d);}finally{C=e,cd.transition=f;}}
|
|
170
|
-
function fd(a,b,c,d){if(dd){var e=Yc(a,b,c,d);if(null===e)hd(a,b,d,id,c),Sc(a,d);else if(Uc(e,a,b,c,d))d.stopPropagation();else if(Sc(a,d),b&4&&-1<Rc.indexOf(a)){for(;null!==e;){var f=Cb(e);null!==f&&Ec(f);f=Yc(a,b,c,d);null===f&&hd(a,b,d,id,c);if(f===e)break;e=f;}null!==e&&d.stopPropagation();}else hd(a,b,d,null,c);}}var id=null;
|
|
171
|
-
function Yc(a,b,c,d){id=null;a=xb(d);a=Wc(a);if(null!==a)if(b=Vb(a),null===b)a=null;else if(c=b.tag,13===c){a=Wb(b);if(null!==a)return a;a=null;}else if(3===c){if(b.stateNode.current.memoizedState.isDehydrated)return 3===b.tag?b.stateNode.containerInfo:null;a=null;}else b!==a&&(a=null);id=a;return null}
|
|
172
|
-
function jd(a){switch(a){case "cancel":case "click":case "close":case "contextmenu":case "copy":case "cut":case "auxclick":case "dblclick":case "dragend":case "dragstart":case "drop":case "focusin":case "focusout":case "input":case "invalid":case "keydown":case "keypress":case "keyup":case "mousedown":case "mouseup":case "paste":case "pause":case "play":case "pointercancel":case "pointerdown":case "pointerup":case "ratechange":case "reset":case "resize":case "seeked":case "submit":case "touchcancel":case "touchend":case "touchstart":case "volumechange":case "change":case "selectionchange":case "textInput":case "compositionstart":case "compositionend":case "compositionupdate":case "beforeblur":case "afterblur":case "beforeinput":case "blur":case "fullscreenchange":case "focus":case "hashchange":case "popstate":case "select":case "selectstart":return 1;case "drag":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "mousemove":case "mouseout":case "mouseover":case "pointermove":case "pointerout":case "pointerover":case "scroll":case "toggle":case "touchmove":case "wheel":case "mouseenter":case "mouseleave":case "pointerenter":case "pointerleave":return 4;
|
|
173
|
-
case "message":switch(ec()){case fc:return 1;case gc:return 4;case hc:case ic:return 16;case jc:return 536870912;default:return 16}default:return 16}}var kd=null,ld=null,md=null;function nd(){if(md)return md;var a,b=ld,c=b.length,d,e="value"in kd?kd.value:kd.textContent,f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);return md=e.slice(a,1<d?1-d:void 0)}
|
|
174
|
-
function od(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}function pd(){return true}function qd(){return false}
|
|
175
|
-
function rd(a){function b(b,d,e,f,g){this._reactName=b;this._targetInst=e;this.type=d;this.nativeEvent=f;this.target=g;this.currentTarget=null;for(var c in a)a.hasOwnProperty(c)&&(b=a[c],this[c]=b?b(f):f[c]);this.isDefaultPrevented=(null!=f.defaultPrevented?f.defaultPrevented:false===f.returnValue)?pd:qd;this.isPropagationStopped=qd;return this}A(b.prototype,{preventDefault:function(){this.defaultPrevented=true;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&
|
|
176
|
-
(a.returnValue=false),this.isDefaultPrevented=pd);},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=true),this.isPropagationStopped=pd);},persist:function(){},isPersistent:pd});return b}
|
|
177
|
-
var sd={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},td=rd(sd),ud=A({},sd,{view:0,detail:0}),vd=rd(ud),wd,xd,yd,Ad=A({},ud,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zd,button:0,buttons:0,relatedTarget:function(a){return void 0===a.relatedTarget?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){if("movementX"in
|
|
178
|
-
a)return a.movementX;a!==yd&&(yd&&"mousemove"===a.type?(wd=a.screenX-yd.screenX,xd=a.screenY-yd.screenY):xd=wd=0,yd=a);return wd},movementY:function(a){return "movementY"in a?a.movementY:xd}}),Bd=rd(Ad),Cd=A({},Ad,{dataTransfer:0}),Dd=rd(Cd),Ed=A({},ud,{relatedTarget:0}),Fd=rd(Ed),Gd=A({},sd,{animationName:0,elapsedTime:0,pseudoElement:0}),Hd=rd(Gd),Id=A({},sd,{clipboardData:function(a){return "clipboardData"in a?a.clipboardData:window.clipboardData}}),Jd=rd(Id),Kd=A({},sd,{data:0}),Ld=rd(Kd),Md={Esc:"Escape",
|
|
179
|
-
Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Nd={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",
|
|
180
|
-
119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Od={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pd(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=Od[a])?!!b[a]:false}function zd(){return Pd}
|
|
181
|
-
var Qd=A({},ud,{key:function(a){if(a.key){var b=Md[a.key]||a.key;if("Unidentified"!==b)return b}return "keypress"===a.type?(a=od(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?Nd[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zd,charCode:function(a){return "keypress"===a.type?od(a):0},keyCode:function(a){return "keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return "keypress"===
|
|
182
|
-
a.type?od(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}}),Rd=rd(Qd),Sd=A({},Ad,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Td=rd(Sd),Ud=A({},ud,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zd}),Vd=rd(Ud),Wd=A({},sd,{propertyName:0,elapsedTime:0,pseudoElement:0}),Xd=rd(Wd),Yd=A({},Ad,{deltaX:function(a){return "deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},
|
|
183
|
-
deltaY:function(a){return "deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),Zd=rd(Yd),$d=[9,13,27,32],ae=ia&&"CompositionEvent"in window,be=null;ia&&"documentMode"in document&&(be=document.documentMode);var ce=ia&&"TextEvent"in window&&!be,de=ia&&(!ae||be&&8<be&&11>=be),ee=String.fromCharCode(32),fe=false;
|
|
184
|
-
function ge(a,b){switch(a){case "keyup":return -1!==$d.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "focusout":return true;default:return false}}function he(a){a=a.detail;return "object"===typeof a&&"data"in a?a.data:null}var ie=false;function je(a,b){switch(a){case "compositionend":return he(b);case "keypress":if(32!==b.which)return null;fe=true;return ee;case "textInput":return a=b.data,a===ee&&fe?null:a;default:return null}}
|
|
185
|
-
function ke(a,b){if(ie)return "compositionend"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=false,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;if(b.which)return String.fromCharCode(b.which)}return null;case "compositionend":return de&&"ko"!==b.locale?null:b.data;default:return null}}
|
|
186
|
-
var le={color:true,date:true,datetime:true,"datetime-local":true,email:true,month:true,number:true,password:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true};function me(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return "input"===b?!!le[a.type]:"textarea"===b?true:false}function ne(a,b,c,d){Eb(d);b=oe(b,"onChange");0<b.length&&(c=new td("onChange","change",null,c,d),a.push({event:c,listeners:b}));}var pe=null,qe=null;function re(a){se(a,0);}function te(a){var b=ue(a);if(Wa(b))return a}
|
|
187
|
-
function ve(a,b){if("change"===a)return b}var we=false;if(ia){var xe;if(ia){var ye="oninput"in document;if(!ye){var ze=document.createElement("div");ze.setAttribute("oninput","return;");ye="function"===typeof ze.oninput;}xe=ye;}else xe=false;we=xe&&(!document.documentMode||9<document.documentMode);}function Ae(){pe&&(pe.detachEvent("onpropertychange",Be),qe=pe=null);}function Be(a){if("value"===a.propertyName&&te(qe)){var b=[];ne(b,qe,a,xb(a));Jb(re,b);}}
|
|
188
|
-
function Ce(a,b,c){"focusin"===a?(Ae(),pe=b,qe=c,pe.attachEvent("onpropertychange",Be)):"focusout"===a&&Ae();}function De(a){if("selectionchange"===a||"keyup"===a||"keydown"===a)return te(qe)}function Ee(a,b){if("click"===a)return te(b)}function Fe(a,b){if("input"===a||"change"===a)return te(b)}function Ge(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var He="function"===typeof Object.is?Object.is:Ge;
|
|
189
|
-
function Ie(a,b){if(He(a,b))return true;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return false;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return false;for(d=0;d<c.length;d++){var e=c[d];if(!ja.call(b,e)||!He(a[e],b[e]))return false}return true}function Je(a){for(;a&&a.firstChild;)a=a.firstChild;return a}
|
|
190
|
-
function Ke(a,b){var c=Je(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return {node:c,offset:b-a};a=d;}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode;}c=void 0;}c=Je(c);}}function Le(a,b){return a&&b?a===b?true:a&&3===a.nodeType?false:b&&3===b.nodeType?Le(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):false:false}
|
|
191
|
-
function Me(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c="string"===typeof b.contentWindow.location.href;}catch(d){c=false;}if(c)a=b.contentWindow;else break;b=Xa(a.document);}return b}function Ne(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)}
|
|
192
|
-
function Oe(a){var b=Me(),c=a.focusedElem,d=a.selectionRange;if(b!==c&&c&&c.ownerDocument&&Le(c.ownerDocument.documentElement,c)){if(null!==d&&Ne(c))if(b=d.start,a=d.end,void 0===a&&(a=b),"selectionStart"in c)c.selectionStart=b,c.selectionEnd=Math.min(a,c.value.length);else if(a=(b=c.ownerDocument||document)&&b.defaultView||window,a.getSelection){a=a.getSelection();var e=c.textContent.length,f=Math.min(d.start,e);d=void 0===d.end?f:Math.min(d.end,e);!a.extend&&f>d&&(e=d,d=f,f=e);e=Ke(c,f);var g=Ke(c,
|
|
193
|
-
d);e&&g&&(1!==a.rangeCount||a.anchorNode!==e.node||a.anchorOffset!==e.offset||a.focusNode!==g.node||a.focusOffset!==g.offset)&&(b=b.createRange(),b.setStart(e.node,e.offset),a.removeAllRanges(),f>d?(a.addRange(b),a.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),a.addRange(b)));}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});"function"===typeof c.focus&&c.focus();for(c=0;c<b.length;c++)a=b[c],a.element.scrollLeft=a.left,a.element.scrollTop=a.top;}}
|
|
194
|
-
var Pe=ia&&"documentMode"in document&&11>=document.documentMode,Qe=null,Re=null,Se=null,Te=false;
|
|
195
|
-
function Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,"selectionStart"in d&&Ne(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Ie(Se,d)||(Se=d,d=oe(Re,"onSelect"),0<d.length&&(b=new td("onSelect","select",null,b,c),a.push({event:b,listeners:d}),b.target=Qe)));}
|
|
196
|
-
function Ve(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;return c}var We={animationend:Ve("Animation","AnimationEnd"),animationiteration:Ve("Animation","AnimationIteration"),animationstart:Ve("Animation","AnimationStart"),transitionend:Ve("Transition","TransitionEnd")},Xe={},Ye={};
|
|
197
|
-
ia&&(Ye=document.createElement("div").style,"AnimationEvent"in window||(delete We.animationend.animation,delete We.animationiteration.animation,delete We.animationstart.animation),"TransitionEvent"in window||delete We.transitionend.transition);function Ze(a){if(Xe[a])return Xe[a];if(!We[a])return a;var b=We[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in Ye)return Xe[a]=b[c];return a}var $e=Ze("animationend"),af=Ze("animationiteration"),bf=Ze("animationstart"),cf=Ze("transitionend"),df=new Map,ef="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");
|
|
198
|
-
function ff(a,b){df.set(a,b);fa(b,[a]);}for(var gf=0;gf<ef.length;gf++){var hf=ef[gf],jf=hf.toLowerCase(),kf=hf[0].toUpperCase()+hf.slice(1);ff(jf,"on"+kf);}ff($e,"onAnimationEnd");ff(af,"onAnimationIteration");ff(bf,"onAnimationStart");ff("dblclick","onDoubleClick");ff("focusin","onFocus");ff("focusout","onBlur");ff(cf,"onTransitionEnd");ha("onMouseEnter",["mouseout","mouseover"]);ha("onMouseLeave",["mouseout","mouseover"]);ha("onPointerEnter",["pointerout","pointerover"]);
|
|
199
|
-
ha("onPointerLeave",["pointerout","pointerover"]);fa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));fa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));fa("onBeforeInput",["compositionend","keypress","textInput","paste"]);fa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));fa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));
|
|
200
|
-
fa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var lf="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),mf=new Set("cancel close invalid load scroll toggle".split(" ").concat(lf));
|
|
201
|
-
function nf(a,b,c){var d=a.type||"unknown-event";a.currentTarget=c;Ub(d,b,void 0,a);a.currentTarget=null;}
|
|
202
|
-
function se(a,b){b=0!==(b&4);for(var c=0;c<a.length;c++){var d=a[c],e=d.event;d=d.listeners;a:{var f=void 0;if(b)for(var g=d.length-1;0<=g;g--){var h=d[g],k=h.instance,l=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;nf(e,h,l);f=k;}else for(g=0;g<d.length;g++){h=d[g];k=h.instance;l=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;nf(e,h,l);f=k;}}}if(Qb)throw a=Rb,Qb=false,Rb=null,a;}
|
|
203
|
-
function D(a,b){var c=b[of];void 0===c&&(c=b[of]=new Set);var d=a+"__bubble";c.has(d)||(pf(b,a,2,false),c.add(d));}function qf(a,b,c){var d=0;b&&(d|=4);pf(c,a,d,b);}var rf="_reactListening"+Math.random().toString(36).slice(2);function sf(a){if(!a[rf]){a[rf]=true;da.forEach(function(b){"selectionchange"!==b&&(mf.has(b)||qf(b,false,a),qf(b,true,a));});var b=9===a.nodeType?a:a.ownerDocument;null===b||b[rf]||(b[rf]=true,qf("selectionchange",false,b));}}
|
|
204
|
-
function pf(a,b,c,d){switch(jd(b)){case 1:var e=ed;break;case 4:e=gd;break;default:e=fd;}c=e.bind(null,b,c,a);e=void 0;!Lb||"touchstart"!==b&&"touchmove"!==b&&"wheel"!==b||(e=true);d?void 0!==e?a.addEventListener(b,c,{capture:true,passive:e}):a.addEventListener(b,c,true):void 0!==e?a.addEventListener(b,c,{passive:e}):a.addEventListener(b,c,false);}
|
|
205
|
-
function hd(a,b,c,d,e){var f=d;if(0===(b&1)&&0===(b&2)&&null!==d)a:for(;;){if(null===d)return;var g=d.tag;if(3===g||4===g){var h=d.stateNode.containerInfo;if(h===e||8===h.nodeType&&h.parentNode===e)break;if(4===g)for(g=d.return;null!==g;){var k=g.tag;if(3===k||4===k)if(k=g.stateNode.containerInfo,k===e||8===k.nodeType&&k.parentNode===e)return;g=g.return;}for(;null!==h;){g=Wc(h);if(null===g)return;k=g.tag;if(5===k||6===k){d=f=g;continue a}h=h.parentNode;}}d=d.return;}Jb(function(){var d=f,e=xb(c),g=[];
|
|
206
|
-
a:{var h=df.get(a);if(void 0!==h){var k=td,n=a;switch(a){case "keypress":if(0===od(c))break a;case "keydown":case "keyup":k=Rd;break;case "focusin":n="focus";k=Fd;break;case "focusout":n="blur";k=Fd;break;case "beforeblur":case "afterblur":k=Fd;break;case "click":if(2===c.button)break a;case "auxclick":case "dblclick":case "mousedown":case "mousemove":case "mouseup":case "mouseout":case "mouseover":case "contextmenu":k=Bd;break;case "drag":case "dragend":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "dragstart":case "drop":k=
|
|
207
|
-
Dd;break;case "touchcancel":case "touchend":case "touchmove":case "touchstart":k=Vd;break;case $e:case af:case bf:k=Hd;break;case cf:k=Xd;break;case "scroll":k=vd;break;case "wheel":k=Zd;break;case "copy":case "cut":case "paste":k=Jd;break;case "gotpointercapture":case "lostpointercapture":case "pointercancel":case "pointerdown":case "pointermove":case "pointerout":case "pointerover":case "pointerup":k=Td;}var t=0!==(b&4),J=!t&&"scroll"===a,x=t?null!==h?h+"Capture":null:h;t=[];for(var w=d,u;null!==
|
|
208
|
-
w;){u=w;var F=u.stateNode;5===u.tag&&null!==F&&(u=F,null!==x&&(F=Kb(w,x),null!=F&&t.push(tf(w,F,u))));if(J)break;w=w.return;}0<t.length&&(h=new k(h,n,null,c,e),g.push({event:h,listeners:t}));}}if(0===(b&7)){a:{h="mouseover"===a||"pointerover"===a;k="mouseout"===a||"pointerout"===a;if(h&&c!==wb&&(n=c.relatedTarget||c.fromElement)&&(Wc(n)||n[uf]))break a;if(k||h){h=e.window===e?e:(h=e.ownerDocument)?h.defaultView||h.parentWindow:window;if(k){if(n=c.relatedTarget||c.toElement,k=d,n=n?Wc(n):null,null!==
|
|
209
|
-
n&&(J=Vb(n),n!==J||5!==n.tag&&6!==n.tag))n=null;}else k=null,n=d;if(k!==n){t=Bd;F="onMouseLeave";x="onMouseEnter";w="mouse";if("pointerout"===a||"pointerover"===a)t=Td,F="onPointerLeave",x="onPointerEnter",w="pointer";J=null==k?h:ue(k);u=null==n?h:ue(n);h=new t(F,w+"leave",k,c,e);h.target=J;h.relatedTarget=u;F=null;Wc(e)===d&&(t=new t(x,w+"enter",n,c,e),t.target=u,t.relatedTarget=J,F=t);J=F;if(k&&n)b:{t=k;x=n;w=0;for(u=t;u;u=vf(u))w++;u=0;for(F=x;F;F=vf(F))u++;for(;0<w-u;)t=vf(t),w--;for(;0<u-w;)x=
|
|
210
|
-
vf(x),u--;for(;w--;){if(t===x||null!==x&&t===x.alternate)break b;t=vf(t);x=vf(x);}t=null;}else t=null;null!==k&&wf(g,h,k,t,false);null!==n&&null!==J&&wf(g,J,n,t,true);}}}a:{h=d?ue(d):window;k=h.nodeName&&h.nodeName.toLowerCase();if("select"===k||"input"===k&&"file"===h.type)var na=ve;else if(me(h))if(we)na=Fe;else {na=De;var xa=Ce;}else (k=h.nodeName)&&"input"===k.toLowerCase()&&("checkbox"===h.type||"radio"===h.type)&&(na=Ee);if(na&&(na=na(a,d))){ne(g,na,c,e);break a}xa&&xa(a,h,d);"focusout"===a&&(xa=h._wrapperState)&&
|
|
211
|
-
xa.controlled&&"number"===h.type&&cb(h,"number",h.value);}xa=d?ue(d):window;switch(a){case "focusin":if(me(xa)||"true"===xa.contentEditable)Qe=xa,Re=d,Se=null;break;case "focusout":Se=Re=Qe=null;break;case "mousedown":Te=true;break;case "contextmenu":case "mouseup":case "dragend":Te=false;Ue(g,c,e);break;case "selectionchange":if(Pe)break;case "keydown":case "keyup":Ue(g,c,e);}var $a;if(ae)b:{switch(a){case "compositionstart":var ba="onCompositionStart";break b;case "compositionend":ba="onCompositionEnd";
|
|
212
|
-
break b;case "compositionupdate":ba="onCompositionUpdate";break b}ba=void 0;}else ie?ge(a,c)&&(ba="onCompositionEnd"):"keydown"===a&&229===c.keyCode&&(ba="onCompositionStart");ba&&(de&&"ko"!==c.locale&&(ie||"onCompositionStart"!==ba?"onCompositionEnd"===ba&&ie&&($a=nd()):(kd=e,ld="value"in kd?kd.value:kd.textContent,ie=true)),xa=oe(d,ba),0<xa.length&&(ba=new Ld(ba,a,null,c,e),g.push({event:ba,listeners:xa}),$a?ba.data=$a:($a=he(c),null!==$a&&(ba.data=$a))));if($a=ce?je(a,c):ke(a,c))d=oe(d,"onBeforeInput"),
|
|
213
|
-
0<d.length&&(e=new Ld("onBeforeInput","beforeinput",null,c,e),g.push({event:e,listeners:d}),e.data=$a);}se(g,b);});}function tf(a,b,c){return {instance:a,listener:b,currentTarget:c}}function oe(a,b){for(var c=b+"Capture",d=[];null!==a;){var e=a,f=e.stateNode;5===e.tag&&null!==f&&(e=f,f=Kb(a,c),null!=f&&d.unshift(tf(a,f,e)),f=Kb(a,b),null!=f&&d.push(tf(a,f,e)));a=a.return;}return d}function vf(a){if(null===a)return null;do a=a.return;while(a&&5!==a.tag);return a?a:null}
|
|
214
|
-
function wf(a,b,c,d,e){for(var f=b._reactName,g=[];null!==c&&c!==d;){var h=c,k=h.alternate,l=h.stateNode;if(null!==k&&k===d)break;5===h.tag&&null!==l&&(h=l,e?(k=Kb(c,f),null!=k&&g.unshift(tf(c,k,h))):e||(k=Kb(c,f),null!=k&&g.push(tf(c,k,h))));c=c.return;}0!==g.length&&a.push({event:b,listeners:g});}var xf=/\r\n?/g,yf=/\u0000|\uFFFD/g;function zf(a){return ("string"===typeof a?a:""+a).replace(xf,"\n").replace(yf,"")}function Af(a,b,c){b=zf(b);if(zf(a)!==b&&c)throw Error(p(425));}function Bf(){}
|
|
215
|
-
var Cf=null,Df=null;function Ef(a,b){return "textarea"===a||"noscript"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html}
|
|
216
|
-
var Ff="function"===typeof setTimeout?setTimeout:void 0,Gf="function"===typeof clearTimeout?clearTimeout:void 0,Hf="function"===typeof Promise?Promise:void 0,Jf="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof Hf?function(a){return Hf.resolve(null).then(a).catch(If)}:Ff;function If(a){setTimeout(function(){throw a;});}
|
|
217
|
-
function Kf(a,b){var c=b,d=0;do{var e=c.nextSibling;a.removeChild(c);if(e&&8===e.nodeType)if(c=e.data,"/$"===c){if(0===d){a.removeChild(e);bd(b);return}d--;}else "$"!==c&&"$?"!==c&&"$!"!==c||d++;c=e;}while(c);bd(b);}function Lf(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break;if(8===b){b=a.data;if("$"===b||"$!"===b||"$?"===b)break;if("/$"===b)return null}}return a}
|
|
218
|
-
function Mf(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if("$"===c||"$!"===c||"$?"===c){if(0===b)return a;b--;}else "/$"===c&&b++;}a=a.previousSibling;}return null}var Nf=Math.random().toString(36).slice(2),Of="__reactFiber$"+Nf,Pf="__reactProps$"+Nf,uf="__reactContainer$"+Nf,of="__reactEvents$"+Nf,Qf="__reactListeners$"+Nf,Rf="__reactHandles$"+Nf;
|
|
219
|
-
function Wc(a){var b=a[Of];if(b)return b;for(var c=a.parentNode;c;){if(b=c[uf]||c[Of]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=Mf(a);null!==a;){if(c=a[Of])return c;a=Mf(a);}return b}a=c;c=a.parentNode;}return null}function Cb(a){a=a[Of]||a[uf];return !a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function ue(a){if(5===a.tag||6===a.tag)return a.stateNode;throw Error(p(33));}function Db(a){return a[Pf]||null}var Sf=[],Tf=-1;function Uf(a){return {current:a}}
|
|
220
|
-
function E(a){0>Tf||(a.current=Sf[Tf],Sf[Tf]=null,Tf--);}function G(a,b){Tf++;Sf[Tf]=a.current;a.current=b;}var Vf={},H=Uf(Vf),Wf=Uf(false),Xf=Vf;function Yf(a,b){var c=a.type.contextTypes;if(!c)return Vf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}
|
|
221
|
-
function Zf(a){a=a.childContextTypes;return null!==a&&void 0!==a}function $f(){E(Wf);E(H);}function ag(a,b,c){if(H.current!==Vf)throw Error(p(168));G(H,b);G(Wf,c);}function bg(a,b,c){var d=a.stateNode;b=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(p(108,Ra(a)||"Unknown",e));return A({},c,d)}
|
|
222
|
-
function cg(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Vf;Xf=H.current;G(H,a);G(Wf,Wf.current);return true}function dg(a,b,c){var d=a.stateNode;if(!d)throw Error(p(169));c?(a=bg(a,b,Xf),d.__reactInternalMemoizedMergedChildContext=a,E(Wf),E(H),G(H,a)):E(Wf);G(Wf,c);}var eg=null,fg=false,gg=false;function hg(a){null===eg?eg=[a]:eg.push(a);}function ig(a){fg=true;hg(a);}
|
|
223
|
-
function jg(){if(!gg&&null!==eg){gg=true;var a=0,b=C;try{var c=eg;for(C=1;a<c.length;a++){var d=c[a];do d=d(!0);while(null!==d)}eg=null;fg=!1;}catch(e){throw null!==eg&&(eg=eg.slice(a+1)),ac(fc,jg),e;}finally{C=b,gg=false;}}return null}var kg=[],lg=0,mg=null,ng=0,og=[],pg=0,qg=null,rg=1,sg="";function tg(a,b){kg[lg++]=ng;kg[lg++]=mg;mg=a;ng=b;}
|
|
224
|
-
function ug(a,b,c){og[pg++]=rg;og[pg++]=sg;og[pg++]=qg;qg=a;var d=rg;a=sg;var e=32-oc(d)-1;d&=~(1<<e);c+=1;var f=32-oc(b)+e;if(30<f){var g=e-e%5;f=(d&(1<<g)-1).toString(32);d>>=g;e-=g;rg=1<<32-oc(b)+e|c<<e|d;sg=f+a;}else rg=1<<f|c<<e|d,sg=a;}function vg(a){null!==a.return&&(tg(a,1),ug(a,1,0));}function wg(a){for(;a===mg;)mg=kg[--lg],kg[lg]=null,ng=kg[--lg],kg[lg]=null;for(;a===qg;)qg=og[--pg],og[pg]=null,sg=og[--pg],og[pg]=null,rg=og[--pg],og[pg]=null;}var xg=null,yg=null,I=false,zg=null;
|
|
225
|
-
function Ag(a,b){var c=Bg(5,null,null,0);c.elementType="DELETED";c.stateNode=b;c.return=a;b=a.deletions;null===b?(a.deletions=[c],a.flags|=16):b.push(c);}
|
|
226
|
-
function Cg(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,xg=a,yg=Lf(b.firstChild),true):false;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,xg=a,yg=null,true):false;case 13:return b=8!==b.nodeType?null:b,null!==b?(c=null!==qg?{id:rg,overflow:sg}:null,a.memoizedState={dehydrated:b,treeContext:c,retryLane:1073741824},c=Bg(18,null,null,0),c.stateNode=b,c.return=a,a.child=c,xg=a,yg=
|
|
227
|
-
null,true):false;default:return false}}function Dg(a){return 0!==(a.mode&1)&&0===(a.flags&128)}function Eg(a){if(I){var b=yg;if(b){var c=b;if(!Cg(a,b)){if(Dg(a))throw Error(p(418));b=Lf(c.nextSibling);var d=xg;b&&Cg(a,b)?Ag(d,c):(a.flags=a.flags&-4097|2,I=false,xg=a);}}else {if(Dg(a))throw Error(p(418));a.flags=a.flags&-4097|2;I=false;xg=a;}}}function Fg(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;xg=a;}
|
|
228
|
-
function Gg(a){if(a!==xg)return false;if(!I)return Fg(a),I=true,false;var b;(b=3!==a.tag)&&!(b=5!==a.tag)&&(b=a.type,b="head"!==b&&"body"!==b&&!Ef(a.type,a.memoizedProps));if(b&&(b=yg)){if(Dg(a))throw Hg(),Error(p(418));for(;b;)Ag(a,b),b=Lf(b.nextSibling);}Fg(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(p(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if("/$"===c){if(0===b){yg=Lf(a.nextSibling);break a}b--;}else "$"!==c&&"$!"!==c&&"$?"!==c||b++;}a=a.nextSibling;}yg=
|
|
229
|
-
null;}}else yg=xg?Lf(a.stateNode.nextSibling):null;return true}function Hg(){for(var a=yg;a;)a=Lf(a.nextSibling);}function Ig(){yg=xg=null;I=false;}function Jg(a){null===zg?zg=[a]:zg.push(a);}var Kg=ua.ReactCurrentBatchConfig;
|
|
230
|
-
function Lg(a,b,c){a=c.ref;if(null!==a&&"function"!==typeof a&&"object"!==typeof a){if(c._owner){c=c._owner;if(c){if(1!==c.tag)throw Error(p(309));var d=c.stateNode;}if(!d)throw Error(p(147,a));var e=d,f=""+a;if(null!==b&&null!==b.ref&&"function"===typeof b.ref&&b.ref._stringRef===f)return b.ref;b=function(a){var b=e.refs;null===a?delete b[f]:b[f]=a;};b._stringRef=f;return b}if("string"!==typeof a)throw Error(p(284));if(!c._owner)throw Error(p(290,a));}return a}
|
|
231
|
-
function Mg(a,b){a=Object.prototype.toString.call(b);throw Error(p(31,"[object Object]"===a?"object with keys {"+Object.keys(b).join(", ")+"}":a));}function Ng(a){var b=a._init;return b(a._payload)}
|
|
232
|
-
function Og(a){function b(b,c){if(a){var d=b.deletions;null===d?(b.deletions=[c],b.flags|=16):d.push(c);}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b){a=Pg(a,b);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return b.flags|=1048576,c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.flags|=2,c):d;b.flags|=2;return c}function g(b){a&&
|
|
233
|
-
null===b.alternate&&(b.flags|=2);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=Qg(c,a.mode,d),b.return=a,b;b=e(b,c);b.return=a;return b}function k(a,b,c,d){var f=c.type;if(f===ya)return m(a,b,c.props.children,d,c.key);if(null!==b&&(b.elementType===f||"object"===typeof f&&null!==f&&f.$$typeof===Ha&&Ng(f)===b.type))return d=e(b,c.props),d.ref=Lg(a,b,c),d.return=a,d;d=Rg(c.type,c.key,c.props,null,a.mode,d);d.ref=Lg(a,b,c);d.return=a;return d}function l(a,b,c,d){if(null===b||4!==b.tag||
|
|
234
|
-
b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==c.implementation)return b=Sg(c,a.mode,d),b.return=a,b;b=e(b,c.children||[]);b.return=a;return b}function m(a,b,c,d,f){if(null===b||7!==b.tag)return b=Tg(c,a.mode,d,f),b.return=a,b;b=e(b,c);b.return=a;return b}function q(a,b,c){if("string"===typeof b&&""!==b||"number"===typeof b)return b=Qg(""+b,a.mode,c),b.return=a,b;if("object"===typeof b&&null!==b){switch(b.$$typeof){case va:return c=Rg(b.type,b.key,b.props,null,a.mode,c),
|
|
235
|
-
c.ref=Lg(a,null,b),c.return=a,c;case wa:return b=Sg(b,a.mode,c),b.return=a,b;case Ha:var d=b._init;return q(a,d(b._payload),c)}if(eb(b)||Ka(b))return b=Tg(b,a.mode,c,null),b.return=a,b;Mg(a,b);}return null}function r(a,b,c,d){var e=null!==b?b.key:null;if("string"===typeof c&&""!==c||"number"===typeof c)return null!==e?null:h(a,b,""+c,d);if("object"===typeof c&&null!==c){switch(c.$$typeof){case va:return c.key===e?k(a,b,c,d):null;case wa:return c.key===e?l(a,b,c,d):null;case Ha:return e=c._init,r(a,
|
|
236
|
-
b,e(c._payload),d)}if(eb(c)||Ka(c))return null!==e?null:m(a,b,c,d,null);Mg(a,c);}return null}function y(a,b,c,d,e){if("string"===typeof d&&""!==d||"number"===typeof d)return a=a.get(c)||null,h(b,a,""+d,e);if("object"===typeof d&&null!==d){switch(d.$$typeof){case va:return a=a.get(null===d.key?c:d.key)||null,k(b,a,d,e);case wa:return a=a.get(null===d.key?c:d.key)||null,l(b,a,d,e);case Ha:var f=d._init;return y(a,b,c,f(d._payload),e)}if(eb(d)||Ka(d))return a=a.get(c)||null,m(b,a,d,e,null);Mg(b,d);}return null}
|
|
237
|
-
function n(e,g,h,k){for(var l=null,m=null,u=g,w=g=0,x=null;null!==u&&w<h.length;w++){u.index>w?(x=u,u=null):x=u.sibling;var n=r(e,u,h[w],k);if(null===n){null===u&&(u=x);break}a&&u&&null===n.alternate&&b(e,u);g=f(n,g,w);null===m?l=n:m.sibling=n;m=n;u=x;}if(w===h.length)return c(e,u),I&&tg(e,w),l;if(null===u){for(;w<h.length;w++)u=q(e,h[w],k),null!==u&&(g=f(u,g,w),null===m?l=u:m.sibling=u,m=u);I&&tg(e,w);return l}for(u=d(e,u);w<h.length;w++)x=y(u,e,w,h[w],k),null!==x&&(a&&null!==x.alternate&&u.delete(null===
|
|
238
|
-
x.key?w:x.key),g=f(x,g,w),null===m?l=x:m.sibling=x,m=x);a&&u.forEach(function(a){return b(e,a)});I&&tg(e,w);return l}function t(e,g,h,k){var l=Ka(h);if("function"!==typeof l)throw Error(p(150));h=l.call(h);if(null==h)throw Error(p(151));for(var u=l=null,m=g,w=g=0,x=null,n=h.next();null!==m&&!n.done;w++,n=h.next()){m.index>w?(x=m,m=null):x=m.sibling;var t=r(e,m,n.value,k);if(null===t){null===m&&(m=x);break}a&&m&&null===t.alternate&&b(e,m);g=f(t,g,w);null===u?l=t:u.sibling=t;u=t;m=x;}if(n.done)return c(e,
|
|
239
|
-
m),I&&tg(e,w),l;if(null===m){for(;!n.done;w++,n=h.next())n=q(e,n.value,k),null!==n&&(g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);I&&tg(e,w);return l}for(m=d(e,m);!n.done;w++,n=h.next())n=y(m,e,w,n.value,k),null!==n&&(a&&null!==n.alternate&&m.delete(null===n.key?w:n.key),g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);a&&m.forEach(function(a){return b(e,a)});I&&tg(e,w);return l}function J(a,d,f,h){"object"===typeof f&&null!==f&&f.type===ya&&null===f.key&&(f=f.props.children);if("object"===typeof f&&null!==f){switch(f.$$typeof){case va:a:{for(var k=
|
|
240
|
-
f.key,l=d;null!==l;){if(l.key===k){k=f.type;if(k===ya){if(7===l.tag){c(a,l.sibling);d=e(l,f.props.children);d.return=a;a=d;break a}}else if(l.elementType===k||"object"===typeof k&&null!==k&&k.$$typeof===Ha&&Ng(k)===l.type){c(a,l.sibling);d=e(l,f.props);d.ref=Lg(a,l,f);d.return=a;a=d;break a}c(a,l);break}else b(a,l);l=l.sibling;}f.type===ya?(d=Tg(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Rg(f.type,f.key,f.props,null,a.mode,h),h.ref=Lg(a,d,f),h.return=a,a=h);}return g(a);case wa:a:{for(l=f.key;null!==
|
|
241
|
-
d;){if(d.key===l)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else {c(a,d);break}else b(a,d);d=d.sibling;}d=Sg(f,a.mode,h);d.return=a;a=d;}return g(a);case Ha:return l=f._init,J(a,d,l(f._payload),h)}if(eb(f))return n(a,d,f,h);if(Ka(f))return t(a,d,f,h);Mg(a,f);}return "string"===typeof f&&""!==f||"number"===typeof f?(f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):
|
|
242
|
-
(c(a,d),d=Qg(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d)}return J}var Ug=Og(true),Vg=Og(false),Wg=Uf(null),Xg=null,Yg=null,Zg=null;function $g(){Zg=Yg=Xg=null;}function ah(a){var b=Wg.current;E(Wg);a._currentValue=b;}function bh(a,b,c){for(;null!==a;){var d=a.alternate;(a.childLanes&b)!==b?(a.childLanes|=b,null!==d&&(d.childLanes|=b)):null!==d&&(d.childLanes&b)!==b&&(d.childLanes|=b);if(a===c)break;a=a.return;}}
|
|
243
|
-
function ch(a,b){Xg=a;Zg=Yg=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(0!==(a.lanes&b)&&(dh=true),a.firstContext=null);}function eh(a){var b=a._currentValue;if(Zg!==a)if(a={context:a,memoizedValue:b,next:null},null===Yg){if(null===Xg)throw Error(p(308));Yg=a;Xg.dependencies={lanes:0,firstContext:a};}else Yg=Yg.next=a;return b}var fh=null;function gh(a){null===fh?fh=[a]:fh.push(a);}
|
|
244
|
-
function hh(a,b,c,d){var e=b.interleaved;null===e?(c.next=c,gh(b)):(c.next=e.next,e.next=c);b.interleaved=c;return ih(a,d)}function ih(a,b){a.lanes|=b;var c=a.alternate;null!==c&&(c.lanes|=b);c=a;for(a=a.return;null!==a;)a.childLanes|=b,c=a.alternate,null!==c&&(c.childLanes|=b),c=a,a=a.return;return 3===c.tag?c.stateNode:null}var jh=false;function kh(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null};}
|
|
245
|
-
function lh(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects});}function mh(a,b){return {eventTime:a,lane:b,tag:0,payload:null,callback:null,next:null}}
|
|
246
|
-
function nh(a,b,c){var d=a.updateQueue;if(null===d)return null;d=d.shared;if(0!==(K&2)){var e=d.pending;null===e?b.next=b:(b.next=e.next,e.next=b);d.pending=b;return ih(a,c)}e=d.interleaved;null===e?(b.next=b,gh(d)):(b.next=e.next,e.next=b);d.interleaved=b;return ih(a,c)}function oh(a,b,c){b=b.updateQueue;if(null!==b&&(b=b.shared,0!==(c&4194240))){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Cc(a,c);}}
|
|
247
|
-
function ph(a,b){var c=a.updateQueue,d=a.alternate;if(null!==d&&(d=d.updateQueue,c===d)){var e=null,f=null;c=c.firstBaseUpdate;if(null!==c){do{var g={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};null===f?e=f=g:f=f.next=g;c=c.next;}while(null!==c);null===f?e=f=b:f=f.next=b;}else e=f=b;c={baseState:d.baseState,firstBaseUpdate:e,lastBaseUpdate:f,shared:d.shared,effects:d.effects};a.updateQueue=c;return}a=c.lastBaseUpdate;null===a?c.firstBaseUpdate=b:a.next=
|
|
248
|
-
b;c.lastBaseUpdate=b;}
|
|
249
|
-
function qh(a,b,c,d){var e=a.updateQueue;jh=false;var f=e.firstBaseUpdate,g=e.lastBaseUpdate,h=e.shared.pending;if(null!==h){e.shared.pending=null;var k=h,l=k.next;k.next=null;null===g?f=l:g.next=l;g=k;var m=a.alternate;null!==m&&(m=m.updateQueue,h=m.lastBaseUpdate,h!==g&&(null===h?m.firstBaseUpdate=l:h.next=l,m.lastBaseUpdate=k));}if(null!==f){var q=e.baseState;g=0;m=l=k=null;h=f;do{var r=h.lane,y=h.eventTime;if((d&r)===r){null!==m&&(m=m.next={eventTime:y,lane:0,tag:h.tag,payload:h.payload,callback:h.callback,
|
|
250
|
-
next:null});a:{var n=a,t=h;r=b;y=c;switch(t.tag){case 1:n=t.payload;if("function"===typeof n){q=n.call(y,q,r);break a}q=n;break a;case 3:n.flags=n.flags&-65537|128;case 0:n=t.payload;r="function"===typeof n?n.call(y,q,r):n;if(null===r||void 0===r)break a;q=A({},q,r);break a;case 2:jh=true;}}null!==h.callback&&0!==h.lane&&(a.flags|=64,r=e.effects,null===r?e.effects=[h]:r.push(h));}else y={eventTime:y,lane:r,tag:h.tag,payload:h.payload,callback:h.callback,next:null},null===m?(l=m=y,k=q):m=m.next=y,g|=r;
|
|
251
|
-
h=h.next;if(null===h)if(h=e.shared.pending,null===h)break;else r=h,h=r.next,r.next=null,e.lastBaseUpdate=r,e.shared.pending=null;}while(1);null===m&&(k=q);e.baseState=k;e.firstBaseUpdate=l;e.lastBaseUpdate=m;b=e.shared.interleaved;if(null!==b){e=b;do g|=e.lane,e=e.next;while(e!==b)}else null===f&&(e.shared.lanes=0);rh|=g;a.lanes=g;a.memoizedState=q;}}
|
|
252
|
-
function sh(a,b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;b<a.length;b++){var d=a[b],e=d.callback;if(null!==e){d.callback=null;d=c;if("function"!==typeof e)throw Error(p(191,e));e.call(d);}}}var th={},uh=Uf(th),vh=Uf(th),wh=Uf(th);function xh(a){if(a===th)throw Error(p(174));return a}
|
|
253
|
-
function yh(a,b){G(wh,b);G(vh,a);G(uh,th);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:lb(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=lb(b,a);}E(uh);G(uh,b);}function zh(){E(uh);E(vh);E(wh);}function Ah(a){xh(wh.current);var b=xh(uh.current);var c=lb(b,a.type);b!==c&&(G(vh,a),G(uh,c));}function Bh(a){vh.current===a&&(E(uh),E(vh));}var L=Uf(0);
|
|
254
|
-
function Ch(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||"$?"===c.data||"$!"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&128))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return;}b.sibling.return=b.return;b=b.sibling;}return null}var Dh=[];
|
|
255
|
-
function Eh(){for(var a=0;a<Dh.length;a++)Dh[a]._workInProgressVersionPrimary=null;Dh.length=0;}var Fh=ua.ReactCurrentDispatcher,Gh=ua.ReactCurrentBatchConfig,Hh=0,M=null,N=null,O=null,Ih=false,Jh=false,Kh=0,Lh=0;function P(){throw Error(p(321));}function Mh(a,b){if(null===b)return false;for(var c=0;c<b.length&&c<a.length;c++)if(!He(a[c],b[c]))return false;return true}
|
|
256
|
-
function Nh(a,b,c,d,e,f){Hh=f;M=b;b.memoizedState=null;b.updateQueue=null;b.lanes=0;Fh.current=null===a||null===a.memoizedState?Oh:Ph;a=c(d,e);if(Jh){f=0;do{Jh=false;Kh=0;if(25<=f)throw Error(p(301));f+=1;O=N=null;b.updateQueue=null;Fh.current=Qh;a=c(d,e);}while(Jh)}Fh.current=Rh;b=null!==N&&null!==N.next;Hh=0;O=N=M=null;Ih=false;if(b)throw Error(p(300));return a}function Sh(){var a=0!==Kh;Kh=0;return a}
|
|
257
|
-
function Th(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===O?M.memoizedState=O=a:O=O.next=a;return O}function Uh(){if(null===N){var a=M.alternate;a=null!==a?a.memoizedState:null;}else a=N.next;var b=null===O?M.memoizedState:O.next;if(null!==b)O=b,N=a;else {if(null===a)throw Error(p(310));N=a;a={memoizedState:N.memoizedState,baseState:N.baseState,baseQueue:N.baseQueue,queue:N.queue,next:null};null===O?M.memoizedState=O=a:O=O.next=a;}return O}
|
|
258
|
-
function Vh(a,b){return "function"===typeof b?b(a):b}
|
|
259
|
-
function Wh(a){var b=Uh(),c=b.queue;if(null===c)throw Error(p(311));c.lastRenderedReducer=a;var d=N,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g;}d.baseQueue=e=f;c.pending=null;}if(null!==e){f=e.next;d=d.baseState;var h=g=null,k=null,l=f;do{var m=l.lane;if((Hh&m)===m)null!==k&&(k=k.next={lane:0,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),d=l.hasEagerState?l.eagerState:a(d,l.action);else {var q={lane:m,action:l.action,hasEagerState:l.hasEagerState,
|
|
260
|
-
eagerState:l.eagerState,next:null};null===k?(h=k=q,g=d):k=k.next=q;M.lanes|=m;rh|=m;}l=l.next;}while(null!==l&&l!==f);null===k?g=d:k.next=h;He(d,b.memoizedState)||(dh=true);b.memoizedState=d;b.baseState=g;b.baseQueue=k;c.lastRenderedState=d;}a=c.interleaved;if(null!==a){e=a;do f=e.lane,M.lanes|=f,rh|=f,e=e.next;while(e!==a)}else null===e&&(c.lanes=0);return [b.memoizedState,c.dispatch]}
|
|
261
|
-
function Xh(a){var b=Uh(),c=b.queue;if(null===c)throw Error(p(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);He(f,b.memoizedState)||(dh=true);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f;}return [f,d]}function Yh(){}
|
|
262
|
-
function Zh(a,b){var c=M,d=Uh(),e=b(),f=!He(d.memoizedState,e);f&&(d.memoizedState=e,dh=true);d=d.queue;$h(ai.bind(null,c,d,a),[a]);if(d.getSnapshot!==b||f||null!==O&&O.memoizedState.tag&1){c.flags|=2048;bi(9,ci.bind(null,c,d,e,b),void 0,null);if(null===Q)throw Error(p(349));0!==(Hh&30)||di(c,b,e);}return e}function di(a,b,c){a.flags|=16384;a={getSnapshot:b,value:c};b=M.updateQueue;null===b?(b={lastEffect:null,stores:null},M.updateQueue=b,b.stores=[a]):(c=b.stores,null===c?b.stores=[a]:c.push(a));}
|
|
263
|
-
function ci(a,b,c,d){b.value=c;b.getSnapshot=d;ei(b)&&fi(a);}function ai(a,b,c){return c(function(){ei(b)&&fi(a);})}function ei(a){var b=a.getSnapshot;a=a.value;try{var c=b();return !He(a,c)}catch(d){return true}}function fi(a){var b=ih(a,1);null!==b&&gi(b,a,1,-1);}
|
|
264
|
-
function hi(a){var b=Th();"function"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Vh,lastRenderedState:a};b.queue=a;a=a.dispatch=ii.bind(null,M,a);return [b.memoizedState,a]}
|
|
265
|
-
function bi(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};b=M.updateQueue;null===b?(b={lastEffect:null,stores:null},M.updateQueue=b,b.lastEffect=a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a));return a}function ji(){return Uh().memoizedState}function ki(a,b,c,d){var e=Th();M.flags|=a;e.memoizedState=bi(1|b,c,void 0,void 0===d?null:d);}
|
|
266
|
-
function li(a,b,c,d){var e=Uh();d=void 0===d?null:d;var f=void 0;if(null!==N){var g=N.memoizedState;f=g.destroy;if(null!==d&&Mh(d,g.deps)){e.memoizedState=bi(b,c,f,d);return}}M.flags|=a;e.memoizedState=bi(1|b,c,f,d);}function mi(a,b){return ki(8390656,8,a,b)}function $h(a,b){return li(2048,8,a,b)}function ni(a,b){return li(4,2,a,b)}function oi(a,b){return li(4,4,a,b)}
|
|
267
|
-
function pi(a,b){if("function"===typeof b)return a=a(),b(a),function(){b(null);};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null;}}function qi(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return li(4,4,pi.bind(null,b,a),c)}function ri(){}function si(a,b){var c=Uh();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Mh(b,d[1]))return d[0];c.memoizedState=[a,b];return a}
|
|
268
|
-
function ti(a,b){var c=Uh();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Mh(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a}function ui(a,b,c){if(0===(Hh&21))return a.baseState&&(a.baseState=false,dh=true),a.memoizedState=c;He(c,b)||(c=yc(),M.lanes|=c,rh|=c,a.baseState=true);return b}function vi(a,b){var c=C;C=0!==c&&4>c?c:4;a(true);var d=Gh.transition;Gh.transition={};try{a(!1),b();}finally{C=c,Gh.transition=d;}}function wi(){return Uh().memoizedState}
|
|
269
|
-
function xi(a,b,c){var d=yi(a);c={lane:d,action:c,hasEagerState:false,eagerState:null,next:null};if(zi(a))Ai(b,c);else if(c=hh(a,b,c,d),null!==c){var e=R();gi(c,a,d,e);Bi(c,b,d);}}
|
|
270
|
-
function ii(a,b,c){var d=yi(a),e={lane:d,action:c,hasEagerState:false,eagerState:null,next:null};if(zi(a))Ai(b,e);else {var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if(He(h,g)){var k=b.interleaved;null===k?(e.next=e,gh(b)):(e.next=k.next,k.next=e);b.interleaved=e;return}}catch(l){}finally{}c=hh(a,b,e,d);null!==c&&(e=R(),gi(c,a,d,e),Bi(c,b,d));}}
|
|
271
|
-
function zi(a){var b=a.alternate;return a===M||null!==b&&b===M}function Ai(a,b){Jh=Ih=true;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b;}function Bi(a,b,c){if(0!==(c&4194240)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Cc(a,c);}}
|
|
272
|
-
var Rh={readContext:eh,useCallback:P,useContext:P,useEffect:P,useImperativeHandle:P,useInsertionEffect:P,useLayoutEffect:P,useMemo:P,useReducer:P,useRef:P,useState:P,useDebugValue:P,useDeferredValue:P,useTransition:P,useMutableSource:P,useSyncExternalStore:P,useId:P,unstable_isNewReconciler:false},Oh={readContext:eh,useCallback:function(a,b){Th().memoizedState=[a,void 0===b?null:b];return a},useContext:eh,useEffect:mi,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return ki(4194308,
|
|
273
|
-
4,pi.bind(null,b,a),c)},useLayoutEffect:function(a,b){return ki(4194308,4,a,b)},useInsertionEffect:function(a,b){return ki(4,2,a,b)},useMemo:function(a,b){var c=Th();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=Th();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=xi.bind(null,M,a);return [d.memoizedState,a]},useRef:function(a){var b=
|
|
274
|
-
Th();a={current:a};return b.memoizedState=a},useState:hi,useDebugValue:ri,useDeferredValue:function(a){return Th().memoizedState=a},useTransition:function(){var a=hi(false),b=a[0];a=vi.bind(null,a[1]);Th().memoizedState=a;return [b,a]},useMutableSource:function(){},useSyncExternalStore:function(a,b,c){var d=M,e=Th();if(I){if(void 0===c)throw Error(p(407));c=c();}else {c=b();if(null===Q)throw Error(p(349));0!==(Hh&30)||di(d,b,c);}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;mi(ai.bind(null,d,
|
|
275
|
-
f,a),[a]);d.flags|=2048;bi(9,ci.bind(null,d,f,c,b),void 0,null);return c},useId:function(){var a=Th(),b=Q.identifierPrefix;if(I){var c=sg;var d=rg;c=(d&~(1<<32-oc(d)-1)).toString(32)+c;b=":"+b+"R"+c;c=Kh++;0<c&&(b+="H"+c.toString(32));b+=":";}else c=Lh++,b=":"+b+"r"+c.toString(32)+":";return a.memoizedState=b},unstable_isNewReconciler:false},Ph={readContext:eh,useCallback:si,useContext:eh,useEffect:$h,useImperativeHandle:qi,useInsertionEffect:ni,useLayoutEffect:oi,useMemo:ti,useReducer:Wh,useRef:ji,useState:function(){return Wh(Vh)},
|
|
276
|
-
useDebugValue:ri,useDeferredValue:function(a){var b=Uh();return ui(b,N.memoizedState,a)},useTransition:function(){var a=Wh(Vh)[0],b=Uh().memoizedState;return [a,b]},useMutableSource:Yh,useSyncExternalStore:Zh,useId:wi,unstable_isNewReconciler:false},Qh={readContext:eh,useCallback:si,useContext:eh,useEffect:$h,useImperativeHandle:qi,useInsertionEffect:ni,useLayoutEffect:oi,useMemo:ti,useReducer:Xh,useRef:ji,useState:function(){return Xh(Vh)},useDebugValue:ri,useDeferredValue:function(a){var b=Uh();return null===
|
|
277
|
-
N?b.memoizedState=a:ui(b,N.memoizedState,a)},useTransition:function(){var a=Xh(Vh)[0],b=Uh().memoizedState;return [a,b]},useMutableSource:Yh,useSyncExternalStore:Zh,useId:wi,unstable_isNewReconciler:false};function Ci(a,b){if(a&&a.defaultProps){b=A({},b);a=a.defaultProps;for(var c in a) void 0===b[c]&&(b[c]=a[c]);return b}return b}function Di(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:A({},b,c);a.memoizedState=c;0===a.lanes&&(a.updateQueue.baseState=c);}
|
|
278
|
-
var Ei={isMounted:function(a){return (a=a._reactInternals)?Vb(a)===a:false},enqueueSetState:function(a,b,c){a=a._reactInternals;var d=R(),e=yi(a),f=mh(d,e);f.payload=b;void 0!==c&&null!==c&&(f.callback=c);b=nh(a,f,e);null!==b&&(gi(b,a,e,d),oh(b,a,e));},enqueueReplaceState:function(a,b,c){a=a._reactInternals;var d=R(),e=yi(a),f=mh(d,e);f.tag=1;f.payload=b;void 0!==c&&null!==c&&(f.callback=c);b=nh(a,f,e);null!==b&&(gi(b,a,e,d),oh(b,a,e));},enqueueForceUpdate:function(a,b){a=a._reactInternals;var c=R(),d=
|
|
279
|
-
yi(a),e=mh(c,d);e.tag=2;void 0!==b&&null!==b&&(e.callback=b);b=nh(a,e,d);null!==b&&(gi(b,a,d,c),oh(b,a,d));}};function Fi(a,b,c,d,e,f,g){a=a.stateNode;return "function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!Ie(c,d)||!Ie(e,f):true}
|
|
280
|
-
function Gi(a,b,c){var d=false,e=Vf;var f=b.contextType;"object"===typeof f&&null!==f?f=eh(f):(e=Zf(b)?Xf:H.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?Yf(a,e):Vf);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=Ei;a.stateNode=b;b._reactInternals=a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b}
|
|
281
|
-
function Hi(a,b,c,d){a=b.state;"function"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);"function"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&Ei.enqueueReplaceState(b,b.state,null);}
|
|
282
|
-
function Ii(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs={};kh(a);var f=b.contextType;"object"===typeof f&&null!==f?e.context=eh(f):(f=Zf(b)?Xf:H.current,e.context=Yf(a,f));e.state=a.memoizedState;f=b.getDerivedStateFromProps;"function"===typeof f&&(Di(a,b,f,c),e.state=a.memoizedState);"function"===typeof b.getDerivedStateFromProps||"function"===typeof e.getSnapshotBeforeUpdate||"function"!==typeof e.UNSAFE_componentWillMount&&"function"!==typeof e.componentWillMount||(b=e.state,
|
|
283
|
-
"function"===typeof e.componentWillMount&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&Ei.enqueueReplaceState(e,e.state,null),qh(a,c,e,d),e.state=a.memoizedState);"function"===typeof e.componentDidMount&&(a.flags|=4194308);}function Ji(a,b){try{var c="",d=b;do c+=Pa(d),d=d.return;while(d);var e=c;}catch(f){e="\nError generating stack: "+f.message+"\n"+f.stack;}return {value:a,source:b,stack:e,digest:null}}
|
|
284
|
-
function Ki(a,b,c){return {value:a,source:null,stack:null!=c?c:null,digest:null!=b?b:null}}function Li(a,b){try{console.error(b.value);}catch(c){setTimeout(function(){throw c;});}}var Mi="function"===typeof WeakMap?WeakMap:Map;function Ni(a,b,c){c=mh(-1,c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){Oi||(Oi=true,Pi=d);Li(a,b);};return c}
|
|
285
|
-
function Qi(a,b,c){c=mh(-1,c);c.tag=3;var d=a.type.getDerivedStateFromError;if("function"===typeof d){var e=b.value;c.payload=function(){return d(e)};c.callback=function(){Li(a,b);};}var f=a.stateNode;null!==f&&"function"===typeof f.componentDidCatch&&(c.callback=function(){Li(a,b);"function"!==typeof d&&(null===Ri?Ri=new Set([this]):Ri.add(this));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:""});});return c}
|
|
286
|
-
function Si(a,b,c){var d=a.pingCache;if(null===d){d=a.pingCache=new Mi;var e=new Set;d.set(b,e);}else e=d.get(b),void 0===e&&(e=new Set,d.set(b,e));e.has(c)||(e.add(c),a=Ti.bind(null,a,b,c),b.then(a,a));}function Ui(a){do{var b;if(b=13===a.tag)b=a.memoizedState,b=null!==b?null!==b.dehydrated?true:false:true;if(b)return a;a=a.return;}while(null!==a);return null}
|
|
287
|
-
function Vi(a,b,c,d,e){if(0===(a.mode&1))return a===b?a.flags|=65536:(a.flags|=128,c.flags|=131072,c.flags&=-52805,1===c.tag&&(null===c.alternate?c.tag=17:(b=mh(-1,1),b.tag=2,nh(c,b,1))),c.lanes|=1),a;a.flags|=65536;a.lanes=e;return a}var Wi=ua.ReactCurrentOwner,dh=false;function Xi(a,b,c,d){b.child=null===a?Vg(b,null,c,d):Ug(b,a.child,c,d);}
|
|
288
|
-
function Yi(a,b,c,d,e){c=c.render;var f=b.ref;ch(b,e);d=Nh(a,b,c,d,f,e);c=Sh();if(null!==a&&!dh)return b.updateQueue=a.updateQueue,b.flags&=-2053,a.lanes&=~e,Zi(a,b,e);I&&c&&vg(b);b.flags|=1;Xi(a,b,d,e);return b.child}
|
|
289
|
-
function $i(a,b,c,d,e){if(null===a){var f=c.type;if("function"===typeof f&&!aj(f)&&void 0===f.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=f,bj(a,b,f,d,e);a=Rg(c.type,null,d,b,b.mode,e);a.ref=b.ref;a.return=b;return b.child=a}f=a.child;if(0===(a.lanes&e)){var g=f.memoizedProps;c=c.compare;c=null!==c?c:Ie;if(c(g,d)&&a.ref===b.ref)return Zi(a,b,e)}b.flags|=1;a=Pg(f,d);a.ref=b.ref;a.return=b;return b.child=a}
|
|
290
|
-
function bj(a,b,c,d,e){if(null!==a){var f=a.memoizedProps;if(Ie(f,d)&&a.ref===b.ref)if(dh=false,b.pendingProps=d=f,0!==(a.lanes&e))0!==(a.flags&131072)&&(dh=true);else return b.lanes=a.lanes,Zi(a,b,e)}return cj(a,b,c,d,e)}
|
|
291
|
-
function dj(a,b,c){var d=b.pendingProps,e=d.children,f=null!==a?a.memoizedState:null;if("hidden"===d.mode)if(0===(b.mode&1))b.memoizedState={baseLanes:0,cachePool:null,transitions:null},G(ej,fj),fj|=c;else {if(0===(c&1073741824))return a=null!==f?f.baseLanes|c:c,b.lanes=b.childLanes=1073741824,b.memoizedState={baseLanes:a,cachePool:null,transitions:null},b.updateQueue=null,G(ej,fj),fj|=a,null;b.memoizedState={baseLanes:0,cachePool:null,transitions:null};d=null!==f?f.baseLanes:c;G(ej,fj);fj|=d;}else null!==
|
|
292
|
-
f?(d=f.baseLanes|c,b.memoizedState=null):d=c,G(ej,fj),fj|=d;Xi(a,b,e,c);return b.child}function gj(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.flags|=512,b.flags|=2097152;}function cj(a,b,c,d,e){var f=Zf(c)?Xf:H.current;f=Yf(b,f);ch(b,e);c=Nh(a,b,c,d,f,e);d=Sh();if(null!==a&&!dh)return b.updateQueue=a.updateQueue,b.flags&=-2053,a.lanes&=~e,Zi(a,b,e);I&&d&&vg(b);b.flags|=1;Xi(a,b,c,e);return b.child}
|
|
293
|
-
function hj(a,b,c,d,e){if(Zf(c)){var f=true;cg(b);}else f=false;ch(b,e);if(null===b.stateNode)ij(a,b),Gi(b,c,d),Ii(b,c,d,e),d=true;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var k=g.context,l=c.contextType;"object"===typeof l&&null!==l?l=eh(l):(l=Zf(c)?Xf:H.current,l=Yf(b,l));var m=c.getDerivedStateFromProps,q="function"===typeof m||"function"===typeof g.getSnapshotBeforeUpdate;q||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||
|
|
294
|
-
(h!==d||k!==l)&&Hi(b,g,d,l);jh=false;var r=b.memoizedState;g.state=r;qh(b,d,g,e);k=b.memoizedState;h!==d||r!==k||Wf.current||jh?("function"===typeof m&&(Di(b,c,m,d),k=b.memoizedState),(h=jh||Fi(b,c,h,d,r,k,l))?(q||"function"!==typeof g.UNSAFE_componentWillMount&&"function"!==typeof g.componentWillMount||("function"===typeof g.componentWillMount&&g.componentWillMount(),"function"===typeof g.UNSAFE_componentWillMount&&g.UNSAFE_componentWillMount()),"function"===typeof g.componentDidMount&&(b.flags|=4194308)):
|
|
295
|
-
("function"===typeof g.componentDidMount&&(b.flags|=4194308),b.memoizedProps=d,b.memoizedState=k),g.props=d,g.state=k,g.context=l,d=h):("function"===typeof g.componentDidMount&&(b.flags|=4194308),d=false);}else {g=b.stateNode;lh(a,b);h=b.memoizedProps;l=b.type===b.elementType?h:Ci(b.type,h);g.props=l;q=b.pendingProps;r=g.context;k=c.contextType;"object"===typeof k&&null!==k?k=eh(k):(k=Zf(c)?Xf:H.current,k=Yf(b,k));var y=c.getDerivedStateFromProps;(m="function"===typeof y||"function"===typeof g.getSnapshotBeforeUpdate)||
|
|
296
|
-
"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==q||r!==k)&&Hi(b,g,d,k);jh=false;r=b.memoizedState;g.state=r;qh(b,d,g,e);var n=b.memoizedState;h!==q||r!==n||Wf.current||jh?("function"===typeof y&&(Di(b,c,y,d),n=b.memoizedState),(l=jh||Fi(b,c,l,d,r,n,k)||false)?(m||"function"!==typeof g.UNSAFE_componentWillUpdate&&"function"!==typeof g.componentWillUpdate||("function"===typeof g.componentWillUpdate&&g.componentWillUpdate(d,n,k),"function"===typeof g.UNSAFE_componentWillUpdate&&
|
|
297
|
-
g.UNSAFE_componentWillUpdate(d,n,k)),"function"===typeof g.componentDidUpdate&&(b.flags|=4),"function"===typeof g.getSnapshotBeforeUpdate&&(b.flags|=1024)):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&r===a.memoizedState||(b.flags|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&r===a.memoizedState||(b.flags|=1024),b.memoizedProps=d,b.memoizedState=n),g.props=d,g.state=n,g.context=k,d=l):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&r===
|
|
298
|
-
a.memoizedState||(b.flags|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&r===a.memoizedState||(b.flags|=1024),d=false);}return jj(a,b,c,d,f,e)}
|
|
299
|
-
function jj(a,b,c,d,e,f){gj(a,b);var g=0!==(b.flags&128);if(!d&&!g)return e&&dg(b,c,false),Zi(a,b,f);d=b.stateNode;Wi.current=b;var h=g&&"function"!==typeof c.getDerivedStateFromError?null:d.render();b.flags|=1;null!==a&&g?(b.child=Ug(b,a.child,null,f),b.child=Ug(b,null,h,f)):Xi(a,b,h,f);b.memoizedState=d.state;e&&dg(b,c,true);return b.child}function kj(a){var b=a.stateNode;b.pendingContext?ag(a,b.pendingContext,b.pendingContext!==b.context):b.context&&ag(a,b.context,false);yh(a,b.containerInfo);}
|
|
300
|
-
function lj(a,b,c,d,e){Ig();Jg(e);b.flags|=256;Xi(a,b,c,d);return b.child}var mj={dehydrated:null,treeContext:null,retryLane:0};function nj(a){return {baseLanes:a,cachePool:null,transitions:null}}
|
|
301
|
-
function oj(a,b,c){var d=b.pendingProps,e=L.current,f=false,g=0!==(b.flags&128),h;(h=g)||(h=null!==a&&null===a.memoizedState?false:0!==(e&2));if(h)f=true,b.flags&=-129;else if(null===a||null!==a.memoizedState)e|=1;G(L,e&1);if(null===a){Eg(b);a=b.memoizedState;if(null!==a&&(a=a.dehydrated,null!==a))return 0===(b.mode&1)?b.lanes=1:"$!"===a.data?b.lanes=8:b.lanes=1073741824,null;g=d.children;a=d.fallback;return f?(d=b.mode,f=b.child,g={mode:"hidden",children:g},0===(d&1)&&null!==f?(f.childLanes=0,f.pendingProps=
|
|
302
|
-
g):f=pj(g,d,0,null),a=Tg(a,d,c,null),f.return=b,a.return=b,f.sibling=a,b.child=f,b.child.memoizedState=nj(c),b.memoizedState=mj,a):qj(b,g)}e=a.memoizedState;if(null!==e&&(h=e.dehydrated,null!==h))return rj(a,b,g,d,h,e,c);if(f){f=d.fallback;g=b.mode;e=a.child;h=e.sibling;var k={mode:"hidden",children:d.children};0===(g&1)&&b.child!==e?(d=b.child,d.childLanes=0,d.pendingProps=k,b.deletions=null):(d=Pg(e,k),d.subtreeFlags=e.subtreeFlags&14680064);null!==h?f=Pg(h,f):(f=Tg(f,g,c,null),f.flags|=2);f.return=
|
|
303
|
-
b;d.return=b;d.sibling=f;b.child=d;d=f;f=b.child;g=a.child.memoizedState;g=null===g?nj(c):{baseLanes:g.baseLanes|c,cachePool:null,transitions:g.transitions};f.memoizedState=g;f.childLanes=a.childLanes&~c;b.memoizedState=mj;return d}f=a.child;a=f.sibling;d=Pg(f,{mode:"visible",children:d.children});0===(b.mode&1)&&(d.lanes=c);d.return=b;d.sibling=null;null!==a&&(c=b.deletions,null===c?(b.deletions=[a],b.flags|=16):c.push(a));b.child=d;b.memoizedState=null;return d}
|
|
304
|
-
function qj(a,b){b=pj({mode:"visible",children:b},a.mode,0,null);b.return=a;return a.child=b}function sj(a,b,c,d){null!==d&&Jg(d);Ug(b,a.child,null,c);a=qj(b,b.pendingProps.children);a.flags|=2;b.memoizedState=null;return a}
|
|
305
|
-
function rj(a,b,c,d,e,f,g){if(c){if(b.flags&256)return b.flags&=-257,d=Ki(Error(p(422))),sj(a,b,g,d);if(null!==b.memoizedState)return b.child=a.child,b.flags|=128,null;f=d.fallback;e=b.mode;d=pj({mode:"visible",children:d.children},e,0,null);f=Tg(f,e,g,null);f.flags|=2;d.return=b;f.return=b;d.sibling=f;b.child=d;0!==(b.mode&1)&&Ug(b,a.child,null,g);b.child.memoizedState=nj(g);b.memoizedState=mj;return f}if(0===(b.mode&1))return sj(a,b,g,null);if("$!"===e.data){d=e.nextSibling&&e.nextSibling.dataset;
|
|
306
|
-
if(d)var h=d.dgst;d=h;f=Error(p(419));d=Ki(f,d,void 0);return sj(a,b,g,d)}h=0!==(g&a.childLanes);if(dh||h){d=Q;if(null!==d){switch(g&-g){case 4:e=2;break;case 16:e=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:e=32;break;case 536870912:e=268435456;break;default:e=0;}e=0!==(e&(d.suspendedLanes|g))?0:e;
|
|
307
|
-
0!==e&&e!==f.retryLane&&(f.retryLane=e,ih(a,e),gi(d,a,e,-1));}tj();d=Ki(Error(p(421)));return sj(a,b,g,d)}if("$?"===e.data)return b.flags|=128,b.child=a.child,b=uj.bind(null,a),e._reactRetry=b,null;a=f.treeContext;yg=Lf(e.nextSibling);xg=b;I=true;zg=null;null!==a&&(og[pg++]=rg,og[pg++]=sg,og[pg++]=qg,rg=a.id,sg=a.overflow,qg=b);b=qj(b,d.children);b.flags|=4096;return b}function vj(a,b,c){a.lanes|=b;var d=a.alternate;null!==d&&(d.lanes|=b);bh(a.return,b,c);}
|
|
308
|
-
function wj(a,b,c,d,e){var f=a.memoizedState;null===f?a.memoizedState={isBackwards:b,rendering:null,renderingStartTime:0,last:d,tail:c,tailMode:e}:(f.isBackwards=b,f.rendering=null,f.renderingStartTime=0,f.last=d,f.tail=c,f.tailMode=e);}
|
|
309
|
-
function xj(a,b,c){var d=b.pendingProps,e=d.revealOrder,f=d.tail;Xi(a,b,d.children,c);d=L.current;if(0!==(d&2))d=d&1|2,b.flags|=128;else {if(null!==a&&0!==(a.flags&128))a:for(a=b.child;null!==a;){if(13===a.tag)null!==a.memoizedState&&vj(a,c,b);else if(19===a.tag)vj(a,c,b);else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===b)break a;for(;null===a.sibling;){if(null===a.return||a.return===b)break a;a=a.return;}a.sibling.return=a.return;a=a.sibling;}d&=1;}G(L,d);if(0===(b.mode&1))b.memoizedState=
|
|
310
|
-
null;else switch(e){case "forwards":c=b.child;for(e=null;null!==c;)a=c.alternate,null!==a&&null===Ch(a)&&(e=c),c=c.sibling;c=e;null===c?(e=b.child,b.child=null):(e=c.sibling,c.sibling=null);wj(b,false,e,c,f);break;case "backwards":c=null;e=b.child;for(b.child=null;null!==e;){a=e.alternate;if(null!==a&&null===Ch(a)){b.child=e;break}a=e.sibling;e.sibling=c;c=e;e=a;}wj(b,true,c,null,f);break;case "together":wj(b,false,null,null,void 0);break;default:b.memoizedState=null;}return b.child}
|
|
311
|
-
function ij(a,b){0===(b.mode&1)&&null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);}function Zi(a,b,c){null!==a&&(b.dependencies=a.dependencies);rh|=b.lanes;if(0===(c&b.childLanes))return null;if(null!==a&&b.child!==a.child)throw Error(p(153));if(null!==b.child){a=b.child;c=Pg(a,a.pendingProps);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=Pg(a,a.pendingProps),c.return=b;c.sibling=null;}return b.child}
|
|
312
|
-
function yj(a,b,c){switch(b.tag){case 3:kj(b);Ig();break;case 5:Ah(b);break;case 1:Zf(b.type)&&cg(b);break;case 4:yh(b,b.stateNode.containerInfo);break;case 10:var d=b.type._context,e=b.memoizedProps.value;G(Wg,d._currentValue);d._currentValue=e;break;case 13:d=b.memoizedState;if(null!==d){if(null!==d.dehydrated)return G(L,L.current&1),b.flags|=128,null;if(0!==(c&b.child.childLanes))return oj(a,b,c);G(L,L.current&1);a=Zi(a,b,c);return null!==a?a.sibling:null}G(L,L.current&1);break;case 19:d=0!==(c&
|
|
313
|
-
b.childLanes);if(0!==(a.flags&128)){if(d)return xj(a,b,c);b.flags|=128;}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null,e.lastEffect=null);G(L,L.current);if(d)break;else return null;case 22:case 23:return b.lanes=0,dj(a,b,c)}return Zi(a,b,c)}var zj,Aj,Bj,Cj;
|
|
314
|
-
zj=function(a,b){for(var c=b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return;}c.sibling.return=c.return;c=c.sibling;}};Aj=function(){};
|
|
315
|
-
Bj=function(a,b,c,d){var e=a.memoizedProps;if(e!==d){a=b.stateNode;xh(uh.current);var f=null;switch(c){case "input":e=Ya(a,e);d=Ya(a,d);f=[];break;case "select":e=A({},e,{value:void 0});d=A({},d,{value:void 0});f=[];break;case "textarea":e=gb(a,e);d=gb(a,d);f=[];break;default:"function"!==typeof e.onClick&&"function"===typeof d.onClick&&(a.onclick=Bf);}ub(c,d);var g;c=null;for(l in e)if(!d.hasOwnProperty(l)&&e.hasOwnProperty(l)&&null!=e[l])if("style"===l){var h=e[l];for(g in h)h.hasOwnProperty(g)&&
|
|
316
|
-
(c||(c={}),c[g]="");}else "dangerouslySetInnerHTML"!==l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(ea.hasOwnProperty(l)?f||(f=[]):(f=f||[]).push(l,null));for(l in d){var k=d[l];h=null!=e?e[l]:void 0;if(d.hasOwnProperty(l)&&k!==h&&(null!=k||null!=h))if("style"===l)if(h){for(g in h)!h.hasOwnProperty(g)||k&&k.hasOwnProperty(g)||(c||(c={}),c[g]="");for(g in k)k.hasOwnProperty(g)&&h[g]!==k[g]&&(c||(c={}),c[g]=k[g]);}else c||(f||(f=[]),f.push(l,
|
|
317
|
-
c)),c=k;else "dangerouslySetInnerHTML"===l?(k=k?k.__html:void 0,h=h?h.__html:void 0,null!=k&&h!==k&&(f=f||[]).push(l,k)):"children"===l?"string"!==typeof k&&"number"!==typeof k||(f=f||[]).push(l,""+k):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(ea.hasOwnProperty(l)?(null!=k&&"onScroll"===l&&D("scroll",a),f||h===k||(f=[])):(f=f||[]).push(l,k));}c&&(f=f||[]).push("style",c);var l=f;if(b.updateQueue=l)b.flags|=4;}};Cj=function(a,b,c,d){c!==d&&(b.flags|=4);};
|
|
318
|
-
function Dj(a,b){if(!I)switch(a.tailMode){case "hidden":b=a.tail;for(var c=null;null!==b;)null!==b.alternate&&(c=b),b=b.sibling;null===c?a.tail=null:c.sibling=null;break;case "collapsed":c=a.tail;for(var d=null;null!==c;)null!==c.alternate&&(d=c),c=c.sibling;null===d?b||null===a.tail?a.tail=null:a.tail.sibling=null:d.sibling=null;}}
|
|
319
|
-
function S(a){var b=null!==a.alternate&&a.alternate.child===a.child,c=0,d=0;if(b)for(var e=a.child;null!==e;)c|=e.lanes|e.childLanes,d|=e.subtreeFlags&14680064,d|=e.flags&14680064,e.return=a,e=e.sibling;else for(e=a.child;null!==e;)c|=e.lanes|e.childLanes,d|=e.subtreeFlags,d|=e.flags,e.return=a,e=e.sibling;a.subtreeFlags|=d;a.childLanes=c;return b}
|
|
320
|
-
function Ej(a,b,c){var d=b.pendingProps;wg(b);switch(b.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return S(b),null;case 1:return Zf(b.type)&&$f(),S(b),null;case 3:d=b.stateNode;zh();E(Wf);E(H);Eh();d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null);if(null===a||null===a.child)Gg(b)?b.flags|=4:null===a||a.memoizedState.isDehydrated&&0===(b.flags&256)||(b.flags|=1024,null!==zg&&(Fj(zg),zg=null));Aj(a,b);S(b);return null;case 5:Bh(b);var e=xh(wh.current);
|
|
321
|
-
c=b.type;if(null!==a&&null!=b.stateNode)Bj(a,b,c,d,e),a.ref!==b.ref&&(b.flags|=512,b.flags|=2097152);else {if(!d){if(null===b.stateNode)throw Error(p(166));S(b);return null}a=xh(uh.current);if(Gg(b)){d=b.stateNode;c=b.type;var f=b.memoizedProps;d[Of]=b;d[Pf]=f;a=0!==(b.mode&1);switch(c){case "dialog":D("cancel",d);D("close",d);break;case "iframe":case "object":case "embed":D("load",d);break;case "video":case "audio":for(e=0;e<lf.length;e++)D(lf[e],d);break;case "source":D("error",d);break;case "img":case "image":case "link":D("error",
|
|
322
|
-
d);D("load",d);break;case "details":D("toggle",d);break;case "input":Za(d,f);D("invalid",d);break;case "select":d._wrapperState={wasMultiple:!!f.multiple};D("invalid",d);break;case "textarea":hb(d,f),D("invalid",d);}ub(c,f);e=null;for(var g in f)if(f.hasOwnProperty(g)){var h=f[g];"children"===g?"string"===typeof h?d.textContent!==h&&(true!==f.suppressHydrationWarning&&Af(d.textContent,h,a),e=["children",h]):"number"===typeof h&&d.textContent!==""+h&&(true!==f.suppressHydrationWarning&&Af(d.textContent,
|
|
323
|
-
h,a),e=["children",""+h]):ea.hasOwnProperty(g)&&null!=h&&"onScroll"===g&&D("scroll",d);}switch(c){case "input":Va(d);db(d,f,true);break;case "textarea":Va(d);jb(d);break;case "select":case "option":break;default:"function"===typeof f.onClick&&(d.onclick=Bf);}d=e;b.updateQueue=d;null!==d&&(b.flags|=4);}else {g=9===e.nodeType?e:e.ownerDocument;"http://www.w3.org/1999/xhtml"===a&&(a=kb(c));"http://www.w3.org/1999/xhtml"===a?"script"===c?(a=g.createElement("div"),a.innerHTML="<script>\x3c/script>",a=a.removeChild(a.firstChild)):
|
|
324
|
-
"string"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),"select"===c&&(g=a,d.multiple?g.multiple=true:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[Of]=b;a[Pf]=d;zj(a,b,false,false);b.stateNode=a;a:{g=vb(c,d);switch(c){case "dialog":D("cancel",a);D("close",a);e=d;break;case "iframe":case "object":case "embed":D("load",a);e=d;break;case "video":case "audio":for(e=0;e<lf.length;e++)D(lf[e],a);e=d;break;case "source":D("error",a);e=d;break;case "img":case "image":case "link":D("error",
|
|
325
|
-
a);D("load",a);e=d;break;case "details":D("toggle",a);e=d;break;case "input":Za(a,d);e=Ya(a,d);D("invalid",a);break;case "option":e=d;break;case "select":a._wrapperState={wasMultiple:!!d.multiple};e=A({},d,{value:void 0});D("invalid",a);break;case "textarea":hb(a,d);e=gb(a,d);D("invalid",a);break;default:e=d;}ub(c,e);h=e;for(f in h)if(h.hasOwnProperty(f)){var k=h[f];"style"===f?sb(a,k):"dangerouslySetInnerHTML"===f?(k=k?k.__html:void 0,null!=k&&nb(a,k)):"children"===f?"string"===typeof k?("textarea"!==
|
|
326
|
-
c||""!==k)&&ob(a,k):"number"===typeof k&&ob(a,""+k):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(ea.hasOwnProperty(f)?null!=k&&"onScroll"===f&&D("scroll",a):null!=k&&ta(a,f,k,g));}switch(c){case "input":Va(a);db(a,d,false);break;case "textarea":Va(a);jb(a);break;case "option":null!=d.value&&a.setAttribute("value",""+Sa(d.value));break;case "select":a.multiple=!!d.multiple;f=d.value;null!=f?fb(a,!!d.multiple,f,false):null!=d.defaultValue&&fb(a,!!d.multiple,d.defaultValue,
|
|
327
|
-
true);break;default:"function"===typeof e.onClick&&(a.onclick=Bf);}switch(c){case "button":case "input":case "select":case "textarea":d=!!d.autoFocus;break a;case "img":d=true;break a;default:d=false;}}d&&(b.flags|=4);}null!==b.ref&&(b.flags|=512,b.flags|=2097152);}S(b);return null;case 6:if(a&&null!=b.stateNode)Cj(a,b,a.memoizedProps,d);else {if("string"!==typeof d&&null===b.stateNode)throw Error(p(166));c=xh(wh.current);xh(uh.current);if(Gg(b)){d=b.stateNode;c=b.memoizedProps;d[Of]=b;if(f=d.nodeValue!==c)if(a=
|
|
328
|
-
xg,null!==a)switch(a.tag){case 3:Af(d.nodeValue,c,0!==(a.mode&1));break;case 5:true!==a.memoizedProps.suppressHydrationWarning&&Af(d.nodeValue,c,0!==(a.mode&1));}f&&(b.flags|=4);}else d=(9===c.nodeType?c:c.ownerDocument).createTextNode(d),d[Of]=b,b.stateNode=d;}S(b);return null;case 13:E(L);d=b.memoizedState;if(null===a||null!==a.memoizedState&&null!==a.memoizedState.dehydrated){if(I&&null!==yg&&0!==(b.mode&1)&&0===(b.flags&128))Hg(),Ig(),b.flags|=98560,f=false;else if(f=Gg(b),null!==d&&null!==d.dehydrated){if(null===
|
|
329
|
-
a){if(!f)throw Error(p(318));f=b.memoizedState;f=null!==f?f.dehydrated:null;if(!f)throw Error(p(317));f[Of]=b;}else Ig(),0===(b.flags&128)&&(b.memoizedState=null),b.flags|=4;S(b);f=false;}else null!==zg&&(Fj(zg),zg=null),f=true;if(!f)return b.flags&65536?b:null}if(0!==(b.flags&128))return b.lanes=c,b;d=null!==d;d!==(null!==a&&null!==a.memoizedState)&&d&&(b.child.flags|=8192,0!==(b.mode&1)&&(null===a||0!==(L.current&1)?0===T&&(T=3):tj()));null!==b.updateQueue&&(b.flags|=4);S(b);return null;case 4:return zh(),
|
|
330
|
-
Aj(a,b),null===a&&sf(b.stateNode.containerInfo),S(b),null;case 10:return ah(b.type._context),S(b),null;case 17:return Zf(b.type)&&$f(),S(b),null;case 19:E(L);f=b.memoizedState;if(null===f)return S(b),null;d=0!==(b.flags&128);g=f.rendering;if(null===g)if(d)Dj(f,false);else {if(0!==T||null!==a&&0!==(a.flags&128))for(a=b.child;null!==a;){g=Ch(a);if(null!==g){b.flags|=128;Dj(f,false);d=g.updateQueue;null!==d&&(b.updateQueue=d,b.flags|=4);b.subtreeFlags=0;d=c;for(c=b.child;null!==c;)f=c,a=d,f.flags&=14680066,
|
|
331
|
-
g=f.alternate,null===g?(f.childLanes=0,f.lanes=a,f.child=null,f.subtreeFlags=0,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=g.childLanes,f.lanes=g.lanes,f.child=g.child,f.subtreeFlags=0,f.deletions=null,f.memoizedProps=g.memoizedProps,f.memoizedState=g.memoizedState,f.updateQueue=g.updateQueue,f.type=g.type,a=g.dependencies,f.dependencies=null===a?null:{lanes:a.lanes,firstContext:a.firstContext}),c=c.sibling;G(L,L.current&1|2);return b.child}a=
|
|
332
|
-
a.sibling;}null!==f.tail&&B()>Gj&&(b.flags|=128,d=true,Dj(f,false),b.lanes=4194304);}else {if(!d)if(a=Ch(g),null!==a){if(b.flags|=128,d=true,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Dj(f,true),null===f.tail&&"hidden"===f.tailMode&&!g.alternate&&!I)return S(b),null}else 2*B()-f.renderingStartTime>Gj&&1073741824!==c&&(b.flags|=128,d=true,Dj(f,false),b.lanes=4194304);f.isBackwards?(g.sibling=b.child,b.child=g):(c=f.last,null!==c?c.sibling=g:b.child=g,f.last=g);}if(null!==f.tail)return b=f.tail,f.rendering=
|
|
333
|
-
b,f.tail=b.sibling,f.renderingStartTime=B(),b.sibling=null,c=L.current,G(L,d?c&1|2:c&1),b;S(b);return null;case 22:case 23:return Hj(),d=null!==b.memoizedState,null!==a&&null!==a.memoizedState!==d&&(b.flags|=8192),d&&0!==(b.mode&1)?0!==(fj&1073741824)&&(S(b),b.subtreeFlags&6&&(b.flags|=8192)):S(b),null;case 24:return null;case 25:return null}throw Error(p(156,b.tag));}
|
|
334
|
-
function Ij(a,b){wg(b);switch(b.tag){case 1:return Zf(b.type)&&$f(),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 3:return zh(),E(Wf),E(H),Eh(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 5:return Bh(b),null;case 13:E(L);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(p(340));Ig();}a=b.flags;return a&65536?(b.flags=a&-65537|128,b):null;case 19:return E(L),null;case 4:return zh(),null;case 10:return ah(b.type._context),null;case 22:case 23:return Hj(),
|
|
335
|
-
null;case 24:return null;default:return null}}var Jj=false,U=false,Kj="function"===typeof WeakSet?WeakSet:Set,V=null;function Lj(a,b){var c=a.ref;if(null!==c)if("function"===typeof c)try{c(null);}catch(d){W(a,b,d);}else c.current=null;}function Mj(a,b,c){try{c();}catch(d){W(a,b,d);}}var Nj=false;
|
|
336
|
-
function Oj(a,b){Cf=dd;a=Me();if(Ne(a)){if("selectionStart"in a)var c={start:a.selectionStart,end:a.selectionEnd};else a:{c=(c=a.ownerDocument)&&c.defaultView||window;var d=c.getSelection&&c.getSelection();if(d&&0!==d.rangeCount){c=d.anchorNode;var e=d.anchorOffset,f=d.focusNode;d=d.focusOffset;try{c.nodeType,f.nodeType;}catch(F){c=null;break a}var g=0,h=-1,k=-1,l=0,m=0,q=a,r=null;b:for(;;){for(var y;;){q!==c||0!==e&&3!==q.nodeType||(h=g+e);q!==f||0!==d&&3!==q.nodeType||(k=g+d);3===q.nodeType&&(g+=
|
|
337
|
-
q.nodeValue.length);if(null===(y=q.firstChild))break;r=q;q=y;}for(;;){if(q===a)break b;r===c&&++l===e&&(h=g);r===f&&++m===d&&(k=g);if(null!==(y=q.nextSibling))break;q=r;r=q.parentNode;}q=y;}c=-1===h||-1===k?null:{start:h,end:k};}else c=null;}c=c||{start:0,end:0};}else c=null;Df={focusedElem:a,selectionRange:c};dd=false;for(V=b;null!==V;)if(b=V,a=b.child,0!==(b.subtreeFlags&1028)&&null!==a)a.return=b,V=a;else for(;null!==V;){b=V;try{var n=b.alternate;if(0!==(b.flags&1024))switch(b.tag){case 0:case 11:case 15:break;
|
|
338
|
-
case 1:if(null!==n){var t=n.memoizedProps,J=n.memoizedState,x=b.stateNode,w=x.getSnapshotBeforeUpdate(b.elementType===b.type?t:Ci(b.type,t),J);x.__reactInternalSnapshotBeforeUpdate=w;}break;case 3:var u=b.stateNode.containerInfo;1===u.nodeType?u.textContent="":9===u.nodeType&&u.documentElement&&u.removeChild(u.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p(163));}}catch(F){W(b,b.return,F);}a=b.sibling;if(null!==a){a.return=b.return;V=a;break}V=b.return;}n=Nj;Nj=false;return n}
|
|
339
|
-
function Pj(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&Mj(b,c,f);}e=e.next;}while(e!==d)}}function Qj(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d();}c=c.next;}while(c!==b)}}function Rj(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:a=c;break;default:a=c;}"function"===typeof b?b(a):b.current=a;}}
|
|
340
|
-
function Sj(a){var b=a.alternate;null!==b&&(a.alternate=null,Sj(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&(delete b[Of],delete b[Pf],delete b[of],delete b[Qf],delete b[Rf]));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null;}function Tj(a){return 5===a.tag||3===a.tag||4===a.tag}
|
|
341
|
-
function Uj(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||Tj(a.return))return null;a=a.return;}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child;}if(!(a.flags&2))return a.stateNode}}
|
|
342
|
-
function Vj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=Bf));else if(4!==d&&(a=a.child,null!==a))for(Vj(a,b,c),a=a.sibling;null!==a;)Vj(a,b,c),a=a.sibling;}
|
|
343
|
-
function Wj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(Wj(a,b,c),a=a.sibling;null!==a;)Wj(a,b,c),a=a.sibling;}var X=null,Xj=false;function Yj(a,b,c){for(c=c.child;null!==c;)Zj(a,b,c),c=c.sibling;}
|
|
344
|
-
function Zj(a,b,c){if(lc&&"function"===typeof lc.onCommitFiberUnmount)try{lc.onCommitFiberUnmount(kc,c);}catch(h){}switch(c.tag){case 5:U||Lj(c,b);case 6:var d=X,e=Xj;X=null;Yj(a,b,c);X=d;Xj=e;null!==X&&(Xj?(a=X,c=c.stateNode,8===a.nodeType?a.parentNode.removeChild(c):a.removeChild(c)):X.removeChild(c.stateNode));break;case 18:null!==X&&(Xj?(a=X,c=c.stateNode,8===a.nodeType?Kf(a.parentNode,c):1===a.nodeType&&Kf(a,c),bd(a)):Kf(X,c.stateNode));break;case 4:d=X;e=Xj;X=c.stateNode.containerInfo;Xj=true;
|
|
345
|
-
Yj(a,b,c);X=d;Xj=e;break;case 0:case 11:case 14:case 15:if(!U&&(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?Mj(c,b,g):0!==(f&4)&&Mj(c,b,g));e=e.next;}while(e!==d)}Yj(a,b,c);break;case 1:if(!U&&(Lj(c,b),d=c.stateNode,"function"===typeof d.componentWillUnmount))try{d.props=c.memoizedProps,d.state=c.memoizedState,d.componentWillUnmount();}catch(h){W(c,b,h);}Yj(a,b,c);break;case 21:Yj(a,b,c);break;case 22:c.mode&1?(U=(d=U)||null!==
|
|
346
|
-
c.memoizedState,Yj(a,b,c),U=d):Yj(a,b,c);break;default:Yj(a,b,c);}}function ak(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Kj);b.forEach(function(b){var d=bk.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d));});}}
|
|
347
|
-
function ck(a,b){var c=b.deletions;if(null!==c)for(var d=0;d<c.length;d++){var e=c[d];try{var f=a,g=b,h=g;a:for(;null!==h;){switch(h.tag){case 5:X=h.stateNode;Xj=!1;break a;case 3:X=h.stateNode.containerInfo;Xj=!0;break a;case 4:X=h.stateNode.containerInfo;Xj=!0;break a}h=h.return;}if(null===X)throw Error(p(160));Zj(f,g,e);X=null;Xj=!1;var k=e.alternate;null!==k&&(k.return=null);e.return=null;}catch(l){W(e,b,l);}}if(b.subtreeFlags&12854)for(b=b.child;null!==b;)dk(b,a),b=b.sibling;}
|
|
348
|
-
function dk(a,b){var c=a.alternate,d=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:ck(b,a);ek(a);if(d&4){try{Pj(3,a,a.return),Qj(3,a);}catch(t){W(a,a.return,t);}try{Pj(5,a,a.return);}catch(t){W(a,a.return,t);}}break;case 1:ck(b,a);ek(a);d&512&&null!==c&&Lj(c,c.return);break;case 5:ck(b,a);ek(a);d&512&&null!==c&&Lj(c,c.return);if(a.flags&32){var e=a.stateNode;try{ob(e,"");}catch(t){W(a,a.return,t);}}if(d&4&&(e=a.stateNode,null!=e)){var f=a.memoizedProps,g=null!==c?c.memoizedProps:f,h=a.type,k=a.updateQueue;
|
|
349
|
-
a.updateQueue=null;if(null!==k)try{"input"===h&&"radio"===f.type&&null!=f.name&&ab(e,f);vb(h,g);var l=vb(h,f);for(g=0;g<k.length;g+=2){var m=k[g],q=k[g+1];"style"===m?sb(e,q):"dangerouslySetInnerHTML"===m?nb(e,q):"children"===m?ob(e,q):ta(e,m,q,l);}switch(h){case "input":bb(e,f);break;case "textarea":ib(e,f);break;case "select":var r=e._wrapperState.wasMultiple;e._wrapperState.wasMultiple=!!f.multiple;var y=f.value;null!=y?fb(e,!!f.multiple,y,!1):r!==!!f.multiple&&(null!=f.defaultValue?fb(e,!!f.multiple,
|
|
350
|
-
f.defaultValue,!0):fb(e,!!f.multiple,f.multiple?[]:"",!1));}e[Pf]=f;}catch(t){W(a,a.return,t);}}break;case 6:ck(b,a);ek(a);if(d&4){if(null===a.stateNode)throw Error(p(162));e=a.stateNode;f=a.memoizedProps;try{e.nodeValue=f;}catch(t){W(a,a.return,t);}}break;case 3:ck(b,a);ek(a);if(d&4&&null!==c&&c.memoizedState.isDehydrated)try{bd(b.containerInfo);}catch(t){W(a,a.return,t);}break;case 4:ck(b,a);ek(a);break;case 13:ck(b,a);ek(a);e=a.child;e.flags&8192&&(f=null!==e.memoizedState,e.stateNode.isHidden=f,!f||
|
|
351
|
-
null!==e.alternate&&null!==e.alternate.memoizedState||(fk=B()));d&4&&ak(a);break;case 22:m=null!==c&&null!==c.memoizedState;a.mode&1?(U=(l=U)||m,ck(b,a),U=l):ck(b,a);ek(a);if(d&8192){l=null!==a.memoizedState;if((a.stateNode.isHidden=l)&&!m&&0!==(a.mode&1))for(V=a,m=a.child;null!==m;){for(q=V=m;null!==V;){r=V;y=r.child;switch(r.tag){case 0:case 11:case 14:case 15:Pj(4,r,r.return);break;case 1:Lj(r,r.return);var n=r.stateNode;if("function"===typeof n.componentWillUnmount){d=r;c=r.return;try{b=d,n.props=
|
|
352
|
-
b.memoizedProps,n.state=b.memoizedState,n.componentWillUnmount();}catch(t){W(d,c,t);}}break;case 5:Lj(r,r.return);break;case 22:if(null!==r.memoizedState){gk(q);continue}}null!==y?(y.return=r,V=y):gk(q);}m=m.sibling;}a:for(m=null,q=a;;){if(5===q.tag){if(null===m){m=q;try{e=q.stateNode,l?(f=e.style,"function"===typeof f.setProperty?f.setProperty("display","none","important"):f.display="none"):(h=q.stateNode,k=q.memoizedProps.style,g=void 0!==k&&null!==k&&k.hasOwnProperty("display")?k.display:null,h.style.display=
|
|
353
|
-
rb("display",g));}catch(t){W(a,a.return,t);}}}else if(6===q.tag){if(null===m)try{q.stateNode.nodeValue=l?"":q.memoizedProps;}catch(t){W(a,a.return,t);}}else if((22!==q.tag&&23!==q.tag||null===q.memoizedState||q===a)&&null!==q.child){q.child.return=q;q=q.child;continue}if(q===a)break a;for(;null===q.sibling;){if(null===q.return||q.return===a)break a;m===q&&(m=null);q=q.return;}m===q&&(m=null);q.sibling.return=q.return;q=q.sibling;}}break;case 19:ck(b,a);ek(a);d&4&&ak(a);break;case 21:break;default:ck(b,
|
|
354
|
-
a),ek(a);}}function ek(a){var b=a.flags;if(b&2){try{a:{for(var c=a.return;null!==c;){if(Tj(c)){var d=c;break a}c=c.return;}throw Error(p(160));}switch(d.tag){case 5:var e=d.stateNode;d.flags&32&&(ob(e,""),d.flags&=-33);var f=Uj(a);Wj(a,f,e);break;case 3:case 4:var g=d.stateNode.containerInfo,h=Uj(a);Vj(a,h,g);break;default:throw Error(p(161));}}catch(k){W(a,a.return,k);}a.flags&=-3;}b&4096&&(a.flags&=-4097);}function hk(a,b,c){V=a;ik(a);}
|
|
355
|
-
function ik(a,b,c){for(var d=0!==(a.mode&1);null!==V;){var e=V,f=e.child;if(22===e.tag&&d){var g=null!==e.memoizedState||Jj;if(!g){var h=e.alternate,k=null!==h&&null!==h.memoizedState||U;h=Jj;var l=U;Jj=g;if((U=k)&&!l)for(V=e;null!==V;)g=V,k=g.child,22===g.tag&&null!==g.memoizedState?jk(e):null!==k?(k.return=g,V=k):jk(e);for(;null!==f;)V=f,ik(f),f=f.sibling;V=e;Jj=h;U=l;}kk(a);}else 0!==(e.subtreeFlags&8772)&&null!==f?(f.return=e,V=f):kk(a);}}
|
|
356
|
-
function kk(a){for(;null!==V;){var b=V;if(0!==(b.flags&8772)){var c=b.alternate;try{if(0!==(b.flags&8772))switch(b.tag){case 0:case 11:case 15:U||Qj(5,b);break;case 1:var d=b.stateNode;if(b.flags&4&&!U)if(null===c)d.componentDidMount();else {var e=b.elementType===b.type?c.memoizedProps:Ci(b.type,c.memoizedProps);d.componentDidUpdate(e,c.memoizedState,d.__reactInternalSnapshotBeforeUpdate);}var f=b.updateQueue;null!==f&&sh(b,f,d);break;case 3:var g=b.updateQueue;if(null!==g){c=null;if(null!==b.child)switch(b.child.tag){case 5:c=
|
|
357
|
-
b.child.stateNode;break;case 1:c=b.child.stateNode;}sh(b,g,c);}break;case 5:var h=b.stateNode;if(null===c&&b.flags&4){c=h;var k=b.memoizedProps;switch(b.type){case "button":case "input":case "select":case "textarea":k.autoFocus&&c.focus();break;case "img":k.src&&(c.src=k.src);}}break;case 6:break;case 4:break;case 12:break;case 13:if(null===b.memoizedState){var l=b.alternate;if(null!==l){var m=l.memoizedState;if(null!==m){var q=m.dehydrated;null!==q&&bd(q);}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;
|
|
358
|
-
default:throw Error(p(163));}U||b.flags&512&&Rj(b);}catch(r){W(b,b.return,r);}}if(b===a){V=null;break}c=b.sibling;if(null!==c){c.return=b.return;V=c;break}V=b.return;}}function gk(a){for(;null!==V;){var b=V;if(b===a){V=null;break}var c=b.sibling;if(null!==c){c.return=b.return;V=c;break}V=b.return;}}
|
|
359
|
-
function jk(a){for(;null!==V;){var b=V;try{switch(b.tag){case 0:case 11:case 15:var c=b.return;try{Qj(4,b);}catch(k){W(b,c,k);}break;case 1:var d=b.stateNode;if("function"===typeof d.componentDidMount){var e=b.return;try{d.componentDidMount();}catch(k){W(b,e,k);}}var f=b.return;try{Rj(b);}catch(k){W(b,f,k);}break;case 5:var g=b.return;try{Rj(b);}catch(k){W(b,g,k);}}}catch(k){W(b,b.return,k);}if(b===a){V=null;break}var h=b.sibling;if(null!==h){h.return=b.return;V=h;break}V=b.return;}}
|
|
360
|
-
var lk=Math.ceil,mk=ua.ReactCurrentDispatcher,nk=ua.ReactCurrentOwner,ok=ua.ReactCurrentBatchConfig,K=0,Q=null,Y=null,Z=0,fj=0,ej=Uf(0),T=0,pk=null,rh=0,qk=0,rk=0,sk=null,tk=null,fk=0,Gj=Infinity,uk=null,Oi=false,Pi=null,Ri=null,vk=false,wk=null,xk=0,yk=0,zk=null,Ak=-1,Bk=0;function R(){return 0!==(K&6)?B():-1!==Ak?Ak:Ak=B()}
|
|
361
|
-
function yi(a){if(0===(a.mode&1))return 1;if(0!==(K&2)&&0!==Z)return Z&-Z;if(null!==Kg.transition)return 0===Bk&&(Bk=yc()),Bk;a=C;if(0!==a)return a;a=window.event;a=void 0===a?16:jd(a.type);return a}function gi(a,b,c,d){if(50<yk)throw yk=0,zk=null,Error(p(185));Ac(a,c,d);if(0===(K&2)||a!==Q)a===Q&&(0===(K&2)&&(qk|=c),4===T&&Ck(a,Z)),Dk(a,d),1===c&&0===K&&0===(b.mode&1)&&(Gj=B()+500,fg&&jg());}
|
|
362
|
-
function Dk(a,b){var c=a.callbackNode;wc(a,b);var d=uc(a,a===Q?Z:0);if(0===d)null!==c&&bc(c),a.callbackNode=null,a.callbackPriority=0;else if(b=d&-d,a.callbackPriority!==b){null!=c&&bc(c);if(1===b)0===a.tag?ig(Ek.bind(null,a)):hg(Ek.bind(null,a)),Jf(function(){0===(K&6)&&jg();}),c=null;else {switch(Dc(d)){case 1:c=fc;break;case 4:c=gc;break;case 16:c=hc;break;case 536870912:c=jc;break;default:c=hc;}c=Fk(c,Gk.bind(null,a));}a.callbackPriority=b;a.callbackNode=c;}}
|
|
363
|
-
function Gk(a,b){Ak=-1;Bk=0;if(0!==(K&6))throw Error(p(327));var c=a.callbackNode;if(Hk()&&a.callbackNode!==c)return null;var d=uc(a,a===Q?Z:0);if(0===d)return null;if(0!==(d&30)||0!==(d&a.expiredLanes)||b)b=Ik(a,d);else {b=d;var e=K;K|=2;var f=Jk();if(Q!==a||Z!==b)uk=null,Gj=B()+500,Kk(a,b);do try{Lk();break}catch(h){Mk(a,h);}while(1);$g();mk.current=f;K=e;null!==Y?b=0:(Q=null,Z=0,b=T);}if(0!==b){2===b&&(e=xc(a),0!==e&&(d=e,b=Nk(a,e)));if(1===b)throw c=pk,Kk(a,0),Ck(a,d),Dk(a,B()),c;if(6===b)Ck(a,d);
|
|
364
|
-
else {e=a.current.alternate;if(0===(d&30)&&!Ok(e)&&(b=Ik(a,d),2===b&&(f=xc(a),0!==f&&(d=f,b=Nk(a,f))),1===b))throw c=pk,Kk(a,0),Ck(a,d),Dk(a,B()),c;a.finishedWork=e;a.finishedLanes=d;switch(b){case 0:case 1:throw Error(p(345));case 2:Pk(a,tk,uk);break;case 3:Ck(a,d);if((d&130023424)===d&&(b=fk+500-B(),10<b)){if(0!==uc(a,0))break;e=a.suspendedLanes;if((e&d)!==d){R();a.pingedLanes|=a.suspendedLanes&e;break}a.timeoutHandle=Ff(Pk.bind(null,a,tk,uk),b);break}Pk(a,tk,uk);break;case 4:Ck(a,d);if((d&4194240)===
|
|
365
|
-
d)break;b=a.eventTimes;for(e=-1;0<d;){var g=31-oc(d);f=1<<g;g=b[g];g>e&&(e=g);d&=~f;}d=e;d=B()-d;d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*lk(d/1960))-d;if(10<d){a.timeoutHandle=Ff(Pk.bind(null,a,tk,uk),d);break}Pk(a,tk,uk);break;case 5:Pk(a,tk,uk);break;default:throw Error(p(329));}}}Dk(a,B());return a.callbackNode===c?Gk.bind(null,a):null}
|
|
366
|
-
function Nk(a,b){var c=sk;a.current.memoizedState.isDehydrated&&(Kk(a,b).flags|=256);a=Ik(a,b);2!==a&&(b=tk,tk=c,null!==b&&Fj(b));return a}function Fj(a){null===tk?tk=a:tk.push.apply(tk,a);}
|
|
367
|
-
function Ok(a){for(var b=a;;){if(b.flags&16384){var c=b.updateQueue;if(null!==c&&(c=c.stores,null!==c))for(var d=0;d<c.length;d++){var e=c[d],f=e.getSnapshot;e=e.value;try{if(!He(f(),e))return !1}catch(g){return false}}}c=b.child;if(b.subtreeFlags&16384&&null!==c)c.return=b,b=c;else {if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return true;b=b.return;}b.sibling.return=b.return;b=b.sibling;}}return true}
|
|
368
|
-
function Ck(a,b){b&=~rk;b&=~qk;a.suspendedLanes|=b;a.pingedLanes&=~b;for(a=a.expirationTimes;0<b;){var c=31-oc(b),d=1<<c;a[c]=-1;b&=~d;}}function Ek(a){if(0!==(K&6))throw Error(p(327));Hk();var b=uc(a,0);if(0===(b&1))return Dk(a,B()),null;var c=Ik(a,b);if(0!==a.tag&&2===c){var d=xc(a);0!==d&&(b=d,c=Nk(a,d));}if(1===c)throw c=pk,Kk(a,0),Ck(a,b),Dk(a,B()),c;if(6===c)throw Error(p(345));a.finishedWork=a.current.alternate;a.finishedLanes=b;Pk(a,tk,uk);Dk(a,B());return null}
|
|
369
|
-
function Qk(a,b){var c=K;K|=1;try{return a(b)}finally{K=c,0===K&&(Gj=B()+500,fg&&jg());}}function Rk(a){null!==wk&&0===wk.tag&&0===(K&6)&&Hk();var b=K;K|=1;var c=ok.transition,d=C;try{if(ok.transition=null,C=1,a)return a()}finally{C=d,ok.transition=c,K=b,0===(K&6)&&jg();}}function Hj(){fj=ej.current;E(ej);}
|
|
370
|
-
function Kk(a,b){a.finishedWork=null;a.finishedLanes=0;var c=a.timeoutHandle;-1!==c&&(a.timeoutHandle=-1,Gf(c));if(null!==Y)for(c=Y.return;null!==c;){var d=c;wg(d);switch(d.tag){case 1:d=d.type.childContextTypes;null!==d&&void 0!==d&&$f();break;case 3:zh();E(Wf);E(H);Eh();break;case 5:Bh(d);break;case 4:zh();break;case 13:E(L);break;case 19:E(L);break;case 10:ah(d.type._context);break;case 22:case 23:Hj();}c=c.return;}Q=a;Y=a=Pg(a.current,null);Z=fj=b;T=0;pk=null;rk=qk=rh=0;tk=sk=null;if(null!==fh){for(b=
|
|
371
|
-
0;b<fh.length;b++)if(c=fh[b],d=c.interleaved,null!==d){c.interleaved=null;var e=d.next,f=c.pending;if(null!==f){var g=f.next;f.next=e;d.next=g;}c.pending=d;}fh=null;}return a}
|
|
372
|
-
function Mk(a,b){do{var c=Y;try{$g();Fh.current=Rh;if(Ih){for(var d=M.memoizedState;null!==d;){var e=d.queue;null!==e&&(e.pending=null);d=d.next;}Ih=!1;}Hh=0;O=N=M=null;Jh=!1;Kh=0;nk.current=null;if(null===c||null===c.return){T=1;pk=b;Y=null;break}a:{var f=a,g=c.return,h=c,k=b;b=Z;h.flags|=32768;if(null!==k&&"object"===typeof k&&"function"===typeof k.then){var l=k,m=h,q=m.tag;if(0===(m.mode&1)&&(0===q||11===q||15===q)){var r=m.alternate;r?(m.updateQueue=r.updateQueue,m.memoizedState=r.memoizedState,
|
|
373
|
-
m.lanes=r.lanes):(m.updateQueue=null,m.memoizedState=null);}var y=Ui(g);if(null!==y){y.flags&=-257;Vi(y,g,h,f,b);y.mode&1&&Si(f,l,b);b=y;k=l;var n=b.updateQueue;if(null===n){var t=new Set;t.add(k);b.updateQueue=t;}else n.add(k);break a}else {if(0===(b&1)){Si(f,l,b);tj();break a}k=Error(p(426));}}else if(I&&h.mode&1){var J=Ui(g);if(null!==J){0===(J.flags&65536)&&(J.flags|=256);Vi(J,g,h,f,b);Jg(Ji(k,h));break a}}f=k=Ji(k,h);4!==T&&(T=2);null===sk?sk=[f]:sk.push(f);f=g;do{switch(f.tag){case 3:f.flags|=65536;
|
|
374
|
-
b&=-b;f.lanes|=b;var x=Ni(f,k,b);ph(f,x);break a;case 1:h=k;var w=f.type,u=f.stateNode;if(0===(f.flags&128)&&("function"===typeof w.getDerivedStateFromError||null!==u&&"function"===typeof u.componentDidCatch&&(null===Ri||!Ri.has(u)))){f.flags|=65536;b&=-b;f.lanes|=b;var F=Qi(f,h,b);ph(f,F);break a}}f=f.return;}while(null!==f)}Sk(c);}catch(na){b=na;Y===c&&null!==c&&(Y=c=c.return);continue}break}while(1)}function Jk(){var a=mk.current;mk.current=Rh;return null===a?Rh:a}
|
|
375
|
-
function tj(){if(0===T||3===T||2===T)T=4;null===Q||0===(rh&268435455)&&0===(qk&268435455)||Ck(Q,Z);}function Ik(a,b){var c=K;K|=2;var d=Jk();if(Q!==a||Z!==b)uk=null,Kk(a,b);do try{Tk();break}catch(e){Mk(a,e);}while(1);$g();K=c;mk.current=d;if(null!==Y)throw Error(p(261));Q=null;Z=0;return T}function Tk(){for(;null!==Y;)Uk(Y);}function Lk(){for(;null!==Y&&!cc();)Uk(Y);}function Uk(a){var b=Vk(a.alternate,a,fj);a.memoizedProps=a.pendingProps;null===b?Sk(a):Y=b;nk.current=null;}
|
|
376
|
-
function Sk(a){var b=a;do{var c=b.alternate;a=b.return;if(0===(b.flags&32768)){if(c=Ej(c,b,fj),null!==c){Y=c;return}}else {c=Ij(c,b);if(null!==c){c.flags&=32767;Y=c;return}if(null!==a)a.flags|=32768,a.subtreeFlags=0,a.deletions=null;else {T=6;Y=null;return}}b=b.sibling;if(null!==b){Y=b;return}Y=b=a;}while(null!==b);0===T&&(T=5);}function Pk(a,b,c){var d=C,e=ok.transition;try{ok.transition=null,C=1,Wk(a,b,c,d);}finally{ok.transition=e,C=d;}return null}
|
|
377
|
-
function Wk(a,b,c,d){do Hk();while(null!==wk);if(0!==(K&6))throw Error(p(327));c=a.finishedWork;var e=a.finishedLanes;if(null===c)return null;a.finishedWork=null;a.finishedLanes=0;if(c===a.current)throw Error(p(177));a.callbackNode=null;a.callbackPriority=0;var f=c.lanes|c.childLanes;Bc(a,f);a===Q&&(Y=Q=null,Z=0);0===(c.subtreeFlags&2064)&&0===(c.flags&2064)||vk||(vk=true,Fk(hc,function(){Hk();return null}));f=0!==(c.flags&15990);if(0!==(c.subtreeFlags&15990)||f){f=ok.transition;ok.transition=null;
|
|
378
|
-
var g=C;C=1;var h=K;K|=4;nk.current=null;Oj(a,c);dk(c,a);Oe(Df);dd=!!Cf;Df=Cf=null;a.current=c;hk(c);dc();K=h;C=g;ok.transition=f;}else a.current=c;vk&&(vk=false,wk=a,xk=e);f=a.pendingLanes;0===f&&(Ri=null);mc(c.stateNode);Dk(a,B());if(null!==b)for(d=a.onRecoverableError,c=0;c<b.length;c++)e=b[c],d(e.value,{componentStack:e.stack,digest:e.digest});if(Oi)throw Oi=false,a=Pi,Pi=null,a;0!==(xk&1)&&0!==a.tag&&Hk();f=a.pendingLanes;0!==(f&1)?a===zk?yk++:(yk=0,zk=a):yk=0;jg();return null}
|
|
379
|
-
function Hk(){if(null!==wk){var a=Dc(xk),b=ok.transition,c=C;try{ok.transition=null;C=16>a?16:a;if(null===wk)var d=!1;else {a=wk;wk=null;xk=0;if(0!==(K&6))throw Error(p(331));var e=K;K|=4;for(V=a.current;null!==V;){var f=V,g=f.child;if(0!==(V.flags&16)){var h=f.deletions;if(null!==h){for(var k=0;k<h.length;k++){var l=h[k];for(V=l;null!==V;){var m=V;switch(m.tag){case 0:case 11:case 15:Pj(8,m,f);}var q=m.child;if(null!==q)q.return=m,V=q;else for(;null!==V;){m=V;var r=m.sibling,y=m.return;Sj(m);if(m===
|
|
380
|
-
l){V=null;break}if(null!==r){r.return=y;V=r;break}V=y;}}}var n=f.alternate;if(null!==n){var t=n.child;if(null!==t){n.child=null;do{var J=t.sibling;t.sibling=null;t=J;}while(null!==t)}}V=f;}}if(0!==(f.subtreeFlags&2064)&&null!==g)g.return=f,V=g;else b:for(;null!==V;){f=V;if(0!==(f.flags&2048))switch(f.tag){case 0:case 11:case 15:Pj(9,f,f.return);}var x=f.sibling;if(null!==x){x.return=f.return;V=x;break b}V=f.return;}}var w=a.current;for(V=w;null!==V;){g=V;var u=g.child;if(0!==(g.subtreeFlags&2064)&&null!==
|
|
381
|
-
u)u.return=g,V=u;else b:for(g=w;null!==V;){h=V;if(0!==(h.flags&2048))try{switch(h.tag){case 0:case 11:case 15:Qj(9,h);}}catch(na){W(h,h.return,na);}if(h===g){V=null;break b}var F=h.sibling;if(null!==F){F.return=h.return;V=F;break b}V=h.return;}}K=e;jg();if(lc&&"function"===typeof lc.onPostCommitFiberRoot)try{lc.onPostCommitFiberRoot(kc,a);}catch(na){}d=!0;}return d}finally{C=c,ok.transition=b;}}return false}function Xk(a,b,c){b=Ji(c,b);b=Ni(a,b,1);a=nh(a,b,1);b=R();null!==a&&(Ac(a,1,b),Dk(a,b));}
|
|
382
|
-
function W(a,b,c){if(3===a.tag)Xk(a,a,c);else for(;null!==b;){if(3===b.tag){Xk(b,a,c);break}else if(1===b.tag){var d=b.stateNode;if("function"===typeof b.type.getDerivedStateFromError||"function"===typeof d.componentDidCatch&&(null===Ri||!Ri.has(d))){a=Ji(c,a);a=Qi(b,a,1);b=nh(b,a,1);a=R();null!==b&&(Ac(b,1,a),Dk(b,a));break}}b=b.return;}}
|
|
383
|
-
function Ti(a,b,c){var d=a.pingCache;null!==d&&d.delete(b);b=R();a.pingedLanes|=a.suspendedLanes&c;Q===a&&(Z&c)===c&&(4===T||3===T&&(Z&130023424)===Z&&500>B()-fk?Kk(a,0):rk|=c);Dk(a,b);}function Yk(a,b){0===b&&(0===(a.mode&1)?b=1:(b=sc,sc<<=1,0===(sc&130023424)&&(sc=4194304)));var c=R();a=ih(a,b);null!==a&&(Ac(a,b,c),Dk(a,c));}function uj(a){var b=a.memoizedState,c=0;null!==b&&(c=b.retryLane);Yk(a,c);}
|
|
384
|
-
function bk(a,b){var c=0;switch(a.tag){case 13:var d=a.stateNode;var e=a.memoizedState;null!==e&&(c=e.retryLane);break;case 19:d=a.stateNode;break;default:throw Error(p(314));}null!==d&&d.delete(b);Yk(a,c);}var Vk;
|
|
385
|
-
Vk=function(a,b,c){if(null!==a)if(a.memoizedProps!==b.pendingProps||Wf.current)dh=true;else {if(0===(a.lanes&c)&&0===(b.flags&128))return dh=false,yj(a,b,c);dh=0!==(a.flags&131072)?true:false;}else dh=false,I&&0!==(b.flags&1048576)&&ug(b,ng,b.index);b.lanes=0;switch(b.tag){case 2:var d=b.type;ij(a,b);a=b.pendingProps;var e=Yf(b,H.current);ch(b,c);e=Nh(null,b,d,a,e,c);var f=Sh();b.flags|=1;"object"===typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof?(b.tag=1,b.memoizedState=null,b.updateQueue=
|
|
386
|
-
null,Zf(d)?(f=true,cg(b)):f=false,b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,kh(b),e.updater=Ei,b.stateNode=e,e._reactInternals=b,Ii(b,d,a,c),b=jj(null,b,d,true,f,c)):(b.tag=0,I&&f&&vg(b),Xi(null,b,e,c),b=b.child);return b;case 16:d=b.elementType;a:{ij(a,b);a=b.pendingProps;e=d._init;d=e(d._payload);b.type=d;e=b.tag=Zk(d);a=Ci(d,a);switch(e){case 0:b=cj(null,b,d,a,c);break a;case 1:b=hj(null,b,d,a,c);break a;case 11:b=Yi(null,b,d,a,c);break a;case 14:b=$i(null,b,d,Ci(d.type,a),c);break a}throw Error(p(306,
|
|
387
|
-
d,""));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Ci(d,e),cj(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Ci(d,e),hj(a,b,d,e,c);case 3:a:{kj(b);if(null===a)throw Error(p(387));d=b.pendingProps;f=b.memoizedState;e=f.element;lh(a,b);qh(b,d,null,c);var g=b.memoizedState;d=g.element;if(f.isDehydrated)if(f={element:d,isDehydrated:false,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},b.updateQueue.baseState=
|
|
388
|
-
f,b.memoizedState=f,b.flags&256){e=Ji(Error(p(423)),b);b=lj(a,b,d,c,e);break a}else if(d!==e){e=Ji(Error(p(424)),b);b=lj(a,b,d,c,e);break a}else for(yg=Lf(b.stateNode.containerInfo.firstChild),xg=b,I=true,zg=null,c=Vg(b,null,d,c),b.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else {Ig();if(d===e){b=Zi(a,b,c);break a}Xi(a,b,d,c);}b=b.child;}return b;case 5:return Ah(b),null===a&&Eg(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Ef(d,e)?g=null:null!==f&&Ef(d,f)&&(b.flags|=32),
|
|
389
|
-
gj(a,b),Xi(a,b,g,c),b.child;case 6:return null===a&&Eg(b),null;case 13:return oj(a,b,c);case 4:return yh(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Ug(b,null,d,c):Xi(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Ci(d,e),Yi(a,b,d,e,c);case 7:return Xi(a,b,b.pendingProps,c),b.child;case 8:return Xi(a,b,b.pendingProps.children,c),b.child;case 12:return Xi(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;f=b.memoizedProps;
|
|
390
|
-
g=e.value;G(Wg,d._currentValue);d._currentValue=g;if(null!==f)if(He(f.value,g)){if(f.children===e.children&&!Wf.current){b=Zi(a,b,c);break a}}else for(f=b.child,null!==f&&(f.return=b);null!==f;){var h=f.dependencies;if(null!==h){g=f.child;for(var k=h.firstContext;null!==k;){if(k.context===d){if(1===f.tag){k=mh(-1,c&-c);k.tag=2;var l=f.updateQueue;if(null!==l){l=l.shared;var m=l.pending;null===m?k.next=k:(k.next=m.next,m.next=k);l.pending=k;}}f.lanes|=c;k=f.alternate;null!==k&&(k.lanes|=c);bh(f.return,
|
|
391
|
-
c,b);h.lanes|=c;break}k=k.next;}}else if(10===f.tag)g=f.type===b.type?null:f.child;else if(18===f.tag){g=f.return;if(null===g)throw Error(p(341));g.lanes|=c;h=g.alternate;null!==h&&(h.lanes|=c);bh(g,c,b);g=f.sibling;}else g=f.child;if(null!==g)g.return=f;else for(g=f;null!==g;){if(g===b){g=null;break}f=g.sibling;if(null!==f){f.return=g.return;g=f;break}g=g.return;}f=g;}Xi(a,b,e.children,c);b=b.child;}return b;case 9:return e=b.type,d=b.pendingProps.children,ch(b,c),e=eh(e),d=d(e),b.flags|=1,Xi(a,b,d,c),
|
|
392
|
-
b.child;case 14:return d=b.type,e=Ci(d,b.pendingProps),e=Ci(d.type,e),$i(a,b,d,e,c);case 15:return bj(a,b,b.type,b.pendingProps,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Ci(d,e),ij(a,b),b.tag=1,Zf(d)?(a=true,cg(b)):a=false,ch(b,c),Gi(b,d,e),Ii(b,d,e,c),jj(null,b,d,true,a,c);case 19:return xj(a,b,c);case 22:return dj(a,b,c)}throw Error(p(156,b.tag));};function Fk(a,b){return ac(a,b)}
|
|
393
|
-
function $k(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null;}function Bg(a,b,c,d){return new $k(a,b,c,d)}function aj(a){a=a.prototype;return !(!a||!a.isReactComponent)}
|
|
394
|
-
function Zk(a){if("function"===typeof a)return aj(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Da)return 11;if(a===Ga)return 14}return 2}
|
|
395
|
-
function Pg(a,b){var c=a.alternate;null===c?(c=Bg(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null);c.flags=a.flags&14680064;c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};
|
|
396
|
-
c.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}
|
|
397
|
-
function Rg(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)aj(a)&&(g=1);else if("string"===typeof a)g=5;else a:switch(a){case ya:return Tg(c.children,e,f,b);case za:g=8;e|=8;break;case Aa:return a=Bg(12,c,b,e|2),a.elementType=Aa,a.lanes=f,a;case Ea:return a=Bg(13,c,b,e),a.elementType=Ea,a.lanes=f,a;case Fa:return a=Bg(19,c,b,e),a.elementType=Fa,a.lanes=f,a;case Ia:return pj(c,e,f,b);default:if("object"===typeof a&&null!==a)switch(a.$$typeof){case Ba:g=10;break a;case Ca:g=9;break a;case Da:g=11;
|
|
398
|
-
break a;case Ga:g=14;break a;case Ha:g=16;d=null;break a}throw Error(p(130,null==a?a:typeof a,""));}b=Bg(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function Tg(a,b,c,d){a=Bg(7,a,d,b);a.lanes=c;return a}function pj(a,b,c,d){a=Bg(22,a,d,b);a.elementType=Ia;a.lanes=c;a.stateNode={isHidden:false};return a}function Qg(a,b,c){a=Bg(6,a,null,b);a.lanes=c;return a}
|
|
399
|
-
function Sg(a,b,c){b=Bg(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}
|
|
400
|
-
function al(a,b,c,d,e){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=0;this.eventTimes=zc(0);this.expirationTimes=zc(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=zc(0);this.identifierPrefix=d;this.onRecoverableError=e;this.mutableSourceEagerHydrationData=
|
|
401
|
-
null;}function bl(a,b,c,d,e,f,g,h,k){a=new al(a,b,c,h,k);1===b?(b=1,true===f&&(b|=8)):b=0;f=Bg(3,null,null,b);a.current=f;f.stateNode=a;f.memoizedState={element:d,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null};kh(f);return a}function cl(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return {$$typeof:wa,key:null==d?null:""+d,children:a,containerInfo:b,implementation:c}}
|
|
402
|
-
function dl(a){if(!a)return Vf;a=a._reactInternals;a:{if(Vb(a)!==a||1!==a.tag)throw Error(p(170));var b=a;do{switch(b.tag){case 3:b=b.stateNode.context;break a;case 1:if(Zf(b.type)){b=b.stateNode.__reactInternalMemoizedMergedChildContext;break a}}b=b.return;}while(null!==b);throw Error(p(171));}if(1===a.tag){var c=a.type;if(Zf(c))return bg(a,c,b)}return b}
|
|
403
|
-
function el(a,b,c,d,e,f,g,h,k){a=bl(c,d,true,a,e,f,g,h,k);a.context=dl(null);c=a.current;d=R();e=yi(c);f=mh(d,e);f.callback=void 0!==b&&null!==b?b:null;nh(c,f,e);a.current.lanes=e;Ac(a,e,d);Dk(a,d);return a}function fl(a,b,c,d){var e=b.current,f=R(),g=yi(e);c=dl(c);null===b.context?b.context=c:b.pendingContext=c;b=mh(f,g);b.payload={element:a};d=void 0===d?null:d;null!==d&&(b.callback=d);a=nh(e,b,g);null!==a&&(gi(a,e,g,f),oh(a,e,g));return g}
|
|
404
|
-
function gl(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function hl(a,b){a=a.memoizedState;if(null!==a&&null!==a.dehydrated){var c=a.retryLane;a.retryLane=0!==c&&c<b?c:b;}}function il(a,b){hl(a,b);(a=a.alternate)&&hl(a,b);}function jl(){return null}var kl="function"===typeof reportError?reportError:function(a){console.error(a);};function ll(a){this._internalRoot=a;}
|
|
405
|
-
ml.prototype.render=ll.prototype.render=function(a){var b=this._internalRoot;if(null===b)throw Error(p(409));fl(a,b,null,null);};ml.prototype.unmount=ll.prototype.unmount=function(){var a=this._internalRoot;if(null!==a){this._internalRoot=null;var b=a.containerInfo;Rk(function(){fl(null,a,null,null);});b[uf]=null;}};function ml(a){this._internalRoot=a;}
|
|
406
|
-
ml.prototype.unstable_scheduleHydration=function(a){if(a){var b=Hc();a={blockedOn:null,target:a,priority:b};for(var c=0;c<Qc.length&&0!==b&&b<Qc[c].priority;c++);Qc.splice(c,0,a);0===c&&Vc(a);}};function nl(a){return !(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType)}function ol(a){return !(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||" react-mount-point-unstable "!==a.nodeValue))}function pl(){}
|
|
407
|
-
function ql(a,b,c,d,e){if(e){if("function"===typeof d){var f=d;d=function(){var a=gl(g);f.call(a);};}var g=el(b,d,a,0,null,false,false,"",pl);a._reactRootContainer=g;a[uf]=g.current;sf(8===a.nodeType?a.parentNode:a);Rk();return g}for(;e=a.lastChild;)a.removeChild(e);if("function"===typeof d){var h=d;d=function(){var a=gl(k);h.call(a);};}var k=bl(a,0,false,null,null,false,false,"",pl);a._reactRootContainer=k;a[uf]=k.current;sf(8===a.nodeType?a.parentNode:a);Rk(function(){fl(b,k,c,d);});return k}
|
|
408
|
-
function rl(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f;if("function"===typeof e){var h=e;e=function(){var a=gl(g);h.call(a);};}fl(b,g,a,e);}else g=ql(c,b,a,e,d);return gl(g)}Ec=function(a){switch(a.tag){case 3:var b=a.stateNode;if(b.current.memoizedState.isDehydrated){var c=tc(b.pendingLanes);0!==c&&(Cc(b,c|1),Dk(b,B()),0===(K&6)&&(Gj=B()+500,jg()));}break;case 13:Rk(function(){var b=ih(a,1);if(null!==b){var c=R();gi(b,a,1,c);}}),il(a,1);}};
|
|
409
|
-
Fc=function(a){if(13===a.tag){var b=ih(a,134217728);if(null!==b){var c=R();gi(b,a,134217728,c);}il(a,134217728);}};Gc=function(a){if(13===a.tag){var b=yi(a),c=ih(a,b);if(null!==c){var d=R();gi(c,a,b,d);}il(a,b);}};Hc=function(){return C};Ic=function(a,b){var c=C;try{return C=a,b()}finally{C=c;}};
|
|
410
|
-
yb=function(a,b,c){switch(b){case "input":bb(a,c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=Db(d);if(!e)throw Error(p(90));Wa(d);bb(d,e);}}}break;case "textarea":ib(a,c);break;case "select":b=c.value,null!=b&&fb(a,!!c.multiple,b,false);}};Gb=Qk;Hb=Rk;
|
|
411
|
-
var sl={usingClientEntryPoint:false,Events:[Cb,ue,Db,Eb,Fb,Qk]},tl={findFiberByHostInstance:Wc,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"};
|
|
412
|
-
var ul={bundleType:tl.bundleType,version:tl.version,rendererPackageName:tl.rendererPackageName,rendererConfig:tl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ua.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=Zb(a);return null===a?null:a.stateNode},findFiberByHostInstance:tl.findFiberByHostInstance||
|
|
413
|
-
jl,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var vl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vl.isDisabled&&vl.supportsFiber)try{kc=vl.inject(ul),lc=vl;}catch(a){}}reactDom_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=sl;
|
|
414
|
-
reactDom_production_min.createPortal=function(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!nl(b))throw Error(p(200));return cl(a,b,null,c)};reactDom_production_min.createRoot=function(a,b){if(!nl(a))throw Error(p(299));var c=false,d="",e=kl;null!==b&&void 0!==b&&(true===b.unstable_strictMode&&(c=true),void 0!==b.identifierPrefix&&(d=b.identifierPrefix),void 0!==b.onRecoverableError&&(e=b.onRecoverableError));b=bl(a,1,false,null,null,c,false,d,e);a[uf]=b.current;sf(8===a.nodeType?a.parentNode:a);return new ll(b)};
|
|
415
|
-
reactDom_production_min.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternals;if(void 0===b){if("function"===typeof a.render)throw Error(p(188));a=Object.keys(a).join(",");throw Error(p(268,a));}a=Zb(b);a=null===a?null:a.stateNode;return a};reactDom_production_min.flushSync=function(a){return Rk(a)};reactDom_production_min.hydrate=function(a,b,c){if(!ol(b))throw Error(p(200));return rl(null,a,b,true,c)};
|
|
416
|
-
reactDom_production_min.hydrateRoot=function(a,b,c){if(!nl(a))throw Error(p(405));var d=null!=c&&c.hydratedSources||null,e=false,f="",g=kl;null!==c&&void 0!==c&&(true===c.unstable_strictMode&&(e=true),void 0!==c.identifierPrefix&&(f=c.identifierPrefix),void 0!==c.onRecoverableError&&(g=c.onRecoverableError));b=el(b,null,a,1,null!=c?c:null,e,false,f,g);a[uf]=b.current;sf(a);if(d)for(a=0;a<d.length;a++)c=d[a],e=c._getVersion,e=e(c._source),null==b.mutableSourceEagerHydrationData?b.mutableSourceEagerHydrationData=[c,e]:b.mutableSourceEagerHydrationData.push(c,
|
|
417
|
-
e);return new ml(b)};reactDom_production_min.render=function(a,b,c){if(!ol(b))throw Error(p(200));return rl(null,a,b,false,c)};reactDom_production_min.unmountComponentAtNode=function(a){if(!ol(a))throw Error(p(40));return a._reactRootContainer?(Rk(function(){rl(null,null,a,!1,function(){a._reactRootContainer=null;a[uf]=null;});}),true):false};reactDom_production_min.unstable_batchedUpdates=Qk;
|
|
418
|
-
reactDom_production_min.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!ol(c))throw Error(p(200));if(null==a||void 0===a._reactInternals)throw Error(p(38));return rl(a,b,c,false,d)};reactDom_production_min.version="18.3.1-next-f1338f8080-20240426";
|
|
419
|
-
return reactDom_production_min;
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
var hasRequiredReactDom;
|
|
423
|
-
|
|
424
|
-
function requireReactDom () {
|
|
425
|
-
if (hasRequiredReactDom) return reactDom.exports;
|
|
426
|
-
hasRequiredReactDom = 1;
|
|
427
|
-
function checkDCE() {
|
|
428
|
-
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === "undefined" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== "function") {
|
|
429
|
-
return;
|
|
430
|
-
}
|
|
431
|
-
try {
|
|
432
|
-
__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
|
|
433
|
-
} catch (err) {
|
|
434
|
-
console.error(err);
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
{
|
|
438
|
-
checkDCE();
|
|
439
|
-
reactDom.exports = requireReactDom_production_min();
|
|
440
|
-
}
|
|
441
|
-
return reactDom.exports;
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
var reactDomExports = requireReactDom();
|
|
445
|
-
|
|
446
|
-
/**
|
|
447
|
-
* @param element
|
|
448
|
-
*/
|
|
449
|
-
function getBoundingClientRect(element) {
|
|
450
|
-
const rect = element.getBoundingClientRect();
|
|
451
|
-
return {
|
|
452
|
-
width: rect.width,
|
|
453
|
-
height: rect.height,
|
|
454
|
-
top: rect.top,
|
|
455
|
-
right: rect.right,
|
|
456
|
-
bottom: rect.bottom,
|
|
457
|
-
left: rect.left,
|
|
458
|
-
x: rect.left,
|
|
459
|
-
y: rect.top
|
|
460
|
-
};
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
// @ts-nocheck
|
|
464
|
-
/* :: import type { Window } from '../types'; */
|
|
465
|
-
/* :: declare function getWindow(node: Node | Window): Window; */
|
|
466
|
-
/**
|
|
467
|
-
* @param node
|
|
468
|
-
*/
|
|
469
|
-
function getWindow(node) {
|
|
470
|
-
if (node.toString() !== '[object Window]') {
|
|
471
|
-
const ownerDocument = node.ownerDocument;
|
|
472
|
-
return ownerDocument ? ownerDocument.defaultView : window;
|
|
473
|
-
}
|
|
474
|
-
return node;
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
// @ts-nocheck
|
|
478
|
-
/**
|
|
479
|
-
* @param node
|
|
480
|
-
*/
|
|
481
|
-
function getWindowScroll(node) {
|
|
482
|
-
const win = getWindow(node);
|
|
483
|
-
const scrollLeft = win.pageXOffset;
|
|
484
|
-
const scrollTop = win.pageYOffset;
|
|
485
|
-
return {
|
|
486
|
-
scrollLeft,
|
|
487
|
-
scrollTop
|
|
488
|
-
};
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
// @ts-nocheck
|
|
492
|
-
/* :: declare function isElement(node: mixed): boolean %checks(node instanceof
|
|
493
|
-
Element); */
|
|
494
|
-
/**
|
|
495
|
-
* @param node
|
|
496
|
-
*/
|
|
497
|
-
function isElement(node) {
|
|
498
|
-
const OwnElement = getWindow(node).Element;
|
|
499
|
-
return node instanceof OwnElement || node instanceof Element;
|
|
500
|
-
}
|
|
501
|
-
/* :: declare function isHTMLElement(node: mixed): boolean %checks(node instanceof
|
|
502
|
-
HTMLElement); */
|
|
503
|
-
/**
|
|
504
|
-
* @param node
|
|
505
|
-
*/
|
|
506
|
-
function isHTMLElement(node) {
|
|
507
|
-
const OwnElement = getWindow(node).HTMLElement;
|
|
508
|
-
return node instanceof OwnElement || node instanceof HTMLElement;
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
// @ts-nocheck
|
|
512
|
-
/**
|
|
513
|
-
* @param element
|
|
514
|
-
*/
|
|
515
|
-
function getHTMLElementScroll(element) {
|
|
516
|
-
return {
|
|
517
|
-
scrollLeft: element.scrollLeft,
|
|
518
|
-
scrollTop: element.scrollTop
|
|
519
|
-
};
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
// @ts-nocheck
|
|
523
|
-
/**
|
|
524
|
-
* @param node
|
|
525
|
-
*/
|
|
526
|
-
function getNodeScroll(node) {
|
|
527
|
-
if (node === getWindow(node) || !isHTMLElement(node)) {
|
|
528
|
-
return getWindowScroll(node);
|
|
529
|
-
}
|
|
530
|
-
else {
|
|
531
|
-
return getHTMLElementScroll(node);
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
/**
|
|
536
|
-
* @param element
|
|
537
|
-
*/
|
|
538
|
-
function getNodeName(element) {
|
|
539
|
-
return element ? (element.nodeName || '').toLowerCase() : null;
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
// @ts-nocheck
|
|
543
|
-
/**
|
|
544
|
-
* @param element
|
|
545
|
-
*/
|
|
546
|
-
function getDocumentElement(element) {
|
|
547
|
-
// $FlowFixMe: assume body is always available
|
|
548
|
-
return (isElement(element) ? element.ownerDocument : element.document).documentElement;
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
// @ts-nocheck
|
|
552
|
-
/**
|
|
553
|
-
* @param element
|
|
554
|
-
*/
|
|
555
|
-
function getWindowScrollBarX(element) {
|
|
556
|
-
// If <html> has a CSS width greater than the viewport, then this will be
|
|
557
|
-
// incorrect for RTL.
|
|
558
|
-
// Popper 1 is broken in this case and never had a bug report so let's assume
|
|
559
|
-
// it's not an issue. I don't think anyone ever specifies width on <html>
|
|
560
|
-
// anyway.
|
|
561
|
-
// Browsers where the left scrollbar doesn't cause an issue report `0` for
|
|
562
|
-
// this (e.g. Edge 2019, IE11, Safari)
|
|
563
|
-
return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
// @ts-nocheck
|
|
567
|
-
/**
|
|
568
|
-
* @param element
|
|
569
|
-
*/
|
|
570
|
-
function getComputedStyle$1(element) {
|
|
571
|
-
return getWindow(element).getComputedStyle(element);
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
// @ts-nocheck
|
|
575
|
-
/**
|
|
576
|
-
* @param element
|
|
577
|
-
*/
|
|
578
|
-
function isScrollParent(element) {
|
|
579
|
-
// Firefox wants us to check `-x` and `-y` variations as well
|
|
580
|
-
const { overflow, overflowX, overflowY } = getComputedStyle$1(element);
|
|
581
|
-
return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
// Returns the composite rect of an element relative to its offsetParent.
|
|
585
|
-
// Composite means it takes into account transforms as well as layout.
|
|
586
|
-
/**
|
|
587
|
-
* @param elementOrVirtualElement
|
|
588
|
-
* @param offsetParent
|
|
589
|
-
* @param isFixed
|
|
590
|
-
*/
|
|
591
|
-
function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed = false) {
|
|
592
|
-
const documentElement = getDocumentElement(offsetParent);
|
|
593
|
-
const rect = getBoundingClientRect(elementOrVirtualElement);
|
|
594
|
-
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
595
|
-
let scroll = { scrollLeft: 0, scrollTop: 0 };
|
|
596
|
-
let offsets = { x: 0, y: 0 };
|
|
597
|
-
if (isOffsetParentAnElement || (!isOffsetParentAnElement && !isFixed)) {
|
|
598
|
-
if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078
|
|
599
|
-
isScrollParent(documentElement)) {
|
|
600
|
-
scroll = getNodeScroll(offsetParent);
|
|
601
|
-
}
|
|
602
|
-
if (isHTMLElement(offsetParent)) {
|
|
603
|
-
offsets = getBoundingClientRect(offsetParent);
|
|
604
|
-
offsets.x += offsetParent.clientLeft;
|
|
605
|
-
offsets.y += offsetParent.clientTop;
|
|
606
|
-
}
|
|
607
|
-
else if (documentElement) {
|
|
608
|
-
offsets.x = getWindowScrollBarX(documentElement);
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
|
-
return {
|
|
612
|
-
x: rect.left + scroll.scrollLeft - offsets.x,
|
|
613
|
-
y: rect.top + scroll.scrollTop - offsets.y,
|
|
614
|
-
width: rect.width,
|
|
615
|
-
height: rect.height
|
|
616
|
-
};
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
// Returns the layout rect of an element relative to its offsetParent. Layout
|
|
620
|
-
// means it doesn't take into account transforms.
|
|
621
|
-
/**
|
|
622
|
-
* @param element
|
|
623
|
-
*/
|
|
624
|
-
function getLayoutRect(element) {
|
|
625
|
-
return {
|
|
626
|
-
x: element.offsetLeft,
|
|
627
|
-
y: element.offsetTop,
|
|
628
|
-
width: element.offsetWidth,
|
|
629
|
-
height: element.offsetHeight
|
|
630
|
-
};
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
// @ts-nocheck
|
|
634
|
-
/**
|
|
635
|
-
* @param element
|
|
636
|
-
*/
|
|
637
|
-
function getParentNode(element) {
|
|
638
|
-
if (getNodeName(element) === 'html') {
|
|
639
|
-
return element;
|
|
640
|
-
}
|
|
641
|
-
return (
|
|
642
|
-
// $FlowFixMe: this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
|
643
|
-
element.assignedSlot || // step into the shadow DOM of the parent of a slotted node
|
|
644
|
-
element.parentNode || // DOM Element detected
|
|
645
|
-
// $FlowFixMe: need a better way to handle this...
|
|
646
|
-
element.host || // ShadowRoot detected
|
|
647
|
-
// $FlowFixMe: HTMLElement is a Node
|
|
648
|
-
getDocumentElement(element) // fallback
|
|
649
|
-
);
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
// @ts-nocheck
|
|
653
|
-
/**
|
|
654
|
-
* @param node
|
|
655
|
-
*/
|
|
656
|
-
function getScrollParent(node) {
|
|
657
|
-
if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {
|
|
658
|
-
// $FlowFixMe: assume body is always available
|
|
659
|
-
return node.ownerDocument.body;
|
|
660
|
-
}
|
|
661
|
-
if (isHTMLElement(node) && isScrollParent(node)) {
|
|
662
|
-
return node;
|
|
663
|
-
}
|
|
664
|
-
return getScrollParent(getParentNode(node));
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
// @ts-nocheck
|
|
668
|
-
/*
|
|
669
|
-
given a DOM element, return the list of all scroll parents, up the list of ancesors
|
|
670
|
-
until we get to the top window object. This list is what we attach scroll listeners
|
|
671
|
-
to, because if any of these parent elements scroll, we'll need to re-calculate the
|
|
672
|
-
reference element's position.
|
|
673
|
-
*/
|
|
674
|
-
/**
|
|
675
|
-
* @param element
|
|
676
|
-
* @param list
|
|
677
|
-
*/
|
|
678
|
-
function listScrollParents(element, list = []) {
|
|
679
|
-
const scrollParent = getScrollParent(element);
|
|
680
|
-
const isBody = getNodeName(scrollParent) === 'body';
|
|
681
|
-
const win = getWindow(scrollParent);
|
|
682
|
-
const target = isBody
|
|
683
|
-
? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : [])
|
|
684
|
-
: scrollParent;
|
|
685
|
-
const updatedList = list.concat(target);
|
|
686
|
-
return isBody
|
|
687
|
-
? updatedList // $FlowFixMe: isBody tells us target will be an HTMLElement here
|
|
688
|
-
: updatedList.concat(listScrollParents(getParentNode(target)));
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
// @ts-nocheck
|
|
692
|
-
/**
|
|
693
|
-
* @param element
|
|
694
|
-
*/
|
|
695
|
-
function isTableElement(element) {
|
|
696
|
-
return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
// @ts-nocheck
|
|
700
|
-
/**
|
|
701
|
-
* @param element
|
|
702
|
-
*/
|
|
703
|
-
function getTrueOffsetParent(element) {
|
|
704
|
-
if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837
|
|
705
|
-
getComputedStyle$1(element).position === 'fixed') {
|
|
706
|
-
return null;
|
|
707
|
-
}
|
|
708
|
-
const offsetParent = element.offsetParent;
|
|
709
|
-
if (offsetParent) {
|
|
710
|
-
const html = getDocumentElement(offsetParent);
|
|
711
|
-
if (getNodeName(offsetParent) === 'body' &&
|
|
712
|
-
getComputedStyle$1(offsetParent).position === 'static' &&
|
|
713
|
-
getComputedStyle$1(html).position !== 'static') {
|
|
714
|
-
return html;
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
return offsetParent;
|
|
718
|
-
}
|
|
719
|
-
// `.offsetParent` reports `null` for fixed elements, while absolute elements
|
|
720
|
-
// return the containing block
|
|
721
|
-
/**
|
|
722
|
-
* @param element
|
|
723
|
-
*/
|
|
724
|
-
function getContainingBlock(element) {
|
|
725
|
-
let currentNode = getParentNode(element);
|
|
726
|
-
while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {
|
|
727
|
-
const css = getComputedStyle$1(currentNode);
|
|
728
|
-
// This is non-exhaustive but covers the most common CSS properties that
|
|
729
|
-
// create a containing block.
|
|
730
|
-
if (css.transform !== 'none' || css.perspective !== 'none' || (css.willChange && css.willChange !== 'auto')) {
|
|
731
|
-
return currentNode;
|
|
732
|
-
}
|
|
733
|
-
else {
|
|
734
|
-
currentNode = currentNode.parentNode;
|
|
735
|
-
}
|
|
736
|
-
}
|
|
737
|
-
return null;
|
|
738
|
-
}
|
|
739
|
-
// Gets the closest ancestor positioned element. Handles some edge cases,
|
|
740
|
-
// such as table ancestors and cross browser bugs.
|
|
741
|
-
/**
|
|
742
|
-
* @param element
|
|
743
|
-
*/
|
|
744
|
-
function getOffsetParent(element) {
|
|
745
|
-
const window = getWindow(element);
|
|
746
|
-
let offsetParent = getTrueOffsetParent(element);
|
|
747
|
-
while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === 'static') {
|
|
748
|
-
offsetParent = getTrueOffsetParent(offsetParent);
|
|
749
|
-
}
|
|
750
|
-
if (offsetParent && getNodeName(offsetParent) === 'body' && getComputedStyle$1(offsetParent).position === 'static') {
|
|
751
|
-
return window;
|
|
752
|
-
}
|
|
753
|
-
return offsetParent || getContainingBlock(element) || window;
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
// @ts-nocheck
|
|
757
|
-
const top = 'top';
|
|
758
|
-
const bottom = 'bottom';
|
|
759
|
-
const right = 'right';
|
|
760
|
-
const left = 'left';
|
|
761
|
-
const auto = 'auto';
|
|
762
|
-
const basePlacements = [top, bottom, right, left];
|
|
763
|
-
const start = 'start';
|
|
764
|
-
const end = 'end';
|
|
765
|
-
const clippingParents = 'clippingParents';
|
|
766
|
-
const viewport = 'viewport';
|
|
767
|
-
const popper = 'popper';
|
|
768
|
-
const reference = 'reference';
|
|
769
|
-
const variationPlacements = basePlacements.reduce((acc, placement) => acc.concat([`${placement}-${start}`, `${placement}-${end}`]), []);
|
|
770
|
-
const placements = [...basePlacements, auto].reduce((acc, placement) => acc.concat([placement, `${placement}-${start}`, `${placement}-${end}`]), []);
|
|
771
|
-
// modifiers that need to read the DOM
|
|
772
|
-
const beforeRead = 'beforeRead';
|
|
773
|
-
const read = 'read';
|
|
774
|
-
const afterRead = 'afterRead';
|
|
775
|
-
// pure-logic modifiers
|
|
776
|
-
const beforeMain = 'beforeMain';
|
|
777
|
-
const main = 'main';
|
|
778
|
-
const afterMain = 'afterMain';
|
|
779
|
-
// modifier with the purpose to write to the DOM (or write into a framework state)
|
|
780
|
-
const beforeWrite = 'beforeWrite';
|
|
781
|
-
const write = 'write';
|
|
782
|
-
const afterWrite = 'afterWrite';
|
|
783
|
-
const modifierPhases = [
|
|
784
|
-
beforeRead,
|
|
785
|
-
read,
|
|
786
|
-
afterRead,
|
|
787
|
-
beforeMain,
|
|
788
|
-
main,
|
|
789
|
-
afterMain,
|
|
790
|
-
beforeWrite,
|
|
791
|
-
write,
|
|
792
|
-
afterWrite
|
|
793
|
-
];
|
|
794
|
-
|
|
795
|
-
// source: https://stackoverflow.com/questions/49875255
|
|
796
|
-
/**
|
|
797
|
-
* @param modifiers
|
|
798
|
-
*/
|
|
799
|
-
function order(modifiers) {
|
|
800
|
-
const map = new Map();
|
|
801
|
-
const visited = new Set();
|
|
802
|
-
const result = [];
|
|
803
|
-
modifiers.forEach(modifier => {
|
|
804
|
-
map.set(modifier.name, modifier);
|
|
805
|
-
});
|
|
806
|
-
// On visiting object, check for its dependencies and visit them recursively
|
|
807
|
-
/**
|
|
808
|
-
* @param modifier
|
|
809
|
-
*/
|
|
810
|
-
function sort(modifier) {
|
|
811
|
-
visited.add(modifier.name);
|
|
812
|
-
const requires = [...(modifier.requires || []), ...(modifier.requiresIfExists || [])];
|
|
813
|
-
requires.forEach(dep => {
|
|
814
|
-
if (!visited.has(dep)) {
|
|
815
|
-
const depModifier = map.get(dep);
|
|
816
|
-
if (depModifier) {
|
|
817
|
-
sort(depModifier);
|
|
818
|
-
}
|
|
819
|
-
}
|
|
820
|
-
});
|
|
821
|
-
result.push(modifier);
|
|
822
|
-
}
|
|
823
|
-
modifiers.forEach(modifier => {
|
|
824
|
-
if (!visited.has(modifier.name)) {
|
|
825
|
-
// check for visited object
|
|
826
|
-
sort(modifier);
|
|
827
|
-
}
|
|
828
|
-
});
|
|
829
|
-
return result;
|
|
830
|
-
}
|
|
831
|
-
/**
|
|
832
|
-
* @param modifiers
|
|
833
|
-
*/
|
|
834
|
-
function orderModifiers(modifiers) {
|
|
835
|
-
// order based on dependencies
|
|
836
|
-
const orderedModifiers = order(modifiers);
|
|
837
|
-
// order based on phase
|
|
838
|
-
return modifierPhases.reduce((acc, phase) => acc.concat(orderedModifiers.filter(modifier => modifier.phase === phase)), []);
|
|
839
|
-
}
|
|
840
|
-
|
|
841
|
-
// @ts-nocheck
|
|
842
|
-
/**
|
|
843
|
-
* @param fn
|
|
844
|
-
*/
|
|
845
|
-
function debounce(fn) {
|
|
846
|
-
let pending;
|
|
847
|
-
return () => {
|
|
848
|
-
if (!pending) {
|
|
849
|
-
pending = new Promise(resolve => {
|
|
850
|
-
Promise.resolve().then(() => {
|
|
851
|
-
pending = undefined;
|
|
852
|
-
resolve(fn());
|
|
853
|
-
});
|
|
854
|
-
});
|
|
855
|
-
}
|
|
856
|
-
return pending;
|
|
857
|
-
};
|
|
858
|
-
}
|
|
859
|
-
|
|
860
|
-
/**
|
|
861
|
-
* @param placement
|
|
862
|
-
*/
|
|
863
|
-
function getBasePlacement(placement) {
|
|
864
|
-
return placement.split('-')[0];
|
|
865
|
-
}
|
|
866
|
-
|
|
867
|
-
/**
|
|
868
|
-
* @param modifiers
|
|
869
|
-
*/
|
|
870
|
-
function mergeByName(modifiers) {
|
|
871
|
-
const merged = modifiers.reduce((merged, current) => {
|
|
872
|
-
const existing = merged[current.name];
|
|
873
|
-
merged[current.name] = existing
|
|
874
|
-
? Object.assign(Object.assign(Object.assign({}, existing), current), { options: Object.assign(Object.assign({}, existing.options), current.options), data: Object.assign(Object.assign({}, existing.data), current.data) }) : current;
|
|
875
|
-
return merged;
|
|
876
|
-
}, {});
|
|
877
|
-
// IE11 does not support Object.values
|
|
878
|
-
return Object.keys(merged).map(key => merged[key]);
|
|
879
|
-
}
|
|
880
|
-
|
|
881
|
-
// @ts-nocheck
|
|
882
|
-
/**
|
|
883
|
-
* @param element
|
|
884
|
-
*/
|
|
885
|
-
function getViewportRect(element) {
|
|
886
|
-
const win = getWindow(element);
|
|
887
|
-
const html = getDocumentElement(element);
|
|
888
|
-
const visualViewport = win.visualViewport;
|
|
889
|
-
let width = html.clientWidth;
|
|
890
|
-
let height = html.clientHeight;
|
|
891
|
-
let x = 0;
|
|
892
|
-
let y = 0;
|
|
893
|
-
// NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper
|
|
894
|
-
// can be obscured underneath it.
|
|
895
|
-
// Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even
|
|
896
|
-
// if it isn't open, so if this isn't available, the popper will be detected
|
|
897
|
-
// to overflow the bottom of the screen too early.
|
|
898
|
-
if (visualViewport) {
|
|
899
|
-
width = visualViewport.width;
|
|
900
|
-
height = visualViewport.height;
|
|
901
|
-
// Uses Layout Viewport (like Chrome; Safari does not currently)
|
|
902
|
-
// In Chrome, it returns a value very close to 0 (+/-) but contains rounding
|
|
903
|
-
// errors due to floating point numbers, so we need to check precision.
|
|
904
|
-
// Safari returns a number <= 0, usually < -1 when pinch-zoomed
|
|
905
|
-
// Feature detection fails in mobile emulation mode in Chrome.
|
|
906
|
-
// Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <
|
|
907
|
-
// 0.001
|
|
908
|
-
// Fallback here: "Not Safari" userAgent
|
|
909
|
-
if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {
|
|
910
|
-
x = visualViewport.offsetLeft;
|
|
911
|
-
y = visualViewport.offsetTop;
|
|
912
|
-
}
|
|
913
|
-
}
|
|
914
|
-
return {
|
|
915
|
-
width,
|
|
916
|
-
height,
|
|
917
|
-
x: x + getWindowScrollBarX(element),
|
|
918
|
-
y
|
|
919
|
-
};
|
|
920
|
-
}
|
|
921
|
-
|
|
922
|
-
// Gets the entire size of the scrollable document area, even extending outside
|
|
923
|
-
// of the `<html>` and `<body>` rect bounds if horizontally scrollable
|
|
924
|
-
/**
|
|
925
|
-
* @param element
|
|
926
|
-
*/
|
|
927
|
-
function getDocumentRect(element) {
|
|
928
|
-
const html = getDocumentElement(element);
|
|
929
|
-
const winScroll = getWindowScroll(element);
|
|
930
|
-
const body = element.ownerDocument.body;
|
|
931
|
-
const width = Math.max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
|
|
932
|
-
const height = Math.max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
|
|
933
|
-
let x = -winScroll.scrollLeft + getWindowScrollBarX(element);
|
|
934
|
-
const y = -winScroll.scrollTop;
|
|
935
|
-
if (getComputedStyle$1(body || html).direction === 'rtl') {
|
|
936
|
-
x += Math.max(html.clientWidth, body ? body.clientWidth : 0) - width;
|
|
937
|
-
}
|
|
938
|
-
return { width, height, x, y };
|
|
939
|
-
}
|
|
940
|
-
|
|
941
|
-
// @ts-nocheck
|
|
942
|
-
/**
|
|
943
|
-
* @param parent
|
|
944
|
-
* @param child
|
|
945
|
-
*/
|
|
946
|
-
function contains(parent, child) {
|
|
947
|
-
// $FlowFixMe: hasOwnProperty doesn't seem to work in tests
|
|
948
|
-
const isShadow = Boolean(child.getRootNode && child.getRootNode().host);
|
|
949
|
-
// First, attempt with faster native method
|
|
950
|
-
if (parent.contains(child)) {
|
|
951
|
-
return true;
|
|
952
|
-
} // then fallback to custom implementation with Shadow DOM support
|
|
953
|
-
else if (isShadow) {
|
|
954
|
-
let next = child;
|
|
955
|
-
do {
|
|
956
|
-
if (next && parent.isSameNode(next)) {
|
|
957
|
-
return true;
|
|
958
|
-
}
|
|
959
|
-
// $FlowFixMe: need a better way to handle this...
|
|
960
|
-
next = next.parentNode || next.host;
|
|
961
|
-
} while (next);
|
|
962
|
-
}
|
|
963
|
-
// Give up, the result is false
|
|
964
|
-
return false;
|
|
965
|
-
}
|
|
966
|
-
|
|
967
|
-
/**
|
|
968
|
-
* @param rect
|
|
969
|
-
*/
|
|
970
|
-
function rectToClientRect(rect) {
|
|
971
|
-
return Object.assign(Object.assign({}, rect), { left: rect.x, top: rect.y, right: rect.x + rect.width, bottom: rect.y + rect.height });
|
|
972
|
-
}
|
|
973
|
-
|
|
974
|
-
/**
|
|
975
|
-
* @param element
|
|
976
|
-
*/
|
|
977
|
-
function getInnerBoundingClientRect(element) {
|
|
978
|
-
const rect = getBoundingClientRect(element);
|
|
979
|
-
rect.top = rect.top + element.clientTop;
|
|
980
|
-
rect.left = rect.left + element.clientLeft;
|
|
981
|
-
rect.bottom = rect.top + element.clientHeight;
|
|
982
|
-
rect.right = rect.left + element.clientWidth;
|
|
983
|
-
rect.width = element.clientWidth;
|
|
984
|
-
rect.height = element.clientHeight;
|
|
985
|
-
rect.x = rect.left;
|
|
986
|
-
rect.y = rect.top;
|
|
987
|
-
return rect;
|
|
988
|
-
}
|
|
989
|
-
/**
|
|
990
|
-
* @param element
|
|
991
|
-
* @param clippingParent
|
|
992
|
-
*/
|
|
993
|
-
function getClientRectFromMixedType(element, clippingParent) {
|
|
994
|
-
return clippingParent === viewport
|
|
995
|
-
? rectToClientRect(getViewportRect(element))
|
|
996
|
-
: isHTMLElement(clippingParent)
|
|
997
|
-
? getInnerBoundingClientRect(clippingParent)
|
|
998
|
-
: rectToClientRect(getDocumentRect(getDocumentElement(element)));
|
|
999
|
-
}
|
|
1000
|
-
// A "clipping parent" is an overflowable container with the characteristic of
|
|
1001
|
-
// clipping (or hiding) overflowing elements with a position different from
|
|
1002
|
-
// `initial`
|
|
1003
|
-
/**
|
|
1004
|
-
* @param element
|
|
1005
|
-
*/
|
|
1006
|
-
function getClippingParents(element) {
|
|
1007
|
-
const clippingParents = listScrollParents(getParentNode(element));
|
|
1008
|
-
const canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle$1(element).position) >= 0;
|
|
1009
|
-
const clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
|
|
1010
|
-
if (!isElement(clipperElement)) {
|
|
1011
|
-
return [];
|
|
1012
|
-
}
|
|
1013
|
-
// $FlowFixMe: https://github.com/facebook/flow/issues/1414
|
|
1014
|
-
return clippingParents.filter(clippingParent => isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body');
|
|
1015
|
-
}
|
|
1016
|
-
// Gets the maximum area that the element is visible in due to any number of
|
|
1017
|
-
// clipping parents
|
|
1018
|
-
/**
|
|
1019
|
-
* @param element
|
|
1020
|
-
* @param boundary
|
|
1021
|
-
* @param rootBoundary
|
|
1022
|
-
*/
|
|
1023
|
-
function getClippingRect(element, boundary, rootBoundary) {
|
|
1024
|
-
const mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);
|
|
1025
|
-
const clippingParents = [...mainClippingParents, rootBoundary];
|
|
1026
|
-
const firstClippingParent = clippingParents[0];
|
|
1027
|
-
const clippingRect = clippingParents.reduce((accRect, clippingParent) => {
|
|
1028
|
-
const rect = getClientRectFromMixedType(element, clippingParent);
|
|
1029
|
-
accRect.top = Math.max(rect.top, accRect.top);
|
|
1030
|
-
accRect.right = Math.min(rect.right, accRect.right);
|
|
1031
|
-
accRect.bottom = Math.min(rect.bottom, accRect.bottom);
|
|
1032
|
-
accRect.left = Math.max(rect.left, accRect.left);
|
|
1033
|
-
return accRect;
|
|
1034
|
-
}, getClientRectFromMixedType(element, firstClippingParent));
|
|
1035
|
-
clippingRect.width = clippingRect.right - clippingRect.left;
|
|
1036
|
-
clippingRect.height = clippingRect.bottom - clippingRect.top;
|
|
1037
|
-
clippingRect.x = clippingRect.left;
|
|
1038
|
-
clippingRect.y = clippingRect.top;
|
|
1039
|
-
return clippingRect;
|
|
1040
|
-
}
|
|
1041
|
-
|
|
1042
|
-
/**
|
|
1043
|
-
* @param placement
|
|
1044
|
-
*/
|
|
1045
|
-
function getVariation(placement) {
|
|
1046
|
-
return placement.split('-')[1];
|
|
1047
|
-
}
|
|
1048
|
-
|
|
1049
|
-
/**
|
|
1050
|
-
* @param placement
|
|
1051
|
-
*/
|
|
1052
|
-
function getMainAxisFromPlacement(placement) {
|
|
1053
|
-
return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
|
|
1054
|
-
}
|
|
1055
|
-
|
|
1056
|
-
// @ts-nocheck
|
|
1057
|
-
/**
|
|
1058
|
-
*
|
|
1059
|
-
*/
|
|
1060
|
-
function computeOffsets({ reference, element, placement }) {
|
|
1061
|
-
const basePlacement = placement ? getBasePlacement(placement) : null;
|
|
1062
|
-
const variation = placement ? getVariation(placement) : null;
|
|
1063
|
-
const commonX = reference.x + reference.width / 2 - element.width / 2;
|
|
1064
|
-
const commonY = reference.y + reference.height / 2 - element.height / 2;
|
|
1065
|
-
let offsets;
|
|
1066
|
-
switch (basePlacement) {
|
|
1067
|
-
case top:
|
|
1068
|
-
offsets = {
|
|
1069
|
-
x: commonX,
|
|
1070
|
-
y: reference.y - element.height
|
|
1071
|
-
};
|
|
1072
|
-
break;
|
|
1073
|
-
case bottom:
|
|
1074
|
-
offsets = {
|
|
1075
|
-
x: commonX,
|
|
1076
|
-
y: reference.y + reference.height
|
|
1077
|
-
};
|
|
1078
|
-
break;
|
|
1079
|
-
case right:
|
|
1080
|
-
offsets = {
|
|
1081
|
-
x: reference.x + reference.width,
|
|
1082
|
-
y: commonY
|
|
1083
|
-
};
|
|
1084
|
-
break;
|
|
1085
|
-
case left:
|
|
1086
|
-
offsets = {
|
|
1087
|
-
x: reference.x - element.width,
|
|
1088
|
-
y: commonY
|
|
1089
|
-
};
|
|
1090
|
-
break;
|
|
1091
|
-
default:
|
|
1092
|
-
offsets = {
|
|
1093
|
-
x: reference.x,
|
|
1094
|
-
y: reference.y
|
|
1095
|
-
};
|
|
1096
|
-
}
|
|
1097
|
-
const mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;
|
|
1098
|
-
if (mainAxis != null) {
|
|
1099
|
-
const len = mainAxis === 'y' ? 'height' : 'width';
|
|
1100
|
-
switch (variation) {
|
|
1101
|
-
case start:
|
|
1102
|
-
offsets[mainAxis] = Math.floor(offsets[mainAxis]) - Math.floor(reference[len] / 2 - element[len] / 2);
|
|
1103
|
-
break;
|
|
1104
|
-
case end:
|
|
1105
|
-
offsets[mainAxis] = Math.floor(offsets[mainAxis]) + Math.ceil(reference[len] / 2 - element[len] / 2);
|
|
1106
|
-
break;
|
|
1107
|
-
}
|
|
1108
|
-
}
|
|
1109
|
-
return offsets;
|
|
1110
|
-
}
|
|
1111
|
-
|
|
1112
|
-
/**
|
|
1113
|
-
*
|
|
1114
|
-
*/
|
|
1115
|
-
function getFreshSideObject() {
|
|
1116
|
-
return {
|
|
1117
|
-
top: 0,
|
|
1118
|
-
right: 0,
|
|
1119
|
-
bottom: 0,
|
|
1120
|
-
left: 0
|
|
1121
|
-
};
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1124
|
-
/**
|
|
1125
|
-
* @param paddingObject
|
|
1126
|
-
*/
|
|
1127
|
-
function mergePaddingObject(paddingObject) {
|
|
1128
|
-
return Object.assign(Object.assign({}, getFreshSideObject()), paddingObject);
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
|
-
// @ts-nocheck
|
|
1132
|
-
/**
|
|
1133
|
-
* @param value
|
|
1134
|
-
* @param keys
|
|
1135
|
-
*/
|
|
1136
|
-
function expandToHashMap(value, keys) {
|
|
1137
|
-
return keys.reduce((hashMap, key) => {
|
|
1138
|
-
hashMap[key] = value;
|
|
1139
|
-
return hashMap;
|
|
1140
|
-
}, {});
|
|
1141
|
-
}
|
|
1142
|
-
|
|
1143
|
-
/**
|
|
1144
|
-
* @param state
|
|
1145
|
-
* @param options
|
|
1146
|
-
*/
|
|
1147
|
-
function detectOverflow(state, options = {}) {
|
|
1148
|
-
const { placement = state.placement, boundary = clippingParents, rootBoundary = viewport, elementContext = popper, altBoundary = false, padding = 0 } = options;
|
|
1149
|
-
const paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
|
|
1150
|
-
const altContext = elementContext === popper ? reference : popper;
|
|
1151
|
-
const referenceElement = state.elements.reference;
|
|
1152
|
-
const popperRect = state.rects.popper;
|
|
1153
|
-
const element = state.elements[altBoundary ? altContext : elementContext];
|
|
1154
|
-
const clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);
|
|
1155
|
-
const referenceClientRect = getBoundingClientRect(referenceElement);
|
|
1156
|
-
const popperOffsets = computeOffsets({
|
|
1157
|
-
reference: referenceClientRect,
|
|
1158
|
-
element: popperRect,
|
|
1159
|
-
placement
|
|
1160
|
-
});
|
|
1161
|
-
const popperClientRect = rectToClientRect(Object.assign(Object.assign({}, popperRect), popperOffsets));
|
|
1162
|
-
const elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect;
|
|
1163
|
-
// positive = overflowing the clipping rect
|
|
1164
|
-
// 0 or negative = within the clipping rect
|
|
1165
|
-
const overflowOffsets = {
|
|
1166
|
-
top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
|
|
1167
|
-
bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
|
|
1168
|
-
left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
|
|
1169
|
-
right: elementClientRect.right - clippingClientRect.right + paddingObject.right
|
|
1170
|
-
};
|
|
1171
|
-
const offsetData = state.modifiersData.offset;
|
|
1172
|
-
// Offsets can be applied only to the popper element
|
|
1173
|
-
if (elementContext === popper && offsetData) {
|
|
1174
|
-
const offset = offsetData[placement];
|
|
1175
|
-
Object.keys(overflowOffsets).forEach(key => {
|
|
1176
|
-
const multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;
|
|
1177
|
-
const axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';
|
|
1178
|
-
overflowOffsets[key] += offset[axis] * multiply;
|
|
1179
|
-
});
|
|
1180
|
-
}
|
|
1181
|
-
return overflowOffsets;
|
|
1182
|
-
}
|
|
1183
|
-
|
|
1184
|
-
const DEFAULT_OPTIONS = {
|
|
1185
|
-
placement: 'bottom',
|
|
1186
|
-
modifiers: [],
|
|
1187
|
-
strategy: 'absolute'
|
|
1188
|
-
};
|
|
1189
|
-
/**
|
|
1190
|
-
* @param args
|
|
1191
|
-
*/
|
|
1192
|
-
function areValidElements(...args) {
|
|
1193
|
-
return !args.some(element => !(element && typeof element.getBoundingClientRect === 'function'));
|
|
1194
|
-
}
|
|
1195
|
-
/**
|
|
1196
|
-
* @param generatorOptions
|
|
1197
|
-
*/
|
|
1198
|
-
function popperGenerator(generatorOptions = {}) {
|
|
1199
|
-
const { defaultModifiers = [], defaultOptions = DEFAULT_OPTIONS } = generatorOptions;
|
|
1200
|
-
return function createPopper(reference, popper, options = defaultOptions) {
|
|
1201
|
-
let state = {
|
|
1202
|
-
placement: 'bottom',
|
|
1203
|
-
orderedModifiers: [],
|
|
1204
|
-
options: Object.assign(Object.assign({}, DEFAULT_OPTIONS), defaultOptions),
|
|
1205
|
-
modifiersData: {},
|
|
1206
|
-
elements: {
|
|
1207
|
-
reference,
|
|
1208
|
-
popper
|
|
1209
|
-
},
|
|
1210
|
-
attributes: {},
|
|
1211
|
-
styles: {}
|
|
1212
|
-
};
|
|
1213
|
-
let effectCleanupFns = [];
|
|
1214
|
-
let isDestroyed = false;
|
|
1215
|
-
const instance = {
|
|
1216
|
-
state,
|
|
1217
|
-
setOptions(options) {
|
|
1218
|
-
cleanupModifierEffects();
|
|
1219
|
-
state.options = Object.assign(Object.assign(Object.assign({}, defaultOptions), state.options), options);
|
|
1220
|
-
state.scrollParents = {
|
|
1221
|
-
reference: isElement(reference)
|
|
1222
|
-
? listScrollParents(reference)
|
|
1223
|
-
: reference.contextElement
|
|
1224
|
-
? listScrollParents(reference.contextElement)
|
|
1225
|
-
: [],
|
|
1226
|
-
popper: listScrollParents(popper)
|
|
1227
|
-
};
|
|
1228
|
-
// Orders the modifiers based on their dependencies and `phase`
|
|
1229
|
-
// properties
|
|
1230
|
-
const orderedModifiers = orderModifiers(mergeByName([...defaultModifiers, ...state.options.modifiers]));
|
|
1231
|
-
// Strip out disabled modifiers
|
|
1232
|
-
state.orderedModifiers = orderedModifiers.filter(m => m.enabled);
|
|
1233
|
-
runModifierEffects();
|
|
1234
|
-
return instance.update();
|
|
1235
|
-
},
|
|
1236
|
-
// Sync update – it will always be executed, even if not necessary. This
|
|
1237
|
-
// is useful for low frequency updates where sync behavior simplifies the
|
|
1238
|
-
// logic.
|
|
1239
|
-
// For high frequency updates (e.g. `resize` and `scroll` events), always
|
|
1240
|
-
// prefer the async Popper#update method
|
|
1241
|
-
forceUpdate() {
|
|
1242
|
-
if (isDestroyed) {
|
|
1243
|
-
return;
|
|
1244
|
-
}
|
|
1245
|
-
const { reference, popper } = state.elements;
|
|
1246
|
-
// Don't proceed if `reference` or `popper` are not valid elements
|
|
1247
|
-
// anymore
|
|
1248
|
-
if (!areValidElements(reference, popper)) {
|
|
1249
|
-
return;
|
|
1250
|
-
}
|
|
1251
|
-
// Store the reference and popper rects to be read by modifiers
|
|
1252
|
-
state.rects = {
|
|
1253
|
-
reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),
|
|
1254
|
-
popper: getLayoutRect(popper)
|
|
1255
|
-
};
|
|
1256
|
-
// Modifiers have the ability to reset the current update cycle. The
|
|
1257
|
-
// most common use case for this is the `flip` modifier changing the
|
|
1258
|
-
// placement, which then needs to re-run all the modifiers, because the
|
|
1259
|
-
// logic was previously ran for the previous placement and is therefore
|
|
1260
|
-
// stale/incorrect
|
|
1261
|
-
state.reset = false;
|
|
1262
|
-
state.placement = state.options.placement;
|
|
1263
|
-
// On each update cycle, the `modifiersData` property for each modifier
|
|
1264
|
-
// is filled with the initial data specified by the modifier. This means
|
|
1265
|
-
// it doesn't persist and is fresh on each update.
|
|
1266
|
-
// To ensure persistent data, use `${name}#persistent`
|
|
1267
|
-
state.orderedModifiers.forEach(modifier => (state.modifiersData[modifier.name] = Object.assign({}, modifier.data)));
|
|
1268
|
-
for (let index = 0; index < state.orderedModifiers.length; index++) {
|
|
1269
|
-
if (state.reset === true) {
|
|
1270
|
-
state.reset = false;
|
|
1271
|
-
index = -1;
|
|
1272
|
-
continue;
|
|
1273
|
-
}
|
|
1274
|
-
const { fn, options = {}, name } = state.orderedModifiers[index];
|
|
1275
|
-
if (typeof fn === 'function') {
|
|
1276
|
-
state = fn({ state, options, name, instance }) || state;
|
|
1277
|
-
}
|
|
1278
|
-
}
|
|
1279
|
-
},
|
|
1280
|
-
// Async and optimistically optimized update – it will not be executed if
|
|
1281
|
-
// not necessary (debounced to run at most once-per-tick)
|
|
1282
|
-
update: debounce(() => new Promise(resolve => {
|
|
1283
|
-
instance.forceUpdate();
|
|
1284
|
-
resolve(state);
|
|
1285
|
-
})),
|
|
1286
|
-
destroy() {
|
|
1287
|
-
cleanupModifierEffects();
|
|
1288
|
-
isDestroyed = true;
|
|
1289
|
-
}
|
|
1290
|
-
};
|
|
1291
|
-
if (!areValidElements(reference, popper)) {
|
|
1292
|
-
return instance;
|
|
1293
|
-
}
|
|
1294
|
-
instance.setOptions(options).then(state => {
|
|
1295
|
-
if (!isDestroyed && options.onFirstUpdate) {
|
|
1296
|
-
options.onFirstUpdate(state);
|
|
1297
|
-
}
|
|
1298
|
-
});
|
|
1299
|
-
// Modifiers have the ability to execute arbitrary code before the first
|
|
1300
|
-
// update cycle runs. They will be executed in the same order as the update
|
|
1301
|
-
// cycle. This is useful when a modifier adds some persistent data that
|
|
1302
|
-
// other modifiers need to use, but the modifier is run after the dependent
|
|
1303
|
-
// one.
|
|
1304
|
-
/**
|
|
1305
|
-
*
|
|
1306
|
-
*/
|
|
1307
|
-
function runModifierEffects() {
|
|
1308
|
-
state.orderedModifiers.forEach(({ name, options = {}, effect }) => {
|
|
1309
|
-
if (typeof effect === 'function') {
|
|
1310
|
-
const cleanupFn = effect({ state, name, instance, options });
|
|
1311
|
-
const noopFn = () => { };
|
|
1312
|
-
effectCleanupFns.push(cleanupFn || noopFn);
|
|
1313
|
-
}
|
|
1314
|
-
});
|
|
1315
|
-
}
|
|
1316
|
-
/**
|
|
1317
|
-
*
|
|
1318
|
-
*/
|
|
1319
|
-
function cleanupModifierEffects() {
|
|
1320
|
-
effectCleanupFns.forEach(fn => fn());
|
|
1321
|
-
effectCleanupFns = [];
|
|
1322
|
-
}
|
|
1323
|
-
return instance;
|
|
1324
|
-
};
|
|
1325
|
-
}
|
|
1326
|
-
popperGenerator();
|
|
1327
|
-
|
|
1328
|
-
const passive = { passive: true };
|
|
1329
|
-
/**
|
|
1330
|
-
*
|
|
1331
|
-
*/
|
|
1332
|
-
function effect$2({ state, instance, options }) {
|
|
1333
|
-
const { scroll = true, resize = true } = options;
|
|
1334
|
-
const window = getWindow(state.elements.popper);
|
|
1335
|
-
const scrollParents = [...state.scrollParents.reference, ...state.scrollParents.popper];
|
|
1336
|
-
if (scroll) {
|
|
1337
|
-
scrollParents.forEach(scrollParent => {
|
|
1338
|
-
scrollParent.addEventListener('scroll', instance.update, passive);
|
|
1339
|
-
});
|
|
1340
|
-
}
|
|
1341
|
-
if (resize) {
|
|
1342
|
-
window.addEventListener('resize', instance.update, passive);
|
|
1343
|
-
}
|
|
1344
|
-
return () => {
|
|
1345
|
-
if (scroll) {
|
|
1346
|
-
scrollParents.forEach(scrollParent => {
|
|
1347
|
-
scrollParent.removeEventListener('scroll', instance.update, passive);
|
|
1348
|
-
});
|
|
1349
|
-
}
|
|
1350
|
-
if (resize) {
|
|
1351
|
-
window.removeEventListener('resize', instance.update, passive);
|
|
1352
|
-
}
|
|
1353
|
-
};
|
|
1354
|
-
}
|
|
1355
|
-
const eventListeners = {
|
|
1356
|
-
name: 'eventListeners',
|
|
1357
|
-
enabled: true,
|
|
1358
|
-
phase: 'write',
|
|
1359
|
-
fn: () => { },
|
|
1360
|
-
effect: effect$2,
|
|
1361
|
-
data: {}
|
|
1362
|
-
};
|
|
1363
|
-
|
|
1364
|
-
/**
|
|
1365
|
-
*
|
|
1366
|
-
*/
|
|
1367
|
-
function popperOffsets({ state, name }) {
|
|
1368
|
-
// Offsets are the actual position the popper needs to have to be
|
|
1369
|
-
// properly positioned near its reference element
|
|
1370
|
-
// This is the most basic placement, and will be adjusted by
|
|
1371
|
-
// the modifiers in the next step
|
|
1372
|
-
state.modifiersData[name] = computeOffsets({
|
|
1373
|
-
reference: state.rects.reference,
|
|
1374
|
-
element: state.rects.popper,
|
|
1375
|
-
placement: state.placement
|
|
1376
|
-
});
|
|
1377
|
-
}
|
|
1378
|
-
const popperOffsets$1 = {
|
|
1379
|
-
name: 'popperOffsets',
|
|
1380
|
-
enabled: true,
|
|
1381
|
-
phase: 'read',
|
|
1382
|
-
fn: popperOffsets,
|
|
1383
|
-
data: {}
|
|
1384
|
-
};
|
|
1385
|
-
|
|
1386
|
-
const unsetSides = {
|
|
1387
|
-
top: 'auto',
|
|
1388
|
-
right: 'auto',
|
|
1389
|
-
bottom: 'auto',
|
|
1390
|
-
left: 'auto'
|
|
1391
|
-
};
|
|
1392
|
-
// Round the offsets to the nearest suitable subpixel based on the DPR.
|
|
1393
|
-
// Zooming can change the DPR, but it seems to report a value that will
|
|
1394
|
-
// cleanly divide the values into the appropriate subpixels.
|
|
1395
|
-
/**
|
|
1396
|
-
*
|
|
1397
|
-
*/
|
|
1398
|
-
function roundOffsets({ x, y }) {
|
|
1399
|
-
const win = window;
|
|
1400
|
-
const dpr = win.devicePixelRatio || 1;
|
|
1401
|
-
return {
|
|
1402
|
-
x: Math.round(x * dpr) / dpr || 0,
|
|
1403
|
-
y: Math.round(y * dpr) / dpr || 0
|
|
1404
|
-
};
|
|
1405
|
-
}
|
|
1406
|
-
/**
|
|
1407
|
-
*
|
|
1408
|
-
*/
|
|
1409
|
-
function mapToStyles({ popper, popperRect, placement, offsets, position, gpuAcceleration, adaptive }) {
|
|
1410
|
-
let { x, y } = roundOffsets(offsets);
|
|
1411
|
-
const hasX = offsets.hasOwnProperty('x');
|
|
1412
|
-
const hasY = offsets.hasOwnProperty('y');
|
|
1413
|
-
let sideX = left;
|
|
1414
|
-
let sideY = top;
|
|
1415
|
-
const win = window;
|
|
1416
|
-
if (adaptive) {
|
|
1417
|
-
let offsetParent = getOffsetParent(popper);
|
|
1418
|
-
if (offsetParent === getWindow(popper)) {
|
|
1419
|
-
offsetParent = getDocumentElement(popper);
|
|
1420
|
-
}
|
|
1421
|
-
// $FlowFixMe: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it
|
|
1422
|
-
/* :: offsetParent = (offsetParent: Element); */
|
|
1423
|
-
if (placement === top) {
|
|
1424
|
-
sideY = bottom;
|
|
1425
|
-
y -= offsetParent.clientHeight - popperRect.height;
|
|
1426
|
-
y *= gpuAcceleration ? 1 : -1;
|
|
1427
|
-
}
|
|
1428
|
-
if (placement === left) {
|
|
1429
|
-
sideX = right;
|
|
1430
|
-
x -= offsetParent.clientWidth - popperRect.width;
|
|
1431
|
-
x *= gpuAcceleration ? 1 : -1;
|
|
1432
|
-
}
|
|
1433
|
-
}
|
|
1434
|
-
const commonStyles = Object.assign({ position }, (adaptive && unsetSides));
|
|
1435
|
-
if (gpuAcceleration) {
|
|
1436
|
-
return Object.assign(Object.assign({}, commonStyles), { [sideY]: hasY ? '0' : '', [sideX]: hasX ? '0' : '',
|
|
1437
|
-
// Layer acceleration can disable subpixel rendering which causes slightly
|
|
1438
|
-
// blurry text on low PPI displays, so we want to use 2D transforms
|
|
1439
|
-
// instead
|
|
1440
|
-
transform: (win.devicePixelRatio || 1) < 2 ? `translate(${x}px, ${y}px)` : `translate3d(${x}px, ${y}px, 0)` });
|
|
1441
|
-
}
|
|
1442
|
-
return Object.assign(Object.assign({}, commonStyles), { [sideY]: hasY ? `${y}px` : '', [sideX]: hasX ? `${x}px` : '', transform: '' });
|
|
1443
|
-
}
|
|
1444
|
-
/**
|
|
1445
|
-
*
|
|
1446
|
-
*/
|
|
1447
|
-
function computeStyles({ state, options }) {
|
|
1448
|
-
const { gpuAcceleration = true, adaptive = true } = options;
|
|
1449
|
-
const commonStyles = {
|
|
1450
|
-
placement: getBasePlacement(state.placement),
|
|
1451
|
-
popper: state.elements.popper,
|
|
1452
|
-
popperRect: state.rects.popper,
|
|
1453
|
-
gpuAcceleration
|
|
1454
|
-
};
|
|
1455
|
-
if (state.modifiersData.popperOffsets != null) {
|
|
1456
|
-
state.styles.popper = Object.assign(Object.assign({}, state.styles.popper), mapToStyles(Object.assign(Object.assign({}, commonStyles), { offsets: state.modifiersData.popperOffsets, position: state.options.strategy, adaptive })));
|
|
1457
|
-
}
|
|
1458
|
-
if (state.modifiersData.arrow != null) {
|
|
1459
|
-
state.styles.arrow = Object.assign(Object.assign({}, state.styles.arrow), mapToStyles(Object.assign(Object.assign({}, commonStyles), { offsets: state.modifiersData.arrow, position: 'absolute', adaptive: false })));
|
|
1460
|
-
}
|
|
1461
|
-
state.attributes.popper = Object.assign(Object.assign({}, state.attributes.popper), { 'data-popper-placement': state.placement });
|
|
1462
|
-
}
|
|
1463
|
-
const computeStyles$1 = {
|
|
1464
|
-
name: 'computeStyles',
|
|
1465
|
-
enabled: true,
|
|
1466
|
-
phase: 'beforeWrite',
|
|
1467
|
-
fn: computeStyles,
|
|
1468
|
-
data: {}
|
|
1469
|
-
};
|
|
1470
|
-
|
|
1471
|
-
// This modifier takes the styles prepared by the `computeStyles` modifier
|
|
1472
|
-
// and applies them to the HTMLElements such as popper and arrow
|
|
1473
|
-
/**
|
|
1474
|
-
*
|
|
1475
|
-
*/
|
|
1476
|
-
function applyStyles({ state }) {
|
|
1477
|
-
Object.keys(state.elements).forEach(name => {
|
|
1478
|
-
const style = state.styles[name] || {};
|
|
1479
|
-
const attributes = state.attributes[name] || {};
|
|
1480
|
-
const element = state.elements[name];
|
|
1481
|
-
// arrow is optional + virtual elements
|
|
1482
|
-
if (!isHTMLElement(element) || !getNodeName(element)) {
|
|
1483
|
-
return;
|
|
1484
|
-
}
|
|
1485
|
-
// Flow doesn't support to extend this property, but it's the most
|
|
1486
|
-
// effective way to apply styles to an HTMLElement
|
|
1487
|
-
// $FlowFixMe
|
|
1488
|
-
Object.assign(element.style, style);
|
|
1489
|
-
Object.keys(attributes).forEach(name => {
|
|
1490
|
-
const value = attributes[name];
|
|
1491
|
-
if (value === false) {
|
|
1492
|
-
element.removeAttribute(name);
|
|
1493
|
-
}
|
|
1494
|
-
else {
|
|
1495
|
-
element.setAttribute(name, value === true ? '' : value);
|
|
1496
|
-
}
|
|
1497
|
-
});
|
|
1498
|
-
});
|
|
1499
|
-
}
|
|
1500
|
-
/**
|
|
1501
|
-
*
|
|
1502
|
-
*/
|
|
1503
|
-
function effect$1({ state }) {
|
|
1504
|
-
const initialStyles = {
|
|
1505
|
-
popper: {
|
|
1506
|
-
position: state.options.strategy,
|
|
1507
|
-
left: '0',
|
|
1508
|
-
top: '0',
|
|
1509
|
-
margin: '0'
|
|
1510
|
-
},
|
|
1511
|
-
arrow: {
|
|
1512
|
-
position: 'absolute'
|
|
1513
|
-
},
|
|
1514
|
-
reference: {}
|
|
1515
|
-
};
|
|
1516
|
-
Object.assign(state.elements.popper.style, initialStyles.popper);
|
|
1517
|
-
if (state.elements.arrow) {
|
|
1518
|
-
Object.assign(state.elements.arrow.style, initialStyles.arrow);
|
|
1519
|
-
}
|
|
1520
|
-
return () => {
|
|
1521
|
-
Object.keys(state.elements).forEach(name => {
|
|
1522
|
-
const element = state.elements[name];
|
|
1523
|
-
const attributes = state.attributes[name] || {};
|
|
1524
|
-
const styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]);
|
|
1525
|
-
// Set all values to an empty string to unset them
|
|
1526
|
-
const style = styleProperties.reduce((style, property) => {
|
|
1527
|
-
style[property] = '';
|
|
1528
|
-
return style;
|
|
1529
|
-
}, {});
|
|
1530
|
-
// arrow is optional + virtual elements
|
|
1531
|
-
if (!isHTMLElement(element) || !getNodeName(element)) {
|
|
1532
|
-
return;
|
|
1533
|
-
}
|
|
1534
|
-
// Flow doesn't support to extend this property, but it's the most
|
|
1535
|
-
// effective way to apply styles to an HTMLElement
|
|
1536
|
-
// $FlowFixMe
|
|
1537
|
-
Object.assign(element.style, style);
|
|
1538
|
-
Object.keys(attributes).forEach(attribute => {
|
|
1539
|
-
element.removeAttribute(attribute);
|
|
1540
|
-
});
|
|
1541
|
-
});
|
|
1542
|
-
};
|
|
1543
|
-
}
|
|
1544
|
-
const applyStyles$1 = {
|
|
1545
|
-
name: 'applyStyles',
|
|
1546
|
-
enabled: true,
|
|
1547
|
-
phase: 'write',
|
|
1548
|
-
fn: applyStyles,
|
|
1549
|
-
effect: effect$1,
|
|
1550
|
-
requires: ['computeStyles']
|
|
1551
|
-
};
|
|
1552
|
-
|
|
1553
|
-
/**
|
|
1554
|
-
* @param placement
|
|
1555
|
-
* @param rects
|
|
1556
|
-
* @param offset
|
|
1557
|
-
*/
|
|
1558
|
-
function distanceAndSkiddingToXY(placement, rects, offset) {
|
|
1559
|
-
const basePlacement = getBasePlacement(placement);
|
|
1560
|
-
const invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;
|
|
1561
|
-
let [skidding, distance] = typeof offset === 'function'
|
|
1562
|
-
? offset(Object.assign(Object.assign({}, rects), { placement }))
|
|
1563
|
-
: offset;
|
|
1564
|
-
skidding = skidding || 0;
|
|
1565
|
-
distance = (distance || 0) * invertDistance;
|
|
1566
|
-
return [left, right].indexOf(basePlacement) >= 0 ? { x: distance, y: skidding } : { x: skidding, y: distance };
|
|
1567
|
-
}
|
|
1568
|
-
/**
|
|
1569
|
-
*
|
|
1570
|
-
*/
|
|
1571
|
-
function offset({ state, options, name }) {
|
|
1572
|
-
const { offset = [0, 0] } = options;
|
|
1573
|
-
const data = placements.reduce((acc, placement) => {
|
|
1574
|
-
acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);
|
|
1575
|
-
return acc;
|
|
1576
|
-
}, {});
|
|
1577
|
-
const { x, y } = data[state.placement];
|
|
1578
|
-
if (state.modifiersData.popperOffsets != null) {
|
|
1579
|
-
state.modifiersData.popperOffsets.x += x;
|
|
1580
|
-
state.modifiersData.popperOffsets.y += y;
|
|
1581
|
-
}
|
|
1582
|
-
state.modifiersData[name] = data;
|
|
1583
|
-
}
|
|
1584
|
-
const offset$1 = {
|
|
1585
|
-
name: 'offset',
|
|
1586
|
-
enabled: true,
|
|
1587
|
-
phase: 'main',
|
|
1588
|
-
requires: ['popperOffsets'],
|
|
1589
|
-
fn: offset
|
|
1590
|
-
};
|
|
1591
|
-
|
|
1592
|
-
const hash$2 = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
|
|
1593
|
-
/**
|
|
1594
|
-
* @param placement
|
|
1595
|
-
*/
|
|
1596
|
-
function getOppositePlacement$1(placement) {
|
|
1597
|
-
return placement.replace(/left|right|bottom|top/g, matched => hash$2[matched]);
|
|
1598
|
-
}
|
|
1599
|
-
|
|
1600
|
-
const hash$1 = { start: 'end', end: 'start' };
|
|
1601
|
-
/**
|
|
1602
|
-
* @param placement
|
|
1603
|
-
*/
|
|
1604
|
-
function getOppositeVariationPlacement(placement) {
|
|
1605
|
-
return placement.replace(/start|end/g, matched => hash$1[matched]);
|
|
1606
|
-
}
|
|
1607
|
-
|
|
1608
|
-
/* :: type OverflowsMap = { [ComputedPlacement]: number }; */
|
|
1609
|
-
/* ;; type OverflowsMap = { [key in ComputedPlacement]: number }; */
|
|
1610
|
-
/**
|
|
1611
|
-
* @param state
|
|
1612
|
-
* @param options
|
|
1613
|
-
*/
|
|
1614
|
-
function computeAutoPlacement(state, options = {}) {
|
|
1615
|
-
const { placement, boundary, rootBoundary, padding, flipVariations, allowedAutoPlacements = placements } = options;
|
|
1616
|
-
const variation = getVariation(placement);
|
|
1617
|
-
const placements$1 = variation
|
|
1618
|
-
? flipVariations
|
|
1619
|
-
? variationPlacements
|
|
1620
|
-
: variationPlacements.filter(placement => getVariation(placement) === variation)
|
|
1621
|
-
: basePlacements;
|
|
1622
|
-
// $FlowFixMe
|
|
1623
|
-
let allowedPlacements = placements$1.filter(placement => allowedAutoPlacements.indexOf(placement) >= 0);
|
|
1624
|
-
if (allowedPlacements.length === 0) {
|
|
1625
|
-
allowedPlacements = placements$1;
|
|
1626
|
-
}
|
|
1627
|
-
// $FlowFixMe: Flow seems to have problems with two array unions...
|
|
1628
|
-
const overflows = allowedPlacements.reduce((acc, placement) => {
|
|
1629
|
-
acc[placement] = detectOverflow(state, {
|
|
1630
|
-
placement,
|
|
1631
|
-
boundary,
|
|
1632
|
-
rootBoundary,
|
|
1633
|
-
padding
|
|
1634
|
-
})[getBasePlacement(placement)];
|
|
1635
|
-
return acc;
|
|
1636
|
-
}, {});
|
|
1637
|
-
return Object.keys(overflows).sort((a, b) => overflows[a] - overflows[b]);
|
|
1638
|
-
}
|
|
1639
|
-
|
|
1640
|
-
/**
|
|
1641
|
-
* @param placement
|
|
1642
|
-
*/
|
|
1643
|
-
function getExpandedFallbackPlacements(placement) {
|
|
1644
|
-
if (getBasePlacement(placement) === auto) {
|
|
1645
|
-
return [];
|
|
1646
|
-
}
|
|
1647
|
-
const oppositePlacement = getOppositePlacement$1(placement);
|
|
1648
|
-
return [
|
|
1649
|
-
getOppositeVariationPlacement(placement),
|
|
1650
|
-
oppositePlacement,
|
|
1651
|
-
getOppositeVariationPlacement(oppositePlacement)
|
|
1652
|
-
];
|
|
1653
|
-
}
|
|
1654
|
-
/**
|
|
1655
|
-
*
|
|
1656
|
-
*/
|
|
1657
|
-
function flip({ state, options, name }) {
|
|
1658
|
-
if (state.modifiersData[name]._skip) {
|
|
1659
|
-
return;
|
|
1660
|
-
}
|
|
1661
|
-
const { mainAxis: checkMainAxis = true, altAxis: checkAltAxis = true, fallbackPlacements: specifiedFallbackPlacements, padding, boundary, rootBoundary, altBoundary, flipVariations = true, allowedAutoPlacements } = options;
|
|
1662
|
-
const preferredPlacement = state.options.placement;
|
|
1663
|
-
const basePlacement = getBasePlacement(preferredPlacement);
|
|
1664
|
-
const isBasePlacement = basePlacement === preferredPlacement;
|
|
1665
|
-
const fallbackPlacements = specifiedFallbackPlacements ||
|
|
1666
|
-
(isBasePlacement || !flipVariations
|
|
1667
|
-
? [getOppositePlacement$1(preferredPlacement)]
|
|
1668
|
-
: getExpandedFallbackPlacements(preferredPlacement));
|
|
1669
|
-
const placements = [preferredPlacement, ...fallbackPlacements].reduce((acc, placement) => acc.concat(getBasePlacement(placement) === auto
|
|
1670
|
-
? computeAutoPlacement(state, {
|
|
1671
|
-
placement,
|
|
1672
|
-
boundary,
|
|
1673
|
-
rootBoundary,
|
|
1674
|
-
padding,
|
|
1675
|
-
flipVariations,
|
|
1676
|
-
allowedAutoPlacements
|
|
1677
|
-
})
|
|
1678
|
-
: placement), []);
|
|
1679
|
-
const referenceRect = state.rects.reference;
|
|
1680
|
-
const popperRect = state.rects.popper;
|
|
1681
|
-
const checksMap = new Map();
|
|
1682
|
-
let makeFallbackChecks = true;
|
|
1683
|
-
let firstFittingPlacement = placements[0];
|
|
1684
|
-
for (let i = 0; i < placements.length; i++) {
|
|
1685
|
-
const placement = placements[i];
|
|
1686
|
-
const basePlacement = getBasePlacement(placement);
|
|
1687
|
-
const isStartVariation = getVariation(placement) === start;
|
|
1688
|
-
const isVertical = [top, bottom].indexOf(basePlacement) >= 0;
|
|
1689
|
-
const len = isVertical ? 'width' : 'height';
|
|
1690
|
-
const overflow = detectOverflow(state, {
|
|
1691
|
-
placement,
|
|
1692
|
-
boundary,
|
|
1693
|
-
rootBoundary,
|
|
1694
|
-
altBoundary,
|
|
1695
|
-
padding
|
|
1696
|
-
});
|
|
1697
|
-
let mainVariationSide = isVertical ? (isStartVariation ? right : left) : isStartVariation ? bottom : top;
|
|
1698
|
-
if (referenceRect[len] > popperRect[len]) {
|
|
1699
|
-
mainVariationSide = getOppositePlacement$1(mainVariationSide);
|
|
1700
|
-
}
|
|
1701
|
-
const altVariationSide = getOppositePlacement$1(mainVariationSide);
|
|
1702
|
-
const checks = [];
|
|
1703
|
-
if (checkMainAxis) {
|
|
1704
|
-
checks.push(overflow[basePlacement] <= 0);
|
|
1705
|
-
}
|
|
1706
|
-
if (checkAltAxis) {
|
|
1707
|
-
checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);
|
|
1708
|
-
}
|
|
1709
|
-
if (checks.every(check => check)) {
|
|
1710
|
-
firstFittingPlacement = placement;
|
|
1711
|
-
makeFallbackChecks = false;
|
|
1712
|
-
break;
|
|
1713
|
-
}
|
|
1714
|
-
checksMap.set(placement, checks);
|
|
1715
|
-
}
|
|
1716
|
-
if (makeFallbackChecks) {
|
|
1717
|
-
// `2` may be desired in some cases – research later
|
|
1718
|
-
const numberOfChecks = flipVariations ? 3 : 1;
|
|
1719
|
-
for (let i = numberOfChecks; i > 0; i--) {
|
|
1720
|
-
const fittingPlacement = placements.find(placement => {
|
|
1721
|
-
const checks = checksMap.get(placement);
|
|
1722
|
-
if (checks) {
|
|
1723
|
-
return checks.slice(0, i).every(check => check);
|
|
1724
|
-
}
|
|
1725
|
-
});
|
|
1726
|
-
if (fittingPlacement) {
|
|
1727
|
-
firstFittingPlacement = fittingPlacement;
|
|
1728
|
-
break;
|
|
1729
|
-
}
|
|
1730
|
-
}
|
|
1731
|
-
}
|
|
1732
|
-
if (state.placement !== firstFittingPlacement) {
|
|
1733
|
-
state.modifiersData[name]._skip = true;
|
|
1734
|
-
state.placement = firstFittingPlacement;
|
|
1735
|
-
state.reset = true;
|
|
1736
|
-
}
|
|
1737
|
-
}
|
|
1738
|
-
const flip$1 = {
|
|
1739
|
-
name: 'flip',
|
|
1740
|
-
enabled: true,
|
|
1741
|
-
phase: 'main',
|
|
1742
|
-
fn: flip,
|
|
1743
|
-
requiresIfExists: ['offset'],
|
|
1744
|
-
data: { _skip: false }
|
|
1745
|
-
};
|
|
1746
|
-
|
|
1747
|
-
// @ts-nocheck
|
|
1748
|
-
/**
|
|
1749
|
-
* @param axis
|
|
1750
|
-
*/
|
|
1751
|
-
function getAltAxis(axis) {
|
|
1752
|
-
return axis === 'x' ? 'y' : 'x';
|
|
1753
|
-
}
|
|
1754
|
-
|
|
1755
|
-
// @ts-nocheck
|
|
1756
|
-
/**
|
|
1757
|
-
* @param min
|
|
1758
|
-
* @param value
|
|
1759
|
-
* @param max
|
|
1760
|
-
*/
|
|
1761
|
-
function within(min, value, max) {
|
|
1762
|
-
return Math.max(min, Math.min(value, max));
|
|
1763
|
-
}
|
|
1764
|
-
|
|
1765
|
-
// @ts-nocheck
|
|
1766
|
-
/**
|
|
1767
|
-
*
|
|
1768
|
-
*/
|
|
1769
|
-
function preventOverflow({ state, options, name }) {
|
|
1770
|
-
const { mainAxis: checkMainAxis = true, altAxis: checkAltAxis = false, boundary, rootBoundary, altBoundary, padding, tether = true, tetherOffset = 0 } = options;
|
|
1771
|
-
const overflow = detectOverflow(state, {
|
|
1772
|
-
boundary,
|
|
1773
|
-
rootBoundary,
|
|
1774
|
-
padding,
|
|
1775
|
-
altBoundary
|
|
1776
|
-
});
|
|
1777
|
-
const basePlacement = getBasePlacement(state.placement);
|
|
1778
|
-
const variation = getVariation(state.placement);
|
|
1779
|
-
const isBasePlacement = !variation;
|
|
1780
|
-
const mainAxis = getMainAxisFromPlacement(basePlacement);
|
|
1781
|
-
const altAxis = getAltAxis(mainAxis);
|
|
1782
|
-
const popperOffsets = state.modifiersData.popperOffsets;
|
|
1783
|
-
const referenceRect = state.rects.reference;
|
|
1784
|
-
const popperRect = state.rects.popper;
|
|
1785
|
-
const tetherOffsetValue = typeof tetherOffset === 'function'
|
|
1786
|
-
? tetherOffset(Object.assign(Object.assign({}, state.rects), { placement: state.placement }))
|
|
1787
|
-
: tetherOffset;
|
|
1788
|
-
const data = { x: 0, y: 0 };
|
|
1789
|
-
if (!popperOffsets) {
|
|
1790
|
-
return;
|
|
1791
|
-
}
|
|
1792
|
-
if (checkMainAxis) {
|
|
1793
|
-
const mainSide = mainAxis === 'y' ? top : left;
|
|
1794
|
-
const altSide = mainAxis === 'y' ? bottom : right;
|
|
1795
|
-
const len = mainAxis === 'y' ? 'height' : 'width';
|
|
1796
|
-
const offset = popperOffsets[mainAxis];
|
|
1797
|
-
const min = popperOffsets[mainAxis] + overflow[mainSide];
|
|
1798
|
-
const max = popperOffsets[mainAxis] - overflow[altSide];
|
|
1799
|
-
const additive = tether ? -popperRect[len] / 2 : 0;
|
|
1800
|
-
const minLen = variation === start ? referenceRect[len] : popperRect[len];
|
|
1801
|
-
const maxLen = variation === start ? -popperRect[len] : -referenceRect[len];
|
|
1802
|
-
// We need to include the arrow in the calculation so the arrow doesn't go
|
|
1803
|
-
// outside the reference bounds
|
|
1804
|
-
const arrowElement = state.elements.arrow;
|
|
1805
|
-
const arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : { width: 0, height: 0 };
|
|
1806
|
-
const arrowPaddingObject = state.modifiersData['arrow#persistent']
|
|
1807
|
-
? state.modifiersData['arrow#persistent'].padding
|
|
1808
|
-
: getFreshSideObject();
|
|
1809
|
-
const arrowPaddingMin = arrowPaddingObject[mainSide];
|
|
1810
|
-
const arrowPaddingMax = arrowPaddingObject[altSide];
|
|
1811
|
-
// If the reference length is smaller than the arrow length, we don't want
|
|
1812
|
-
// to include its full size in the calculation. If the reference is small
|
|
1813
|
-
// and near the edge of a boundary, the popper can overflow even if the
|
|
1814
|
-
// reference is not overflowing as well (e.g. virtual elements with no
|
|
1815
|
-
// width or height)
|
|
1816
|
-
const arrowLen = within(0, referenceRect[len], arrowRect[len]);
|
|
1817
|
-
const minOffset = isBasePlacement
|
|
1818
|
-
? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - tetherOffsetValue
|
|
1819
|
-
: minLen - arrowLen - arrowPaddingMin - tetherOffsetValue;
|
|
1820
|
-
const maxOffset = isBasePlacement
|
|
1821
|
-
? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + tetherOffsetValue
|
|
1822
|
-
: maxLen + arrowLen + arrowPaddingMax + tetherOffsetValue;
|
|
1823
|
-
const arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
|
|
1824
|
-
const clientOffset = arrowOffsetParent
|
|
1825
|
-
? mainAxis === 'y'
|
|
1826
|
-
? arrowOffsetParent.clientTop || 0
|
|
1827
|
-
: arrowOffsetParent.clientLeft || 0
|
|
1828
|
-
: 0;
|
|
1829
|
-
const offsetModifierValue = state.modifiersData.offset ? state.modifiersData.offset[state.placement][mainAxis] : 0;
|
|
1830
|
-
const tetherMin = popperOffsets[mainAxis] + minOffset - offsetModifierValue - clientOffset;
|
|
1831
|
-
const tetherMax = popperOffsets[mainAxis] + maxOffset - offsetModifierValue;
|
|
1832
|
-
const preventedOffset = within(tether ? Math.min(min, tetherMin) : min, offset, tether ? Math.max(max, tetherMax) : max);
|
|
1833
|
-
popperOffsets[mainAxis] = preventedOffset;
|
|
1834
|
-
data[mainAxis] = preventedOffset - offset;
|
|
1835
|
-
}
|
|
1836
|
-
if (checkAltAxis) {
|
|
1837
|
-
const mainSide = mainAxis === 'x' ? top : left;
|
|
1838
|
-
const altSide = mainAxis === 'x' ? bottom : right;
|
|
1839
|
-
const offset = popperOffsets[altAxis];
|
|
1840
|
-
const min = offset + overflow[mainSide];
|
|
1841
|
-
const max = offset - overflow[altSide];
|
|
1842
|
-
const preventedOffset = within(min, offset, max);
|
|
1843
|
-
popperOffsets[altAxis] = preventedOffset;
|
|
1844
|
-
data[altAxis] = preventedOffset - offset;
|
|
1845
|
-
}
|
|
1846
|
-
state.modifiersData[name] = data;
|
|
1847
|
-
}
|
|
1848
|
-
const preventOverflow$1 = {
|
|
1849
|
-
name: 'preventOverflow',
|
|
1850
|
-
enabled: true,
|
|
1851
|
-
phase: 'main',
|
|
1852
|
-
fn: preventOverflow,
|
|
1853
|
-
requiresIfExists: ['offset']
|
|
1854
|
-
};
|
|
1855
|
-
|
|
1856
|
-
/**
|
|
1857
|
-
*
|
|
1858
|
-
*/
|
|
1859
|
-
function arrow({ state, name }) {
|
|
1860
|
-
const arrowElement = state.elements.arrow;
|
|
1861
|
-
const popperOffsets = state.modifiersData.popperOffsets;
|
|
1862
|
-
const basePlacement = getBasePlacement(state.placement);
|
|
1863
|
-
const axis = getMainAxisFromPlacement(basePlacement);
|
|
1864
|
-
const isVertical = [left, right].indexOf(basePlacement) >= 0;
|
|
1865
|
-
const len = isVertical ? 'height' : 'width';
|
|
1866
|
-
if (!arrowElement || !popperOffsets) {
|
|
1867
|
-
return;
|
|
1868
|
-
}
|
|
1869
|
-
const paddingObject = state.modifiersData[`${name}#persistent`].padding;
|
|
1870
|
-
const arrowRect = getLayoutRect(arrowElement);
|
|
1871
|
-
const minProp = axis === 'y' ? top : left;
|
|
1872
|
-
const maxProp = axis === 'y' ? bottom : right;
|
|
1873
|
-
const endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];
|
|
1874
|
-
const startDiff = popperOffsets[axis] - state.rects.reference[axis];
|
|
1875
|
-
const arrowOffsetParent = getOffsetParent(arrowElement);
|
|
1876
|
-
const clientSize = arrowOffsetParent
|
|
1877
|
-
? axis === 'y'
|
|
1878
|
-
? arrowOffsetParent.clientHeight || 0
|
|
1879
|
-
: arrowOffsetParent.clientWidth || 0
|
|
1880
|
-
: 0;
|
|
1881
|
-
const centerToReference = endDiff / 2 - startDiff / 2;
|
|
1882
|
-
// Make sure the arrow doesn't overflow the popper if the center point is
|
|
1883
|
-
// outside of the popper bounds
|
|
1884
|
-
const min = paddingObject[minProp];
|
|
1885
|
-
const max = clientSize - arrowRect[len] - paddingObject[maxProp];
|
|
1886
|
-
const center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;
|
|
1887
|
-
const offset = within(min, center, max);
|
|
1888
|
-
// Prevents breaking syntax highlighting...
|
|
1889
|
-
const axisProp = axis;
|
|
1890
|
-
state.modifiersData[name] = {
|
|
1891
|
-
[axisProp]: offset,
|
|
1892
|
-
centerOffset: offset - center
|
|
1893
|
-
};
|
|
1894
|
-
}
|
|
1895
|
-
/**
|
|
1896
|
-
*
|
|
1897
|
-
*/
|
|
1898
|
-
function effect({ state, options, name }) {
|
|
1899
|
-
let { element: arrowElement = '[data-popper-arrow]', padding = 0 } = options;
|
|
1900
|
-
if (arrowElement == null) {
|
|
1901
|
-
return;
|
|
1902
|
-
}
|
|
1903
|
-
// CSS selector
|
|
1904
|
-
if (typeof arrowElement === 'string') {
|
|
1905
|
-
arrowElement = state.elements.popper.querySelector(arrowElement);
|
|
1906
|
-
if (!arrowElement) {
|
|
1907
|
-
return;
|
|
1908
|
-
}
|
|
1909
|
-
}
|
|
1910
|
-
if (!contains(state.elements.popper, arrowElement)) {
|
|
1911
|
-
return;
|
|
1912
|
-
}
|
|
1913
|
-
state.elements.arrow = arrowElement;
|
|
1914
|
-
state.modifiersData[`${name}#persistent`] = {
|
|
1915
|
-
padding: mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements))
|
|
1916
|
-
};
|
|
1917
|
-
}
|
|
1918
|
-
const arrow$1 = {
|
|
1919
|
-
name: 'arrow',
|
|
1920
|
-
enabled: true,
|
|
1921
|
-
phase: 'main',
|
|
1922
|
-
fn: arrow,
|
|
1923
|
-
effect,
|
|
1924
|
-
requires: ['popperOffsets'],
|
|
1925
|
-
requiresIfExists: ['preventOverflow']
|
|
1926
|
-
};
|
|
1927
|
-
|
|
1928
|
-
/**
|
|
1929
|
-
* @param overflow
|
|
1930
|
-
* @param rect
|
|
1931
|
-
* @param preventedOffsets
|
|
1932
|
-
*/
|
|
1933
|
-
function getSideOffsets(overflow, rect, preventedOffsets = { x: 0, y: 0 }) {
|
|
1934
|
-
return {
|
|
1935
|
-
top: overflow.top - rect.height - preventedOffsets.y,
|
|
1936
|
-
right: overflow.right - rect.width + preventedOffsets.x,
|
|
1937
|
-
bottom: overflow.bottom - rect.height + preventedOffsets.y,
|
|
1938
|
-
left: overflow.left - rect.width - preventedOffsets.x
|
|
1939
|
-
};
|
|
1940
|
-
}
|
|
1941
|
-
/**
|
|
1942
|
-
* @param overflow
|
|
1943
|
-
*/
|
|
1944
|
-
function isAnySideFullyClipped(overflow) {
|
|
1945
|
-
return [top, right, bottom, left].some(side => overflow[side] >= 0);
|
|
1946
|
-
}
|
|
1947
|
-
/**
|
|
1948
|
-
*
|
|
1949
|
-
*/
|
|
1950
|
-
function hide({ state, name }) {
|
|
1951
|
-
const referenceRect = state.rects.reference;
|
|
1952
|
-
const popperRect = state.rects.popper;
|
|
1953
|
-
const preventedOffsets = state.modifiersData.preventOverflow;
|
|
1954
|
-
const referenceOverflow = detectOverflow(state, {
|
|
1955
|
-
elementContext: 'reference'
|
|
1956
|
-
});
|
|
1957
|
-
const popperAltOverflow = detectOverflow(state, {
|
|
1958
|
-
altBoundary: true
|
|
1959
|
-
});
|
|
1960
|
-
const referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);
|
|
1961
|
-
const popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);
|
|
1962
|
-
const isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);
|
|
1963
|
-
const hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);
|
|
1964
|
-
state.modifiersData[name] = {
|
|
1965
|
-
referenceClippingOffsets,
|
|
1966
|
-
popperEscapeOffsets,
|
|
1967
|
-
isReferenceHidden,
|
|
1968
|
-
hasPopperEscaped
|
|
1969
|
-
};
|
|
1970
|
-
state.attributes.popper = Object.assign(Object.assign({}, state.attributes.popper), { 'data-popper-reference-hidden': isReferenceHidden, 'data-popper-escaped': hasPopperEscaped });
|
|
1971
|
-
}
|
|
1972
|
-
const hide$1 = {
|
|
1973
|
-
name: 'hide',
|
|
1974
|
-
enabled: true,
|
|
1975
|
-
phase: 'main',
|
|
1976
|
-
requiresIfExists: ['preventOverflow'],
|
|
1977
|
-
fn: hide
|
|
1978
|
-
};
|
|
1979
|
-
|
|
1980
|
-
// @ts-nocheck
|
|
1981
|
-
const defaultModifiers = [
|
|
1982
|
-
eventListeners,
|
|
1983
|
-
popperOffsets$1,
|
|
1984
|
-
computeStyles$1,
|
|
1985
|
-
applyStyles$1,
|
|
1986
|
-
offset$1,
|
|
1987
|
-
flip$1,
|
|
1988
|
-
preventOverflow$1,
|
|
1989
|
-
arrow$1,
|
|
1990
|
-
hide$1
|
|
1991
|
-
];
|
|
1992
|
-
const createPopper = popperGenerator({ defaultModifiers });
|
|
1993
|
-
|
|
1994
|
-
/**
|
|
1995
|
-
* Small wrapper around `useLayoutEffect` to get rid of the warning on SSR envs
|
|
1996
|
-
*/
|
|
1997
|
-
const useIsomorphicLayoutEffect = canUseDOM ? reactExports.useLayoutEffect : reactExports.useEffect;
|
|
1998
|
-
|
|
1999
|
-
/* eslint-disable @typescript-eslint/consistent-type-definitions */
|
|
2000
|
-
const isEqual = (a, b) => JSON.stringify(a) === JSON.stringify(b);
|
|
2001
|
-
/**
|
|
2002
|
-
* Simple ponyfill for Object.fromEntries
|
|
2003
|
-
*/
|
|
2004
|
-
const fromEntries = (entries) => entries.reduce((acc, [key, value]) => {
|
|
2005
|
-
acc[key] = value;
|
|
2006
|
-
return acc;
|
|
2007
|
-
}, {});
|
|
2008
|
-
const EMPTY_MODIFIERS = [];
|
|
2009
|
-
const usePopper = (referenceElement, popperElement, options = {}) => {
|
|
2010
|
-
const prevOptions = reactExports.useRef(null);
|
|
2011
|
-
const optionsWithDefaults = {
|
|
2012
|
-
onFirstUpdate: options.onFirstUpdate,
|
|
2013
|
-
placement: options.placement || 'bottom',
|
|
2014
|
-
strategy: options.strategy || 'absolute',
|
|
2015
|
-
modifiers: options.modifiers || EMPTY_MODIFIERS
|
|
2016
|
-
};
|
|
2017
|
-
const [state, setState] = reactExports.useState({
|
|
2018
|
-
styles: {
|
|
2019
|
-
popper: {
|
|
2020
|
-
position: optionsWithDefaults.strategy,
|
|
2021
|
-
left: '0',
|
|
2022
|
-
top: '0'
|
|
2023
|
-
}
|
|
2024
|
-
},
|
|
2025
|
-
attributes: {}
|
|
2026
|
-
});
|
|
2027
|
-
const updateStateModifier = reactExports.useMemo(() => ({
|
|
2028
|
-
name: 'updateState',
|
|
2029
|
-
enabled: true,
|
|
2030
|
-
phase: 'write',
|
|
2031
|
-
// eslint-disable-next-line no-shadow
|
|
2032
|
-
fn: ({ state }) => {
|
|
2033
|
-
const elements = Object.keys(state.elements);
|
|
2034
|
-
setState({
|
|
2035
|
-
styles: fromEntries(elements.map(element => [element, state.styles[element] || {}])),
|
|
2036
|
-
attributes: fromEntries(elements.map(element => [element, state.attributes[element]]))
|
|
2037
|
-
});
|
|
2038
|
-
},
|
|
2039
|
-
requires: ['computeStyles']
|
|
2040
|
-
}), []);
|
|
2041
|
-
const popperOptions = reactExports.useMemo(() => {
|
|
2042
|
-
const newOptions = {
|
|
2043
|
-
onFirstUpdate: optionsWithDefaults.onFirstUpdate,
|
|
2044
|
-
placement: optionsWithDefaults.placement,
|
|
2045
|
-
strategy: optionsWithDefaults.strategy,
|
|
2046
|
-
modifiers: [...optionsWithDefaults.modifiers, updateStateModifier, { name: 'applyStyles', enabled: false }]
|
|
2047
|
-
};
|
|
2048
|
-
if (isEqual(prevOptions.current, newOptions)) {
|
|
2049
|
-
return prevOptions.current || newOptions;
|
|
2050
|
-
}
|
|
2051
|
-
else {
|
|
2052
|
-
prevOptions.current = newOptions;
|
|
2053
|
-
return newOptions;
|
|
2054
|
-
}
|
|
2055
|
-
}, [
|
|
2056
|
-
optionsWithDefaults.onFirstUpdate,
|
|
2057
|
-
optionsWithDefaults.placement,
|
|
2058
|
-
optionsWithDefaults.strategy,
|
|
2059
|
-
optionsWithDefaults.modifiers,
|
|
2060
|
-
updateStateModifier
|
|
2061
|
-
]);
|
|
2062
|
-
const popperInstanceRef = reactExports.useRef(undefined);
|
|
2063
|
-
useIsomorphicLayoutEffect(() => {
|
|
2064
|
-
if (popperInstanceRef && popperInstanceRef.current) {
|
|
2065
|
-
popperInstanceRef.current.setOptions(popperOptions);
|
|
2066
|
-
}
|
|
2067
|
-
}, [popperOptions]);
|
|
2068
|
-
useIsomorphicLayoutEffect(() => {
|
|
2069
|
-
if (referenceElement == null || popperElement == null) {
|
|
2070
|
-
return;
|
|
2071
|
-
}
|
|
2072
|
-
const createPopper$1 = options.createPopper || createPopper;
|
|
2073
|
-
const popperInstance = createPopper$1(referenceElement, popperElement, popperOptions);
|
|
2074
|
-
popperInstanceRef.current = popperInstance;
|
|
2075
|
-
return () => {
|
|
2076
|
-
popperInstance.destroy();
|
|
2077
|
-
popperInstanceRef.current = null;
|
|
2078
|
-
};
|
|
2079
|
-
}, [referenceElement, popperElement, options.createPopper]);
|
|
2080
|
-
return {
|
|
2081
|
-
state: popperInstanceRef.current ? popperInstanceRef.current.state : null,
|
|
2082
|
-
styles: state.styles,
|
|
2083
|
-
attributes: state.attributes,
|
|
2084
|
-
update: popperInstanceRef.current ? popperInstanceRef.current.update : null,
|
|
2085
|
-
forceUpdate: popperInstanceRef.current ? popperInstanceRef.current.forceUpdate : null
|
|
2086
|
-
};
|
|
2087
|
-
};
|
|
2088
|
-
|
|
2089
|
-
const hash = {
|
|
2090
|
-
left: 'right',
|
|
2091
|
-
right: 'left',
|
|
2092
|
-
bottom: 'top',
|
|
2093
|
-
top: 'bottom',
|
|
2094
|
-
'top-start': 'bottom-end',
|
|
2095
|
-
'top-end': 'bottom-start',
|
|
2096
|
-
'bottom-start': 'top-end',
|
|
2097
|
-
'bottom-end': 'top-start',
|
|
2098
|
-
'left-start': 'right-end',
|
|
2099
|
-
'left-end': 'right-start',
|
|
2100
|
-
'right-start': 'left-end',
|
|
2101
|
-
'right-end': 'left-start'
|
|
2102
|
-
};
|
|
2103
|
-
const getOppositePlacement = (placement) => placement.replace(/left|right|bottom|top|top-start|top-end|bottom-start|bottom-end|right-start|right-end|left-start|left-end/g, (matched) => hash[matched]);
|
|
2104
|
-
const getOpacityTransition = (animationDuration) => `opacity ${animationDuration}ms cubic-bezier(.54, 1.5, .38, 1.11)`;
|
|
2105
|
-
const Popper = ({ trigger, popper, direction = 'down', position = 'start', placement, width, minWidth = 'trigger', maxWidth, appendTo = () => document.body, zIndex = 9999, isVisible = true, positionModifiers, distance = 0, onMouseEnter, onMouseLeave, onFocus, onBlur, onDocumentClick, onTriggerClick, onTriggerEnter, onPopperClick, onPopperMouseEnter, onPopperMouseLeave, onDocumentKeyDown, enableFlip = true, flipBehavior = 'flip', triggerRef, popperRef, animationDuration = 0, entryDelay = 0, exitDelay = 0, onHidden = () => { }, onHide = () => { }, onMount = () => { }, onShow = () => { }, onShown = () => { }, preventOverflow = false }) => {
|
|
2106
|
-
var _a;
|
|
2107
|
-
const [triggerElement, setTriggerElement] = reactExports.useState(null);
|
|
2108
|
-
const [refElement, setRefElement] = reactExports.useState(null);
|
|
2109
|
-
const [popperElement, setPopperElement] = reactExports.useState(null);
|
|
2110
|
-
const [popperContent, setPopperContent] = reactExports.useState(null);
|
|
2111
|
-
const [ready, setReady] = reactExports.useState(false);
|
|
2112
|
-
const [opacity, setOpacity] = reactExports.useState(0);
|
|
2113
|
-
const [internalIsVisible, setInternalIsVisible] = reactExports.useState(isVisible);
|
|
2114
|
-
const transitionTimerRef = reactExports.useRef(null);
|
|
2115
|
-
const showTimerRef = reactExports.useRef(null);
|
|
2116
|
-
const hideTimerRef = reactExports.useRef(null);
|
|
2117
|
-
const prevExitDelayRef = reactExports.useRef(undefined);
|
|
2118
|
-
const refOrTrigger = refElement || triggerElement;
|
|
2119
|
-
const showPopper = isVisible || internalIsVisible;
|
|
2120
|
-
const triggerParent = (_a = ((triggerRef === null || triggerRef === void 0 ? void 0 : triggerRef.current) || triggerElement)) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
2121
|
-
const languageDirection = getLanguageDirection(triggerParent);
|
|
2122
|
-
const internalPosition = reactExports.useMemo(() => {
|
|
2123
|
-
const fixedPositions = { left: 'left', right: 'right', center: 'center' };
|
|
2124
|
-
const positionMap = {
|
|
2125
|
-
ltr: Object.assign({ start: 'left', end: 'right' }, fixedPositions),
|
|
2126
|
-
rtl: Object.assign({ start: 'right', end: 'left' }, fixedPositions)
|
|
2127
|
-
};
|
|
2128
|
-
return positionMap[languageDirection][position];
|
|
2129
|
-
}, [position, languageDirection]);
|
|
2130
|
-
const onDocumentClickCallback = reactExports.useCallback((event) => onDocumentClick(event, refOrTrigger, popperElement), [showPopper, triggerElement, refElement, popperElement, onDocumentClick]);
|
|
2131
|
-
reactExports.useEffect(() => {
|
|
2132
|
-
setReady(true);
|
|
2133
|
-
onMount();
|
|
2134
|
-
}, []);
|
|
2135
|
-
// Cancel all timers on unmount
|
|
2136
|
-
reactExports.useEffect(() => () => {
|
|
2137
|
-
clearTimeouts([transitionTimerRef, hideTimerRef, showTimerRef]);
|
|
2138
|
-
}, []);
|
|
2139
|
-
reactExports.useEffect(() => {
|
|
2140
|
-
if (triggerRef) {
|
|
2141
|
-
if (triggerRef.current) {
|
|
2142
|
-
setRefElement(triggerRef.current);
|
|
2143
|
-
}
|
|
2144
|
-
else if (typeof triggerRef === 'function') {
|
|
2145
|
-
setRefElement(triggerRef());
|
|
2146
|
-
}
|
|
2147
|
-
}
|
|
2148
|
-
}, [triggerRef, trigger]);
|
|
2149
|
-
reactExports.useEffect(() => {
|
|
2150
|
-
// When the popperRef is defined or the popper visibility changes, ensure the popper element is up to date
|
|
2151
|
-
if (popperRef) {
|
|
2152
|
-
if (popperRef.current) {
|
|
2153
|
-
setPopperElement(popperRef.current);
|
|
2154
|
-
}
|
|
2155
|
-
else if (typeof popperRef === 'function') {
|
|
2156
|
-
setPopperElement(popperRef());
|
|
2157
|
-
}
|
|
2158
|
-
}
|
|
2159
|
-
}, [showPopper, popperRef]);
|
|
2160
|
-
reactExports.useEffect(() => {
|
|
2161
|
-
// Trigger a Popper update when content changes.
|
|
2162
|
-
const observer = new MutationObserver(() => {
|
|
2163
|
-
update && update();
|
|
2164
|
-
});
|
|
2165
|
-
popperElement && observer.observe(popperElement, { attributes: true, childList: true, subtree: true });
|
|
2166
|
-
return () => {
|
|
2167
|
-
observer.disconnect();
|
|
2168
|
-
};
|
|
2169
|
-
}, [popperElement]);
|
|
2170
|
-
const addEventListener = (listener, element, event, capture = false) => {
|
|
2171
|
-
if (listener && element) {
|
|
2172
|
-
element.addEventListener(event, listener, { capture });
|
|
2173
|
-
}
|
|
2174
|
-
};
|
|
2175
|
-
const removeEventListener = (listener, element, event, capture = false) => {
|
|
2176
|
-
if (listener && element) {
|
|
2177
|
-
element.removeEventListener(event, listener, { capture });
|
|
2178
|
-
}
|
|
2179
|
-
};
|
|
2180
|
-
reactExports.useEffect(() => {
|
|
2181
|
-
addEventListener(onMouseEnter, refOrTrigger, 'mouseenter');
|
|
2182
|
-
addEventListener(onMouseLeave, refOrTrigger, 'mouseleave');
|
|
2183
|
-
addEventListener(onFocus, refOrTrigger, 'focus');
|
|
2184
|
-
addEventListener(onBlur, refOrTrigger, 'blur');
|
|
2185
|
-
addEventListener(onTriggerClick, refOrTrigger, 'click');
|
|
2186
|
-
addEventListener(onTriggerEnter, refOrTrigger, 'keydown');
|
|
2187
|
-
addEventListener(onPopperClick, popperElement, 'click');
|
|
2188
|
-
addEventListener(onPopperMouseEnter, popperElement, 'mouseenter');
|
|
2189
|
-
addEventListener(onPopperMouseLeave, popperElement, 'mouseleave');
|
|
2190
|
-
onDocumentClick && addEventListener(onDocumentClickCallback, document, 'click', true);
|
|
2191
|
-
addEventListener(onDocumentKeyDown, document, 'keydown', true);
|
|
2192
|
-
return () => {
|
|
2193
|
-
removeEventListener(onMouseEnter, refOrTrigger, 'mouseenter');
|
|
2194
|
-
removeEventListener(onMouseLeave, refOrTrigger, 'mouseleave');
|
|
2195
|
-
removeEventListener(onFocus, refOrTrigger, 'focus');
|
|
2196
|
-
removeEventListener(onBlur, refOrTrigger, 'blur');
|
|
2197
|
-
removeEventListener(onTriggerClick, refOrTrigger, 'click');
|
|
2198
|
-
removeEventListener(onTriggerEnter, refOrTrigger, 'keydown');
|
|
2199
|
-
removeEventListener(onPopperClick, popperElement, 'click');
|
|
2200
|
-
removeEventListener(onPopperMouseEnter, popperElement, 'mouseenter');
|
|
2201
|
-
removeEventListener(onPopperMouseLeave, popperElement, 'mouseleave');
|
|
2202
|
-
onDocumentClick && removeEventListener(onDocumentClickCallback, document, 'click', true);
|
|
2203
|
-
removeEventListener(onDocumentKeyDown, document, 'keydown', true);
|
|
2204
|
-
};
|
|
2205
|
-
}, [
|
|
2206
|
-
triggerElement,
|
|
2207
|
-
popperElement,
|
|
2208
|
-
onMouseEnter,
|
|
2209
|
-
onMouseLeave,
|
|
2210
|
-
onFocus,
|
|
2211
|
-
onBlur,
|
|
2212
|
-
onTriggerClick,
|
|
2213
|
-
onTriggerEnter,
|
|
2214
|
-
onPopperClick,
|
|
2215
|
-
onPopperMouseEnter,
|
|
2216
|
-
onPopperMouseLeave,
|
|
2217
|
-
onDocumentClick,
|
|
2218
|
-
onDocumentKeyDown,
|
|
2219
|
-
refElement
|
|
2220
|
-
]);
|
|
2221
|
-
const getPlacement = () => {
|
|
2222
|
-
if (placement) {
|
|
2223
|
-
return placement;
|
|
2224
|
-
}
|
|
2225
|
-
let convertedPlacement = direction === 'up' ? 'top' : 'bottom';
|
|
2226
|
-
if (internalPosition !== 'center') {
|
|
2227
|
-
convertedPlacement = `${convertedPlacement}-${internalPosition === 'right' ? 'end' : 'start'}`;
|
|
2228
|
-
}
|
|
2229
|
-
return convertedPlacement;
|
|
2230
|
-
};
|
|
2231
|
-
const getPlacementMemo = reactExports.useMemo(getPlacement, [direction, internalPosition, placement]);
|
|
2232
|
-
const getOppositePlacementMemo = reactExports.useMemo(() => getOppositePlacement(getPlacement()), [direction, internalPosition, placement]);
|
|
2233
|
-
const widthMods = reactExports.useMemo(() => ({
|
|
2234
|
-
name: 'widthMods',
|
|
2235
|
-
enabled: width !== undefined || minWidth !== undefined || maxWidth !== undefined,
|
|
2236
|
-
phase: 'beforeWrite',
|
|
2237
|
-
requires: ['computeStyles'],
|
|
2238
|
-
fn: ({ state }) => {
|
|
2239
|
-
const triggerWidth = state.rects.reference.width;
|
|
2240
|
-
if (width) {
|
|
2241
|
-
state.styles.popper.width = width === 'trigger' ? `${triggerWidth}px` : width;
|
|
2242
|
-
}
|
|
2243
|
-
if (minWidth) {
|
|
2244
|
-
state.styles.popper.minWidth = minWidth === 'trigger' ? `${triggerWidth}px` : minWidth;
|
|
2245
|
-
}
|
|
2246
|
-
if (maxWidth) {
|
|
2247
|
-
state.styles.popper.maxWidth = maxWidth === 'trigger' ? `${triggerWidth}px` : maxWidth;
|
|
2248
|
-
}
|
|
2249
|
-
},
|
|
2250
|
-
effect: ({ state }) => {
|
|
2251
|
-
const triggerWidth = state.elements.reference.offsetWidth;
|
|
2252
|
-
if (width) {
|
|
2253
|
-
state.elements.popper.style.width = width === 'trigger' ? `${triggerWidth}px` : width;
|
|
2254
|
-
}
|
|
2255
|
-
if (minWidth) {
|
|
2256
|
-
state.elements.popper.style.minWidth = minWidth === 'trigger' ? `${triggerWidth}px` : minWidth;
|
|
2257
|
-
}
|
|
2258
|
-
if (maxWidth) {
|
|
2259
|
-
state.elements.popper.style.maxWidth = maxWidth === 'trigger' ? `${triggerWidth}px` : maxWidth;
|
|
2260
|
-
}
|
|
2261
|
-
return () => { };
|
|
2262
|
-
}
|
|
2263
|
-
}), [width, minWidth, maxWidth]);
|
|
2264
|
-
const { styles: popperStyles, attributes, update, forceUpdate } = usePopper(refOrTrigger, popperElement, {
|
|
2265
|
-
placement: getPlacementMemo,
|
|
2266
|
-
modifiers: [
|
|
2267
|
-
{
|
|
2268
|
-
name: 'offset',
|
|
2269
|
-
options: {
|
|
2270
|
-
offset: [0, distance]
|
|
2271
|
-
}
|
|
2272
|
-
},
|
|
2273
|
-
{
|
|
2274
|
-
name: 'preventOverflow',
|
|
2275
|
-
enabled: preventOverflow
|
|
2276
|
-
},
|
|
2277
|
-
{
|
|
2278
|
-
// adds attribute [data-popper-reference-hidden] to the popper element which can be used to hide it using CSS
|
|
2279
|
-
name: 'hide',
|
|
2280
|
-
enabled: true
|
|
2281
|
-
},
|
|
2282
|
-
{
|
|
2283
|
-
name: 'flip',
|
|
2284
|
-
enabled: getPlacementMemo.startsWith('auto') || enableFlip,
|
|
2285
|
-
options: {
|
|
2286
|
-
fallbackPlacements: flipBehavior === 'flip' ? [getOppositePlacementMemo] : flipBehavior
|
|
2287
|
-
}
|
|
2288
|
-
},
|
|
2289
|
-
widthMods
|
|
2290
|
-
]
|
|
2291
|
-
});
|
|
2292
|
-
/** We want to forceUpdate only when a tooltip's content is dynamically updated.
|
|
2293
|
-
* TODO: Investigate into 3rd party libraries for a less limited/specific solution
|
|
2294
|
-
*/
|
|
2295
|
-
reactExports.useEffect(() => {
|
|
2296
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
2297
|
-
// currentPopperContent = {tooltip children} || {dropdown children}
|
|
2298
|
-
const currentPopperContent = ((_d = (_c = (_b = (_a = popper === null || popper === void 0 ? void 0 : popper.props) === null || _a === void 0 ? void 0 : _a.children) === null || _b === void 0 ? void 0 : _b[1]) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.children) || ((_g = (_f = (_e = popper === null || popper === void 0 ? void 0 : popper.props) === null || _e === void 0 ? void 0 : _e.children) === null || _f === void 0 ? void 0 : _f.props) === null || _g === void 0 ? void 0 : _g.children);
|
|
2299
|
-
setPopperContent(currentPopperContent);
|
|
2300
|
-
if (currentPopperContent && popperContent && currentPopperContent !== popperContent) {
|
|
2301
|
-
forceUpdate && forceUpdate();
|
|
2302
|
-
}
|
|
2303
|
-
}, [popper]);
|
|
2304
|
-
reactExports.useEffect(() => {
|
|
2305
|
-
if (prevExitDelayRef.current < exitDelay) {
|
|
2306
|
-
clearTimeouts([transitionTimerRef, hideTimerRef]);
|
|
2307
|
-
hideTimerRef.current = setTimeout(() => {
|
|
2308
|
-
transitionTimerRef.current = setTimeout(() => {
|
|
2309
|
-
setInternalIsVisible(false);
|
|
2310
|
-
}, animationDuration);
|
|
2311
|
-
}, exitDelay);
|
|
2312
|
-
}
|
|
2313
|
-
prevExitDelayRef.current = exitDelay;
|
|
2314
|
-
}, [exitDelay]);
|
|
2315
|
-
const show = () => {
|
|
2316
|
-
onShow();
|
|
2317
|
-
clearTimeouts([transitionTimerRef, hideTimerRef]);
|
|
2318
|
-
showTimerRef.current = setTimeout(() => {
|
|
2319
|
-
setInternalIsVisible(true);
|
|
2320
|
-
setOpacity(1);
|
|
2321
|
-
onShown();
|
|
2322
|
-
}, entryDelay);
|
|
2323
|
-
};
|
|
2324
|
-
const hide = () => {
|
|
2325
|
-
onHide();
|
|
2326
|
-
clearTimeouts([showTimerRef]);
|
|
2327
|
-
hideTimerRef.current = setTimeout(() => {
|
|
2328
|
-
setOpacity(0);
|
|
2329
|
-
transitionTimerRef.current = setTimeout(() => {
|
|
2330
|
-
setInternalIsVisible(false);
|
|
2331
|
-
onHidden();
|
|
2332
|
-
}, animationDuration);
|
|
2333
|
-
}, exitDelay);
|
|
2334
|
-
};
|
|
2335
|
-
reactExports.useEffect(() => {
|
|
2336
|
-
if (isVisible) {
|
|
2337
|
-
show();
|
|
2338
|
-
}
|
|
2339
|
-
else {
|
|
2340
|
-
hide();
|
|
2341
|
-
}
|
|
2342
|
-
}, [isVisible]);
|
|
2343
|
-
// Returns the CSS modifier class in order to place the Popper's arrow properly
|
|
2344
|
-
// Depends on the position of the Popper relative to the reference element
|
|
2345
|
-
const modifierFromPopperPosition = () => {
|
|
2346
|
-
if (attributes && attributes.popper && attributes.popper['data-popper-placement']) {
|
|
2347
|
-
const popperPlacement = attributes.popper['data-popper-placement'];
|
|
2348
|
-
return positionModifiers[popperPlacement];
|
|
2349
|
-
}
|
|
2350
|
-
return positionModifiers.top;
|
|
2351
|
-
};
|
|
2352
|
-
const options = Object.assign({ className: css(popper.props && popper.props.className, positionModifiers && modifierFromPopperPosition()), style: Object.assign(Object.assign(Object.assign({}, ((popper.props && popper.props.style) || {})), popperStyles.popper), { zIndex,
|
|
2353
|
-
opacity, transition: getOpacityTransition(animationDuration) }) }, attributes.popper);
|
|
2354
|
-
const getMenuWithPopper = () => {
|
|
2355
|
-
const localPopper = reactExports.cloneElement(popper, options);
|
|
2356
|
-
return popperRef ? (localPopper) : (jsxRuntimeExports.jsx("div", { style: { display: 'contents' }, ref: (node) => {
|
|
2357
|
-
setPopperElement(node === null || node === void 0 ? void 0 : node.firstElementChild);
|
|
2358
|
-
}, children: localPopper }));
|
|
2359
|
-
};
|
|
2360
|
-
const getPopper = () => {
|
|
2361
|
-
if (appendTo === 'inline') {
|
|
2362
|
-
return getMenuWithPopper();
|
|
2363
|
-
}
|
|
2364
|
-
else {
|
|
2365
|
-
const target = typeof appendTo === 'function' ? appendTo() : appendTo;
|
|
2366
|
-
return reactDomExports.createPortal(getMenuWithPopper(), target);
|
|
2367
|
-
}
|
|
2368
|
-
};
|
|
2369
|
-
return (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [!triggerRef && trigger && reactExports.isValidElement(trigger) && (jsxRuntimeExports.jsx("div", { style: { display: 'contents' }, ref: (node) => {
|
|
2370
|
-
setTriggerElement(node === null || node === void 0 ? void 0 : node.firstElementChild);
|
|
2371
|
-
}, children: trigger })), triggerRef && trigger && reactExports.isValidElement(trigger) && trigger, ready && showPopper && getPopper()] }));
|
|
2372
|
-
};
|
|
2373
|
-
Popper.displayName = 'Popper';
|
|
2374
|
-
|
|
2375
|
-
/**
|
|
2376
|
-
* This function is a helper for handling basic arrow keyboard interactions. If a component already has its own key handler and event start up/tear down, this function may be easier to integrate in over the full component.
|
|
2377
|
-
*
|
|
2378
|
-
* @param {event} event Event triggered by the keyboard
|
|
2379
|
-
* @param {element[]} navigableElements Valid traversable elements of the container
|
|
2380
|
-
* @param {function} isActiveElement Callback to determine if a given element from the navigable elements array is the active element of the page
|
|
2381
|
-
* @param {function} getFocusableElement Callback returning the focusable element of a given element from the navigable elements array
|
|
2382
|
-
* @param {string[]} validSiblingTags Valid sibling tags that horizontal arrow handling will focus
|
|
2383
|
-
* @param {boolean} noVerticalArrowHandling Flag indicating that the included vertical arrow key handling should be ignored
|
|
2384
|
-
* @param {boolean} noHorizontalArrowHandling Flag indicating that the included horizontal arrow key handling should be ignored
|
|
2385
|
-
* @param {boolean} updateTabIndex Flag indicating that the tabIndex of the currently focused element and next focused element should be updated, in the case of using a roving tabIndex
|
|
2386
|
-
* @param {boolean} onlyTraverseSiblings Flag indicating that next focusable element of a horizontal movement will be this element's sibling
|
|
2387
|
-
*/
|
|
2388
|
-
const handleArrows = (event, navigableElements, isActiveElement = (element) => document.activeElement.contains(element), getFocusableElement = (element) => element, validSiblingTags = ['A', 'BUTTON', 'INPUT'], noVerticalArrowHandling = false, noHorizontalArrowHandling = false, updateTabIndex = true, onlyTraverseSiblings = true) => {
|
|
2389
|
-
const activeElement = document.activeElement;
|
|
2390
|
-
const key = event.key;
|
|
2391
|
-
let moveTarget = null;
|
|
2392
|
-
// Handle vertical arrow keys. If noVerticalArrowHandling is passed, skip this block
|
|
2393
|
-
if (!noVerticalArrowHandling) {
|
|
2394
|
-
if (['ArrowUp', 'ArrowDown'].includes(key)) {
|
|
2395
|
-
event.preventDefault();
|
|
2396
|
-
event.stopImmediatePropagation(); // For menus in menus
|
|
2397
|
-
// Traverse navigableElements to find the element which is currently active
|
|
2398
|
-
let currentIndex = -1;
|
|
2399
|
-
// while (currentIndex === -1) {
|
|
2400
|
-
navigableElements.forEach((element, index) => {
|
|
2401
|
-
if (isActiveElement(element)) {
|
|
2402
|
-
// Once found, move up or down the array by 1. Determined by the vertical arrow key direction
|
|
2403
|
-
let increment = 0;
|
|
2404
|
-
// keep increasing the increment until you've tried the whole navigableElement
|
|
2405
|
-
while (!moveTarget && increment < navigableElements.length && increment * -1 < navigableElements.length) {
|
|
2406
|
-
key === 'ArrowUp' ? increment-- : increment++;
|
|
2407
|
-
currentIndex = index + increment;
|
|
2408
|
-
if (currentIndex >= navigableElements.length) {
|
|
2409
|
-
currentIndex = 0;
|
|
2410
|
-
}
|
|
2411
|
-
if (currentIndex < 0) {
|
|
2412
|
-
currentIndex = navigableElements.length - 1;
|
|
2413
|
-
}
|
|
2414
|
-
// Set the next target element (undefined if none found)
|
|
2415
|
-
moveTarget = getFocusableElement(navigableElements[currentIndex]);
|
|
2416
|
-
}
|
|
2417
|
-
}
|
|
2418
|
-
});
|
|
2419
|
-
// }
|
|
2420
|
-
}
|
|
2421
|
-
}
|
|
2422
|
-
// Handle horizontal arrow keys. If noHorizontalArrowHandling is passed, skip this block
|
|
2423
|
-
if (!noHorizontalArrowHandling) {
|
|
2424
|
-
if (['ArrowLeft', 'ArrowRight'].includes(key)) {
|
|
2425
|
-
event.preventDefault();
|
|
2426
|
-
event.stopImmediatePropagation(); // For menus in menus
|
|
2427
|
-
let currentIndex = -1;
|
|
2428
|
-
navigableElements.forEach((element, index) => {
|
|
2429
|
-
if (isActiveElement(element)) {
|
|
2430
|
-
const activeRow = navigableElements[index].querySelectorAll(validSiblingTags.join(',')); // all focusable elements in my row
|
|
2431
|
-
if (!activeRow.length || onlyTraverseSiblings) {
|
|
2432
|
-
let nextSibling = activeElement;
|
|
2433
|
-
while (nextSibling) {
|
|
2434
|
-
const isDirectChildOfNavigableElement = nextSibling.parentElement === element;
|
|
2435
|
-
const nextSiblingMainElement = isDirectChildOfNavigableElement ? nextSibling : nextSibling.parentElement;
|
|
2436
|
-
nextSibling =
|
|
2437
|
-
key === 'ArrowLeft'
|
|
2438
|
-
? nextSiblingMainElement.previousElementSibling
|
|
2439
|
-
: nextSiblingMainElement.nextElementSibling;
|
|
2440
|
-
if (nextSibling) {
|
|
2441
|
-
if (validSiblingTags.includes(nextSibling.tagName)) {
|
|
2442
|
-
moveTarget = nextSibling;
|
|
2443
|
-
break;
|
|
2444
|
-
}
|
|
2445
|
-
// For cases where the validSiblingTag is inside a div wrapper
|
|
2446
|
-
if (validSiblingTags.includes(nextSibling.children[0].tagName)) {
|
|
2447
|
-
moveTarget = nextSibling.children[0];
|
|
2448
|
-
break;
|
|
2449
|
-
}
|
|
2450
|
-
}
|
|
2451
|
-
}
|
|
2452
|
-
}
|
|
2453
|
-
else {
|
|
2454
|
-
activeRow.forEach((focusableElement, index) => {
|
|
2455
|
-
if (event.target === focusableElement) {
|
|
2456
|
-
const increment = key === 'ArrowLeft' ? -1 : 1;
|
|
2457
|
-
currentIndex = index + increment;
|
|
2458
|
-
if (currentIndex >= activeRow.length) {
|
|
2459
|
-
currentIndex = 0;
|
|
2460
|
-
}
|
|
2461
|
-
if (currentIndex < 0) {
|
|
2462
|
-
currentIndex = activeRow.length - 1;
|
|
2463
|
-
}
|
|
2464
|
-
moveTarget = activeRow[currentIndex];
|
|
2465
|
-
}
|
|
2466
|
-
});
|
|
2467
|
-
}
|
|
2468
|
-
}
|
|
2469
|
-
});
|
|
2470
|
-
}
|
|
2471
|
-
}
|
|
2472
|
-
if (moveTarget) {
|
|
2473
|
-
// If updateTabIndex is true, set the previously focussed element's tabIndex to -1 and the next focussed element's tabIndex to 0
|
|
2474
|
-
// This updates the tabIndex for a roving tabIndex
|
|
2475
|
-
if (updateTabIndex) {
|
|
2476
|
-
activeElement.tabIndex = -1;
|
|
2477
|
-
moveTarget.tabIndex = 0;
|
|
2478
|
-
}
|
|
2479
|
-
// If a move target has been set by either arrow handler, focus that target
|
|
2480
|
-
moveTarget.focus();
|
|
2481
|
-
}
|
|
2482
|
-
};
|
|
2483
|
-
/**
|
|
2484
|
-
* This function is a helper for setting the initial tabIndexes in a roving tabIndex
|
|
2485
|
-
*
|
|
2486
|
-
* @param {HTMLElement[]} options Array of elements which should have a tabIndex of -1, except for the first element which will have a tabIndex of 0
|
|
2487
|
-
*/
|
|
2488
|
-
const setTabIndex = (options) => {
|
|
2489
|
-
if (options && options.length > 0) {
|
|
2490
|
-
// Iterate the options and set the tabIndex to -1 on every option
|
|
2491
|
-
options.forEach((option) => {
|
|
2492
|
-
option.tabIndex = -1;
|
|
2493
|
-
});
|
|
2494
|
-
// Manually set the tabIndex of the first option to 0
|
|
2495
|
-
options[0].tabIndex = 0;
|
|
2496
|
-
}
|
|
2497
|
-
};
|
|
2498
|
-
/**
|
|
2499
|
-
* This function is used in Dropdown, Select and MenuContainer as a default toggle keydown behavior. When the toggle has focus and the menu is open, pressing the up/down arrow keys will focus a valid non-disabled menu item - the first item for the down arrow key and last item for the up arrow key.
|
|
2500
|
-
*
|
|
2501
|
-
* @param event Event triggered by the keyboard
|
|
2502
|
-
* @param menuRef Menu reference
|
|
2503
|
-
*/
|
|
2504
|
-
const onToggleArrowKeydownDefault = (event, menuRef) => {
|
|
2505
|
-
var _a;
|
|
2506
|
-
if (event.key !== 'ArrowDown' && event.key !== 'ArrowUp') {
|
|
2507
|
-
return;
|
|
2508
|
-
}
|
|
2509
|
-
event.preventDefault();
|
|
2510
|
-
const listItems = Array.from((_a = menuRef.current) === null || _a === void 0 ? void 0 : _a.querySelectorAll('li'));
|
|
2511
|
-
const focusableElements = listItems
|
|
2512
|
-
.map((li) => li.querySelector('button:not(:disabled),input:not(:disabled),a:not([aria-disabled="true"])'))
|
|
2513
|
-
.filter((el) => el !== null);
|
|
2514
|
-
let focusableElement;
|
|
2515
|
-
if (event.key === 'ArrowDown') {
|
|
2516
|
-
focusableElement = focusableElements[0];
|
|
2517
|
-
}
|
|
2518
|
-
else {
|
|
2519
|
-
focusableElement = focusableElements[focusableElements.length - 1];
|
|
2520
|
-
}
|
|
2521
|
-
focusableElement && focusableElement.focus();
|
|
2522
|
-
};
|
|
2523
|
-
class KeyboardHandler extends reactExports.Component {
|
|
2524
|
-
constructor() {
|
|
2525
|
-
super(...arguments);
|
|
2526
|
-
this.keyHandler = (event) => {
|
|
2527
|
-
const { isEventFromContainer } = this.props;
|
|
2528
|
-
// If the passed keyboard event is not from the container, ignore the event by returning
|
|
2529
|
-
if (isEventFromContainer ? !isEventFromContainer(event) : !this._isEventFromContainer(event)) {
|
|
2530
|
-
return;
|
|
2531
|
-
}
|
|
2532
|
-
const { isActiveElement, getFocusableElement, noVerticalArrowHandling, noHorizontalArrowHandling, noEnterHandling, noSpaceHandling, updateTabIndex, validSiblingTags, additionalKeyHandler, createNavigableElements, onlyTraverseSiblings } = this.props;
|
|
2533
|
-
// Pass the event off to be handled by any custom handler
|
|
2534
|
-
additionalKeyHandler && additionalKeyHandler(event);
|
|
2535
|
-
// Initialize navigableElements from the createNavigableElements callback
|
|
2536
|
-
const navigableElements = createNavigableElements();
|
|
2537
|
-
if (!navigableElements) {
|
|
2538
|
-
// eslint-disable-next-line no-console
|
|
2539
|
-
console.warn('No navigable elements have been passed to the KeyboardHandler. Keyboard navigation provided by this component will be ignored.');
|
|
2540
|
-
return;
|
|
2541
|
-
}
|
|
2542
|
-
const key = event.key;
|
|
2543
|
-
// Handle enter key. If noEnterHandling is passed, skip this block
|
|
2544
|
-
if (!noEnterHandling) {
|
|
2545
|
-
if (key === 'Enter') {
|
|
2546
|
-
event.preventDefault();
|
|
2547
|
-
event.stopImmediatePropagation(); // For menus in menus
|
|
2548
|
-
document.activeElement.click();
|
|
2549
|
-
}
|
|
2550
|
-
}
|
|
2551
|
-
// Handle space key. If noSpaceHandling is passed, skip this block
|
|
2552
|
-
if (!noSpaceHandling) {
|
|
2553
|
-
if (key === ' ') {
|
|
2554
|
-
event.preventDefault();
|
|
2555
|
-
event.stopImmediatePropagation(); // For menus in menus
|
|
2556
|
-
document.activeElement.click();
|
|
2557
|
-
}
|
|
2558
|
-
}
|
|
2559
|
-
// Inject helper handler for arrow navigation
|
|
2560
|
-
handleArrows(event, navigableElements, isActiveElement, getFocusableElement, validSiblingTags, noVerticalArrowHandling, noHorizontalArrowHandling, updateTabIndex, onlyTraverseSiblings);
|
|
2561
|
-
};
|
|
2562
|
-
this._isEventFromContainer = (event) => {
|
|
2563
|
-
const { containerRef } = this.props;
|
|
2564
|
-
return containerRef.current && containerRef.current.contains(event.target);
|
|
2565
|
-
};
|
|
2566
|
-
}
|
|
2567
|
-
componentDidMount() {
|
|
2568
|
-
if (canUseDOM) {
|
|
2569
|
-
window.addEventListener('keydown', this.keyHandler);
|
|
2570
|
-
}
|
|
2571
|
-
}
|
|
2572
|
-
componentWillUnmount() {
|
|
2573
|
-
if (canUseDOM) {
|
|
2574
|
-
window.removeEventListener('keydown', this.keyHandler);
|
|
2575
|
-
}
|
|
2576
|
-
}
|
|
2577
|
-
render() {
|
|
2578
|
-
return null;
|
|
2579
|
-
}
|
|
2580
|
-
}
|
|
2581
|
-
KeyboardHandler.displayName = 'KeyboardHandler';
|
|
2582
|
-
KeyboardHandler.defaultProps = {
|
|
2583
|
-
containerRef: null,
|
|
2584
|
-
createNavigableElements: () => null,
|
|
2585
|
-
isActiveElement: (navigableElement) => document.activeElement === navigableElement,
|
|
2586
|
-
getFocusableElement: (navigableElement) => navigableElement,
|
|
2587
|
-
validSiblingTags: ['BUTTON', 'A'],
|
|
2588
|
-
onlyTraverseSiblings: true,
|
|
2589
|
-
updateTabIndex: true,
|
|
2590
|
-
noHorizontalArrowHandling: false,
|
|
2591
|
-
noVerticalArrowHandling: false,
|
|
2592
|
-
noEnterHandling: false,
|
|
2593
|
-
noSpaceHandling: false
|
|
2594
|
-
};
|
|
2595
|
-
|
|
2596
|
-
const TimesIconConfig = {
|
|
2597
|
-
name: 'TimesIcon',
|
|
2598
|
-
height: 512,
|
|
2599
|
-
width: 352,
|
|
2600
|
-
svgPath: 'M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z',
|
|
2601
|
-
yOffset: 0,
|
|
2602
|
-
xOffset: 0,
|
|
2603
|
-
};
|
|
2604
|
-
|
|
2605
|
-
const TimesIcon = createIcon(TimesIconConfig);
|
|
2606
|
-
|
|
2607
|
-
const styles$1 = {
|
|
2608
|
-
"modifiers": {
|
|
2609
|
-
"top": "pf-m-top",
|
|
2610
|
-
"topLeft": "pf-m-top-left",
|
|
2611
|
-
"topRight": "pf-m-top-right",
|
|
2612
|
-
"bottom": "pf-m-bottom",
|
|
2613
|
-
"bottomLeft": "pf-m-bottom-left",
|
|
2614
|
-
"bottomRight": "pf-m-bottom-right",
|
|
2615
|
-
"left": "pf-m-left",
|
|
2616
|
-
"leftTop": "pf-m-left-top",
|
|
2617
|
-
"leftBottom": "pf-m-left-bottom",
|
|
2618
|
-
"right": "pf-m-right",
|
|
2619
|
-
"rightTop": "pf-m-right-top",
|
|
2620
|
-
"rightBottom": "pf-m-right-bottom",
|
|
2621
|
-
"textAlignLeft": "pf-m-text-align-left"
|
|
2622
|
-
},
|
|
2623
|
-
"tooltip": "pf-v6-c-tooltip",
|
|
2624
|
-
"tooltipArrow": "pf-v6-c-tooltip__arrow",
|
|
2625
|
-
"tooltipContent": "pf-v6-c-tooltip__content"
|
|
2626
|
-
};
|
|
2627
|
-
|
|
2628
|
-
const TooltipContent = (_a) => {
|
|
2629
|
-
var { className, children, isLeftAligned } = _a, props = __rest(_a, ["className", "children", "isLeftAligned"]);
|
|
2630
|
-
return (jsxRuntimeExports.jsx("div", Object.assign({ className: css(styles$1.tooltipContent, isLeftAligned && styles$1.modifiers.textAlignLeft, className) }, props, { children: children })));
|
|
2631
|
-
};
|
|
2632
|
-
TooltipContent.displayName = 'TooltipContent';
|
|
2633
|
-
|
|
2634
|
-
const TooltipArrow = (_a) => {
|
|
2635
|
-
var { className } = _a, props = __rest(_a, ["className"]);
|
|
2636
|
-
return jsxRuntimeExports.jsx("div", Object.assign({ className: css(styles$1.tooltipArrow, className) }, props));
|
|
2637
|
-
};
|
|
2638
|
-
TooltipArrow.displayName = 'TooltipArrow';
|
|
2639
|
-
|
|
2640
|
-
const c_tooltip_MaxWidth = {
|
|
2641
|
-
"value": "18.75rem"};
|
|
2642
|
-
|
|
2643
|
-
var TooltipPosition;
|
|
2644
|
-
(function (TooltipPosition) {
|
|
2645
|
-
TooltipPosition["auto"] = "auto";
|
|
2646
|
-
TooltipPosition["top"] = "top";
|
|
2647
|
-
TooltipPosition["bottom"] = "bottom";
|
|
2648
|
-
TooltipPosition["left"] = "left";
|
|
2649
|
-
TooltipPosition["right"] = "right";
|
|
2650
|
-
TooltipPosition["topStart"] = "top-start";
|
|
2651
|
-
TooltipPosition["topEnd"] = "top-end";
|
|
2652
|
-
TooltipPosition["bottomStart"] = "bottom-start";
|
|
2653
|
-
TooltipPosition["bottomEnd"] = "bottom-end";
|
|
2654
|
-
TooltipPosition["leftStart"] = "left-start";
|
|
2655
|
-
TooltipPosition["leftEnd"] = "left-end";
|
|
2656
|
-
TooltipPosition["rightStart"] = "right-start";
|
|
2657
|
-
TooltipPosition["rightEnd"] = "right-end";
|
|
2658
|
-
})(TooltipPosition || (TooltipPosition = {}));
|
|
2659
|
-
// id for associating trigger with the content aria-describedby or aria-labelledby
|
|
2660
|
-
let pfTooltipIdCounter = 1;
|
|
2661
|
-
const Tooltip = (_a) => {
|
|
2662
|
-
var { content: bodyContent, position = 'top', trigger = 'mouseenter focus', isVisible = false, isContentLeftAligned = false, enableFlip = true, className = '', entryDelay = 300, exitDelay = 300, appendTo = () => document.body, zIndex = 9999, minWidth, maxWidth = c_tooltip_MaxWidth.value, distance = 15, aria = 'describedby',
|
|
2663
|
-
// For every initial starting position, there are 3 escape positions
|
|
2664
|
-
flipBehavior = ['top', 'right', 'bottom', 'left', 'top', 'right', 'bottom'], id = `pf-tooltip-${pfTooltipIdCounter++}`, children, animationDuration = 300, triggerRef, 'aria-live': ariaLive = triggerRef ? 'polite' : 'off', onTooltipHidden = () => { } } = _a, rest = __rest(_a, ["content", "position", "trigger", "isVisible", "isContentLeftAligned", "enableFlip", "className", "entryDelay", "exitDelay", "appendTo", "zIndex", "minWidth", "maxWidth", "distance", "aria", "flipBehavior", "id", "children", "animationDuration", "triggerRef", 'aria-live', "onTooltipHidden"]);
|
|
2665
|
-
const triggerOnMouseenter = trigger.includes('mouseenter');
|
|
2666
|
-
const triggerOnFocus = trigger.includes('focus');
|
|
2667
|
-
const triggerOnClick = trigger.includes('click');
|
|
2668
|
-
const triggerManually = trigger === 'manual';
|
|
2669
|
-
const [visible, setVisible] = reactExports.useState(false);
|
|
2670
|
-
const popperRef = reactExports.createRef();
|
|
2671
|
-
const onDocumentKeyDown = (event) => {
|
|
2672
|
-
if (!triggerManually) {
|
|
2673
|
-
if (event.key === KeyTypes.Escape && visible) {
|
|
2674
|
-
hide();
|
|
2675
|
-
}
|
|
2676
|
-
}
|
|
2677
|
-
};
|
|
2678
|
-
const onTriggerEnter = (event) => {
|
|
2679
|
-
if (event.key === KeyTypes.Enter) {
|
|
2680
|
-
if (!visible) {
|
|
2681
|
-
show();
|
|
2682
|
-
}
|
|
2683
|
-
else {
|
|
2684
|
-
hide();
|
|
2685
|
-
}
|
|
2686
|
-
}
|
|
2687
|
-
};
|
|
2688
|
-
reactExports.useEffect(() => {
|
|
2689
|
-
if (isVisible) {
|
|
2690
|
-
show();
|
|
2691
|
-
}
|
|
2692
|
-
else {
|
|
2693
|
-
hide();
|
|
2694
|
-
}
|
|
2695
|
-
}, [isVisible]);
|
|
2696
|
-
const show = () => {
|
|
2697
|
-
setVisible(true);
|
|
2698
|
-
};
|
|
2699
|
-
const hide = () => {
|
|
2700
|
-
setVisible(false);
|
|
2701
|
-
};
|
|
2702
|
-
const positionModifiers = {
|
|
2703
|
-
top: styles$1.modifiers.top,
|
|
2704
|
-
bottom: styles$1.modifiers.bottom,
|
|
2705
|
-
left: styles$1.modifiers.left,
|
|
2706
|
-
right: styles$1.modifiers.right,
|
|
2707
|
-
'top-start': styles$1.modifiers.topLeft,
|
|
2708
|
-
'top-end': styles$1.modifiers.topRight,
|
|
2709
|
-
'bottom-start': styles$1.modifiers.bottomLeft,
|
|
2710
|
-
'bottom-end': styles$1.modifiers.bottomRight,
|
|
2711
|
-
'left-start': styles$1.modifiers.leftTop,
|
|
2712
|
-
'left-end': styles$1.modifiers.leftBottom,
|
|
2713
|
-
'right-start': styles$1.modifiers.rightTop,
|
|
2714
|
-
'right-end': styles$1.modifiers.rightBottom
|
|
2715
|
-
};
|
|
2716
|
-
const hasCustomMaxWidth = maxWidth !== c_tooltip_MaxWidth.value;
|
|
2717
|
-
const content = (jsxRuntimeExports.jsxs("div", Object.assign({ "aria-live": ariaLive, className: css(styles$1.tooltip, className), role: "tooltip", id: id, style: {
|
|
2718
|
-
maxWidth: hasCustomMaxWidth ? maxWidth : null
|
|
2719
|
-
}, ref: popperRef }, rest, { children: [jsxRuntimeExports.jsx(TooltipArrow, {}), jsxRuntimeExports.jsx(TooltipContent, { isLeftAligned: isContentLeftAligned, children: bodyContent })] })));
|
|
2720
|
-
const onDocumentClick = (event, triggerElement) => {
|
|
2721
|
-
// event.currentTarget = document
|
|
2722
|
-
// event.target could be triggerElement or something else
|
|
2723
|
-
{
|
|
2724
|
-
// hide on inside the toggle as well as on outside clicks
|
|
2725
|
-
if (visible) {
|
|
2726
|
-
hide();
|
|
2727
|
-
}
|
|
2728
|
-
else if (event.target === triggerElement) {
|
|
2729
|
-
show();
|
|
2730
|
-
}
|
|
2731
|
-
}
|
|
2732
|
-
};
|
|
2733
|
-
const addAriaToTrigger = () => {
|
|
2734
|
-
if (aria === 'describedby' && children && children.props && !children.props['aria-describedby']) {
|
|
2735
|
-
return reactExports.cloneElement(children, { 'aria-describedby': id });
|
|
2736
|
-
}
|
|
2737
|
-
else if (aria === 'labelledby' && children.props && !children.props['aria-labelledby']) {
|
|
2738
|
-
return reactExports.cloneElement(children, { 'aria-labelledby': id });
|
|
2739
|
-
}
|
|
2740
|
-
return children;
|
|
2741
|
-
};
|
|
2742
|
-
return (jsxRuntimeExports.jsx(Popper, { trigger: aria !== 'none' && visible ? addAriaToTrigger() : children, triggerRef: triggerRef, popper: content, popperRef: popperRef, minWidth: minWidth !== undefined ? minWidth : 'revert', appendTo: appendTo, isVisible: visible, positionModifiers: positionModifiers, distance: distance, placement: position, onMouseEnter: triggerOnMouseenter && show, onMouseLeave: triggerOnMouseenter && hide, onPopperMouseEnter: triggerOnMouseenter && show, onPopperMouseLeave: triggerOnMouseenter && hide, onFocus: triggerOnFocus && show, onBlur: triggerOnFocus && hide, onDocumentClick: triggerOnClick && onDocumentClick, onDocumentKeyDown: triggerManually ? null : onDocumentKeyDown, onTriggerEnter: triggerManually ? null : onTriggerEnter, enableFlip: enableFlip, zIndex: zIndex, flipBehavior: flipBehavior, animationDuration: animationDuration, entryDelay: entryDelay, exitDelay: exitDelay, onHidden: onTooltipHidden }));
|
|
2743
|
-
};
|
|
2744
|
-
Tooltip.displayName = 'Tooltip';
|
|
2745
|
-
|
|
2746
|
-
const AngleRightIconConfig = {
|
|
2747
|
-
name: 'AngleRightIcon',
|
|
2748
|
-
height: 512,
|
|
2749
|
-
width: 256,
|
|
2750
|
-
svgPath: 'M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z',
|
|
2751
|
-
yOffset: 0,
|
|
2752
|
-
xOffset: 0,
|
|
2753
|
-
};
|
|
2754
|
-
|
|
2755
|
-
const AngleRightIcon = createIcon(AngleRightIconConfig);
|
|
2756
|
-
|
|
2757
|
-
const breadcrumbStyles = {
|
|
2758
|
-
"breadcrumbLink": "pf-v6-c-breadcrumb__link"};
|
|
2759
|
-
|
|
2760
|
-
const menuStyles = {
|
|
2761
|
-
"divider": "pf-v6-c-divider",
|
|
2762
|
-
"menu": "pf-v6-c-menu",
|
|
2763
|
-
"menuContent": "pf-v6-c-menu__content",
|
|
2764
|
-
"menuGroup": "pf-v6-c-menu__group",
|
|
2765
|
-
"menuGroupTitle": "pf-v6-c-menu__group-title",
|
|
2766
|
-
"menuItem": "pf-v6-c-menu__item",
|
|
2767
|
-
"menuItemAction": "pf-v6-c-menu__item-action",
|
|
2768
|
-
"menuItemCheck": "pf-v6-c-menu__item-check",
|
|
2769
|
-
"menuItemDescription": "pf-v6-c-menu__item-description",
|
|
2770
|
-
"menuItemExternalIcon": "pf-v6-c-menu__item-external-icon",
|
|
2771
|
-
"menuItemIcon": "pf-v6-c-menu__item-icon",
|
|
2772
|
-
"menuItemMain": "pf-v6-c-menu__item-main",
|
|
2773
|
-
"menuItemSelectIcon": "pf-v6-c-menu__item-select-icon",
|
|
2774
|
-
"menuItemText": "pf-v6-c-menu__item-text",
|
|
2775
|
-
"menuItemToggleIcon": "pf-v6-c-menu__item-toggle-icon",
|
|
2776
|
-
"menuList": "pf-v6-c-menu__list",
|
|
2777
|
-
"menuListItem": "pf-v6-c-menu__list-item",
|
|
2778
|
-
"menuSearch": "pf-v6-c-menu__search",
|
|
2779
|
-
"modifiers": {
|
|
2780
|
-
"disabled": "pf-m-disabled",
|
|
2781
|
-
"ariaDisabled": "pf-m-aria-disabled",
|
|
2782
|
-
"flyout": "pf-m-flyout",
|
|
2783
|
-
"left": "pf-m-left",
|
|
2784
|
-
"drilldown": "pf-m-drilldown",
|
|
2785
|
-
"drilledIn": "pf-m-drilled-in",
|
|
2786
|
-
"currentPath": "pf-m-current-path",
|
|
2787
|
-
"plain": "pf-m-plain",
|
|
2788
|
-
"scrollable": "pf-m-scrollable",
|
|
2789
|
-
"load": "pf-m-load",
|
|
2790
|
-
"loading": "pf-m-loading",
|
|
2791
|
-
"danger": "pf-m-danger",
|
|
2792
|
-
"selected": "pf-m-selected",
|
|
2793
|
-
"favorited": "pf-m-favorited"
|
|
2794
|
-
}
|
|
2795
|
-
};
|
|
2796
|
-
|
|
2797
|
-
const MenuContext = reactExports.createContext({
|
|
2798
|
-
menuId: null,
|
|
2799
|
-
parentMenu: null,
|
|
2800
|
-
onActionClick: () => null,
|
|
2801
|
-
onSelect: () => null,
|
|
2802
|
-
activeItemId: null,
|
|
2803
|
-
selected: null,
|
|
2804
|
-
drilledInMenus: [],
|
|
2805
|
-
drilldownItemPath: [],
|
|
2806
|
-
onDrillIn: null,
|
|
2807
|
-
onDrillOut: null,
|
|
2808
|
-
onGetMenuHeight: () => null,
|
|
2809
|
-
flyoutRef: null,
|
|
2810
|
-
setFlyoutRef: () => null,
|
|
2811
|
-
disableHover: false,
|
|
2812
|
-
role: 'menu'
|
|
2813
|
-
});
|
|
2814
|
-
const MenuItemContext = reactExports.createContext({
|
|
2815
|
-
itemId: null,
|
|
2816
|
-
isDisabled: false
|
|
2817
|
-
});
|
|
2818
|
-
|
|
2819
|
-
class MenuBase extends reactExports.Component {
|
|
2820
|
-
constructor(props) {
|
|
2821
|
-
super(props);
|
|
2822
|
-
this.menuRef = reactExports.createRef();
|
|
2823
|
-
this.activeMenu = null;
|
|
2824
|
-
this.state = {
|
|
2825
|
-
ouiaStateId: getDefaultOUIAId(Menu.displayName),
|
|
2826
|
-
transitionMoveTarget: null,
|
|
2827
|
-
flyoutRef: null,
|
|
2828
|
-
disableHover: false,
|
|
2829
|
-
currentDrilldownMenuId: this.props.id
|
|
2830
|
-
};
|
|
2831
|
-
this.handleDrilldownTransition = (event) => {
|
|
2832
|
-
const current = this.menuRef.current;
|
|
2833
|
-
if (!current ||
|
|
2834
|
-
(current !== event.target.closest(`.${menuStyles.menu}`) &&
|
|
2835
|
-
!Array.from(current.getElementsByClassName(menuStyles.menu)).includes(event.target.closest(`.${menuStyles.menu}`)))) {
|
|
2836
|
-
return;
|
|
2837
|
-
}
|
|
2838
|
-
if (this.state.transitionMoveTarget) {
|
|
2839
|
-
this.state.transitionMoveTarget.focus();
|
|
2840
|
-
this.setState({ transitionMoveTarget: null });
|
|
2841
|
-
}
|
|
2842
|
-
else {
|
|
2843
|
-
const nextMenu = current.querySelector('#' + this.props.activeMenu) || current || null;
|
|
2844
|
-
const nextMenuLists = nextMenu.getElementsByTagName('UL');
|
|
2845
|
-
if (nextMenuLists.length === 0) {
|
|
2846
|
-
return;
|
|
2847
|
-
}
|
|
2848
|
-
const nextMenuChildren = Array.from(nextMenuLists[0].children);
|
|
2849
|
-
if (!this.state.currentDrilldownMenuId || nextMenu.id !== this.state.currentDrilldownMenuId) {
|
|
2850
|
-
this.setState({ currentDrilldownMenuId: nextMenu.id });
|
|
2851
|
-
}
|
|
2852
|
-
else {
|
|
2853
|
-
// if the drilldown transition ends on the same menu, do not focus the first item
|
|
2854
|
-
return;
|
|
2855
|
-
}
|
|
2856
|
-
const nextTarget = nextMenuChildren.filter((el) => !(el.classList.contains('pf-m-disabled') || el.classList.contains(menuStyles.divider)))[0].firstChild;
|
|
2857
|
-
nextTarget.focus();
|
|
2858
|
-
nextTarget.tabIndex = 0;
|
|
2859
|
-
}
|
|
2860
|
-
};
|
|
2861
|
-
this.handleExtraKeys = (event) => {
|
|
2862
|
-
const isDrilldown = this.props.containsDrilldown;
|
|
2863
|
-
const activeElement = document.activeElement;
|
|
2864
|
-
if (event.target.closest(`.${menuStyles.menu}`) !== this.activeMenu &&
|
|
2865
|
-
!event.target.classList.contains(breadcrumbStyles.breadcrumbLink)) {
|
|
2866
|
-
this.activeMenu = event.target.closest(`.${menuStyles.menu}`);
|
|
2867
|
-
this.setState({ disableHover: true });
|
|
2868
|
-
}
|
|
2869
|
-
if (event.target.tagName === 'INPUT') {
|
|
2870
|
-
return;
|
|
2871
|
-
}
|
|
2872
|
-
const parentMenu = this.activeMenu;
|
|
2873
|
-
const key = event.key;
|
|
2874
|
-
const isFromBreadcrumb = activeElement.classList.contains(breadcrumbStyles.breadcrumbLink);
|
|
2875
|
-
if (key === ' ' || key === 'Enter') {
|
|
2876
|
-
event.preventDefault();
|
|
2877
|
-
if (isDrilldown && !isFromBreadcrumb) {
|
|
2878
|
-
const isDrillingOut = activeElement.closest('li').classList.contains('pf-m-current-path');
|
|
2879
|
-
if (isDrillingOut && parentMenu.parentElement.tagName === 'LI') {
|
|
2880
|
-
activeElement.tabIndex = -1;
|
|
2881
|
-
parentMenu.parentElement.firstChild.tabIndex = 0;
|
|
2882
|
-
this.setState({ transitionMoveTarget: parentMenu.parentElement.firstChild });
|
|
2883
|
-
}
|
|
2884
|
-
else {
|
|
2885
|
-
if (activeElement.nextElementSibling && activeElement.nextElementSibling.classList.contains(menuStyles.menu)) {
|
|
2886
|
-
const childItems = Array.from(activeElement.nextElementSibling.getElementsByTagName('UL')[0].children).filter((el) => !(el.classList.contains('pf-m-disabled') || el.classList.contains(menuStyles.divider)));
|
|
2887
|
-
activeElement.tabIndex = -1;
|
|
2888
|
-
childItems[0].firstChild.tabIndex = 0;
|
|
2889
|
-
this.setState({ transitionMoveTarget: childItems[0].firstChild });
|
|
2890
|
-
}
|
|
2891
|
-
}
|
|
2892
|
-
}
|
|
2893
|
-
document.activeElement.click();
|
|
2894
|
-
}
|
|
2895
|
-
};
|
|
2896
|
-
this.createNavigableElements = () => {
|
|
2897
|
-
const isDrilldown = this.props.containsDrilldown;
|
|
2898
|
-
if (isDrilldown) {
|
|
2899
|
-
return this.activeMenu
|
|
2900
|
-
? Array.from(this.activeMenu.getElementsByTagName('UL')[0].children).filter((el) => !(el.classList.contains('pf-m-disabled') || el.classList.contains(menuStyles.divider)))
|
|
2901
|
-
: [];
|
|
2902
|
-
}
|
|
2903
|
-
else {
|
|
2904
|
-
return this.menuRef.current
|
|
2905
|
-
? Array.from(this.menuRef.current.getElementsByTagName('LI')).filter((el) => !(el.classList.contains('pf-m-disabled') || el.classList.contains(menuStyles.divider)))
|
|
2906
|
-
: [];
|
|
2907
|
-
}
|
|
2908
|
-
};
|
|
2909
|
-
if (props.innerRef) {
|
|
2910
|
-
this.menuRef = props.innerRef;
|
|
2911
|
-
}
|
|
2912
|
-
}
|
|
2913
|
-
allowTabFirstItem() {
|
|
2914
|
-
// Allow tabbing to first menu item
|
|
2915
|
-
const current = this.menuRef.current;
|
|
2916
|
-
if (current) {
|
|
2917
|
-
const first = current.querySelector('ul button:not(:disabled), ul a:not(:disabled)');
|
|
2918
|
-
if (first) {
|
|
2919
|
-
first.tabIndex = 0;
|
|
2920
|
-
}
|
|
2921
|
-
}
|
|
2922
|
-
}
|
|
2923
|
-
componentDidMount() {
|
|
2924
|
-
if (this.context) {
|
|
2925
|
-
this.setState({ disableHover: this.context.disableHover });
|
|
2926
|
-
}
|
|
2927
|
-
if (canUseDOM && this.props.containsDrilldown) {
|
|
2928
|
-
window.addEventListener('transitionend', this.props.isRootMenu ? this.handleDrilldownTransition : null);
|
|
2929
|
-
}
|
|
2930
|
-
this.allowTabFirstItem();
|
|
2931
|
-
}
|
|
2932
|
-
componentWillUnmount() {
|
|
2933
|
-
if (canUseDOM && this.props.containsDrilldown) {
|
|
2934
|
-
window.removeEventListener('transitionend', this.handleDrilldownTransition);
|
|
2935
|
-
}
|
|
2936
|
-
}
|
|
2937
|
-
componentDidUpdate(prevProps) {
|
|
2938
|
-
if (prevProps.children !== this.props.children) {
|
|
2939
|
-
this.allowTabFirstItem();
|
|
2940
|
-
}
|
|
2941
|
-
}
|
|
2942
|
-
render() {
|
|
2943
|
-
const _a = this.props, { id, children, className, onSelect, selected = null, onActionClick, ouiaId, ouiaSafe, containsFlyout, containsDrilldown, isMenuDrilledIn, isPlain, isScrollable, drilldownItemPath, drilledInMenus, onDrillIn, onDrillOut, onGetMenuHeight, parentMenu = null, activeItemId = null,
|
|
2944
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2945
|
-
innerRef, isRootMenu, activeMenu, role, isNavFlyout } = _a,
|
|
2946
|
-
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
2947
|
-
props = __rest(_a, ["id", "children", "className", "onSelect", "selected", "onActionClick", "ouiaId", "ouiaSafe", "containsFlyout", "containsDrilldown", "isMenuDrilledIn", "isPlain", "isScrollable", "drilldownItemPath", "drilledInMenus", "onDrillIn", "onDrillOut", "onGetMenuHeight", "parentMenu", "activeItemId", "innerRef", "isRootMenu", "activeMenu", "role", "isNavFlyout"]);
|
|
2948
|
-
const _isMenuDrilledIn = isMenuDrilledIn || (drilledInMenus && drilledInMenus.includes(id)) || false;
|
|
2949
|
-
return (jsxRuntimeExports.jsxs(MenuContext.Provider, { value: {
|
|
2950
|
-
menuId: id,
|
|
2951
|
-
parentMenu: parentMenu || id,
|
|
2952
|
-
onSelect,
|
|
2953
|
-
onActionClick,
|
|
2954
|
-
activeItemId,
|
|
2955
|
-
selected,
|
|
2956
|
-
drilledInMenus,
|
|
2957
|
-
drilldownItemPath,
|
|
2958
|
-
onDrillIn,
|
|
2959
|
-
onDrillOut,
|
|
2960
|
-
onGetMenuHeight,
|
|
2961
|
-
flyoutRef: this.state.flyoutRef,
|
|
2962
|
-
setFlyoutRef: (flyoutRef) => this.setState({ flyoutRef }),
|
|
2963
|
-
disableHover: this.state.disableHover,
|
|
2964
|
-
role
|
|
2965
|
-
}, children: [isRootMenu && (jsxRuntimeExports.jsx(KeyboardHandler, { containerRef: this.menuRef || null, additionalKeyHandler: this.handleExtraKeys, createNavigableElements: this.createNavigableElements, isActiveElement: (element) => document.activeElement.closest('li') === element || // if element is a basic MenuItem
|
|
2966
|
-
document.activeElement.parentElement === element ||
|
|
2967
|
-
document.activeElement.closest(`.${menuStyles.menuSearch}`) === element || // if element is a MenuSearch
|
|
2968
|
-
(document.activeElement.closest('ol') && document.activeElement.closest('ol').firstChild === element), getFocusableElement: (navigableElement) => {
|
|
2969
|
-
var _a, _b;
|
|
2970
|
-
return ((navigableElement === null || navigableElement === void 0 ? void 0 : navigableElement.tagName) === 'DIV' && navigableElement.querySelector('input')) || // for MenuSearchInput
|
|
2971
|
-
(((_a = navigableElement.firstChild) === null || _a === void 0 ? void 0 : _a.tagName) === 'LABEL' &&
|
|
2972
|
-
navigableElement.querySelector('input')) || // for MenuItem checkboxes
|
|
2973
|
-
(((_b = navigableElement.firstChild) === null || _b === void 0 ? void 0 : _b.tagName) === 'DIV' &&
|
|
2974
|
-
navigableElement.querySelector('a, button, input')) || // For aria-disabled element that is rendered inside a div with "display: contents" styling
|
|
2975
|
-
navigableElement.firstChild;
|
|
2976
|
-
}, noHorizontalArrowHandling: document.activeElement &&
|
|
2977
|
-
(document.activeElement.classList.contains(breadcrumbStyles.breadcrumbLink) ||
|
|
2978
|
-
document.activeElement.tagName === 'INPUT'), noEnterHandling: true, noSpaceHandling: true })), jsxRuntimeExports.jsx("div", Object.assign({ id: id, className: css(menuStyles.menu, isPlain && menuStyles.modifiers.plain, isScrollable && menuStyles.modifiers.scrollable, containsFlyout && menuStyles.modifiers.flyout, isNavFlyout && 'pf-m-nav', containsDrilldown && menuStyles.modifiers.drilldown, _isMenuDrilledIn && menuStyles.modifiers.drilledIn, className), ref: this.menuRef }, getOUIAProps(Menu.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe), props, { children: children }))] }));
|
|
2979
|
-
}
|
|
2980
|
-
}
|
|
2981
|
-
MenuBase.displayName = 'Menu';
|
|
2982
|
-
MenuBase.contextType = MenuContext;
|
|
2983
|
-
MenuBase.defaultProps = {
|
|
2984
|
-
ouiaSafe: true,
|
|
2985
|
-
isRootMenu: true,
|
|
2986
|
-
isPlain: false,
|
|
2987
|
-
isScrollable: false,
|
|
2988
|
-
role: 'menu'
|
|
2989
|
-
};
|
|
2990
|
-
const Menu = reactExports.forwardRef((props, ref) => (jsxRuntimeExports.jsx(MenuBase, Object.assign({}, props, { innerRef: ref }))));
|
|
2991
|
-
Menu.displayName = 'Menu';
|
|
2992
|
-
|
|
2993
|
-
const c_menu__content_Height = {
|
|
2994
|
-
"name": "--pf-v6-c-menu__content--Height"};
|
|
2995
|
-
|
|
2996
|
-
const c_menu__content_MaxHeight = {
|
|
2997
|
-
"name": "--pf-v6-c-menu__content--MaxHeight"};
|
|
2998
|
-
|
|
2999
|
-
const MenuContent = reactExports.forwardRef((props, ref) => {
|
|
3000
|
-
const { getHeight, children, menuHeight, maxMenuHeight } = props, rest = __rest(props, ["getHeight", "children", "menuHeight", "maxMenuHeight"]);
|
|
3001
|
-
const menuContentRef = reactExports.createRef();
|
|
3002
|
-
const refCallback = (el, menuId, onGetMenuHeight) => {
|
|
3003
|
-
if (el) {
|
|
3004
|
-
let clientHeight = el.clientHeight;
|
|
3005
|
-
// if this menu is a submenu, we need to account for the root menu list's padding and root menu content's border.
|
|
3006
|
-
let rootMenuList = null;
|
|
3007
|
-
let parentEl = el.closest(`.${menuStyles.menuList}`);
|
|
3008
|
-
while (parentEl !== null && parentEl.nodeType === 1) {
|
|
3009
|
-
if (parentEl.classList.contains(menuStyles.menuList)) {
|
|
3010
|
-
rootMenuList = parentEl;
|
|
3011
|
-
}
|
|
3012
|
-
parentEl = parentEl.parentElement;
|
|
3013
|
-
}
|
|
3014
|
-
if (rootMenuList) {
|
|
3015
|
-
const rootMenuListStyles = getComputedStyle(rootMenuList);
|
|
3016
|
-
const rootMenuListPaddingOffset = parseFloat(rootMenuListStyles.getPropertyValue('padding-top').replace(/px/g, '')) +
|
|
3017
|
-
parseFloat(rootMenuListStyles.getPropertyValue('padding-bottom').replace(/px/g, '')) +
|
|
3018
|
-
parseFloat(getComputedStyle(rootMenuList.parentElement).getPropertyValue('border-bottom-width').replace(/px/g, ''));
|
|
3019
|
-
clientHeight = clientHeight + rootMenuListPaddingOffset;
|
|
3020
|
-
}
|
|
3021
|
-
onGetMenuHeight && onGetMenuHeight(menuId, clientHeight);
|
|
3022
|
-
getHeight && getHeight(clientHeight.toString());
|
|
3023
|
-
}
|
|
3024
|
-
return ref || menuContentRef;
|
|
3025
|
-
};
|
|
3026
|
-
return (jsxRuntimeExports.jsx(MenuContext.Consumer, { children: ({ menuId, onGetMenuHeight }) => (jsxRuntimeExports.jsx("div", Object.assign({}, rest, { className: css(menuStyles.menuContent, props.className), ref: (el) => {
|
|
3027
|
-
refCallback(el, menuId, onGetMenuHeight);
|
|
3028
|
-
}, style: Object.assign(Object.assign({}, (menuHeight && { [c_menu__content_Height.name]: menuHeight })), (maxMenuHeight && { [c_menu__content_MaxHeight.name]: maxMenuHeight })), children: children }))) }));
|
|
3029
|
-
});
|
|
3030
|
-
MenuContent.displayName = 'MenuContent';
|
|
3031
|
-
|
|
3032
|
-
const c_menu_m_flyout__menu_top_offset = {
|
|
3033
|
-
"name": "--pf-v6-c-menu--m-flyout__menu--top-offset"};
|
|
3034
|
-
|
|
3035
|
-
const c_menu_m_flyout__menu_m_left_right_offset = {
|
|
3036
|
-
"name": "--pf-v6-c-menu--m-flyout__menu--m-left--right-offset"};
|
|
3037
|
-
|
|
3038
|
-
const c_menu_m_flyout__menu_left_offset = {
|
|
3039
|
-
"name": "--pf-v6-c-menu--m-flyout__menu--left-offset"};
|
|
3040
|
-
|
|
3041
|
-
const ExternalLinkAltIconConfig = {
|
|
3042
|
-
name: 'ExternalLinkAltIcon',
|
|
3043
|
-
height: 512,
|
|
3044
|
-
width: 512,
|
|
3045
|
-
svgPath: 'M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z',
|
|
3046
|
-
yOffset: 0,
|
|
3047
|
-
xOffset: 0,
|
|
3048
|
-
};
|
|
3049
|
-
|
|
3050
|
-
const ExternalLinkAltIcon = createIcon(ExternalLinkAltIconConfig);
|
|
3051
|
-
|
|
3052
|
-
const AngleLeftIconConfig = {
|
|
3053
|
-
name: 'AngleLeftIcon',
|
|
3054
|
-
height: 512,
|
|
3055
|
-
width: 256,
|
|
3056
|
-
svgPath: 'M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z',
|
|
3057
|
-
yOffset: 0,
|
|
3058
|
-
xOffset: 0,
|
|
3059
|
-
};
|
|
3060
|
-
|
|
3061
|
-
const AngleLeftIcon = createIcon(AngleLeftIconConfig);
|
|
3062
|
-
|
|
3063
|
-
const CheckIconConfig = {
|
|
3064
|
-
name: 'CheckIcon',
|
|
3065
|
-
height: 512,
|
|
3066
|
-
width: 512,
|
|
3067
|
-
svgPath: 'M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z',
|
|
3068
|
-
yOffset: 0,
|
|
3069
|
-
xOffset: 0,
|
|
3070
|
-
};
|
|
3071
|
-
|
|
3072
|
-
const CheckIcon = createIcon(CheckIconConfig);
|
|
3073
|
-
|
|
3074
|
-
const checkStyles = {
|
|
3075
|
-
"check": "pf-v6-c-check",
|
|
3076
|
-
"checkBody": "pf-v6-c-check__body",
|
|
3077
|
-
"checkDescription": "pf-v6-c-check__description",
|
|
3078
|
-
"checkInput": "pf-v6-c-check__input",
|
|
3079
|
-
"checkLabel": "pf-v6-c-check__label",
|
|
3080
|
-
"checkLabelRequired": "pf-v6-c-check__label-required",
|
|
3081
|
-
"modifiers": {
|
|
3082
|
-
"standalone": "pf-m-standalone",
|
|
3083
|
-
"disabled": "pf-m-disabled"
|
|
3084
|
-
}
|
|
3085
|
-
};
|
|
3086
|
-
|
|
3087
|
-
// tslint:disable-next-line:no-empty
|
|
3088
|
-
const defaultOnChange = () => { };
|
|
3089
|
-
class Checkbox extends reactExports.Component {
|
|
3090
|
-
constructor(props) {
|
|
3091
|
-
super(props);
|
|
3092
|
-
this.handleChange = (event) => {
|
|
3093
|
-
this.props.onChange(event, event.currentTarget.checked);
|
|
3094
|
-
};
|
|
3095
|
-
this.state = {
|
|
3096
|
-
ouiaStateId: getDefaultOUIAId(Checkbox.displayName)
|
|
3097
|
-
};
|
|
3098
|
-
}
|
|
3099
|
-
render() {
|
|
3100
|
-
const _a = this.props, { 'aria-label': ariaLabel, className, inputClassName, onChange, isLabelWrapped, labelPosition = 'end', isValid, isDisabled, isRequired, isChecked, label, checked, defaultChecked, description, body, ouiaId, ouiaSafe, component } = _a, props = __rest(_a, ['aria-label', "className", "inputClassName", "onChange", "isLabelWrapped", "labelPosition", "isValid", "isDisabled", "isRequired", "isChecked", "label", "checked", "defaultChecked", "description", "body", "ouiaId", "ouiaSafe", "component"]);
|
|
3101
|
-
if (!props.id) {
|
|
3102
|
-
// eslint-disable-next-line no-console
|
|
3103
|
-
console.error('Checkbox:', 'id is required to make input accessible');
|
|
3104
|
-
}
|
|
3105
|
-
const checkedProps = {};
|
|
3106
|
-
if ([true, false].includes(checked) || isChecked === true) {
|
|
3107
|
-
checkedProps.checked = checked || isChecked;
|
|
3108
|
-
}
|
|
3109
|
-
if (onChange !== defaultOnChange) {
|
|
3110
|
-
checkedProps.checked = isChecked;
|
|
3111
|
-
}
|
|
3112
|
-
if ([false, true].includes(defaultChecked)) {
|
|
3113
|
-
checkedProps.defaultChecked = defaultChecked;
|
|
3114
|
-
}
|
|
3115
|
-
const inputRendered = (jsxRuntimeExports.jsx("input", Object.assign({}, props, { className: css(checkStyles.checkInput, inputClassName), type: "checkbox", onChange: this.handleChange, "aria-invalid": !isValid, "aria-label": ariaLabel, disabled: isDisabled, required: isRequired, ref: (elem) => {
|
|
3116
|
-
elem && (elem.indeterminate = isChecked === null);
|
|
3117
|
-
} }, checkedProps, getOUIAProps(Checkbox.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe))));
|
|
3118
|
-
const wrapWithLabel = (isLabelWrapped && !component) || component === 'label';
|
|
3119
|
-
const Label = wrapWithLabel ? 'span' : 'label';
|
|
3120
|
-
const labelRendered = label ? (jsxRuntimeExports.jsxs(Label, { className: css(checkStyles.checkLabel, isDisabled && checkStyles.modifiers.disabled), htmlFor: !wrapWithLabel ? props.id : undefined, children: [label, isRequired && (jsxRuntimeExports.jsx("span", { className: css(checkStyles.checkLabelRequired), "aria-hidden": "true", children: ASTERISK }))] })) : null;
|
|
3121
|
-
const Component = component !== null && component !== void 0 ? component : (wrapWithLabel ? 'label' : 'div');
|
|
3122
|
-
checkedProps.checked = checkedProps.checked === null ? false : checkedProps.checked;
|
|
3123
|
-
return (jsxRuntimeExports.jsxs(Component, { className: css(checkStyles.check, !label && checkStyles.modifiers.standalone, className), htmlFor: wrapWithLabel ? props.id : undefined, children: [labelPosition === 'start' ? (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [labelRendered, inputRendered] })) : (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [inputRendered, labelRendered] })), description && jsxRuntimeExports.jsx("span", { className: css(checkStyles.checkDescription), children: description }), body && jsxRuntimeExports.jsx("span", { className: css(checkStyles.checkBody), children: body })] }));
|
|
3124
|
-
}
|
|
3125
|
-
}
|
|
3126
|
-
Checkbox.displayName = 'Checkbox';
|
|
3127
|
-
Checkbox.defaultProps = {
|
|
3128
|
-
className: '',
|
|
3129
|
-
isLabelWrapped: false,
|
|
3130
|
-
isValid: true,
|
|
3131
|
-
isDisabled: false,
|
|
3132
|
-
isRequired: false,
|
|
3133
|
-
isChecked: false,
|
|
3134
|
-
onChange: defaultOnChange,
|
|
3135
|
-
ouiaSafe: true
|
|
3136
|
-
};
|
|
3137
|
-
|
|
3138
|
-
const StarIconConfig = {
|
|
3139
|
-
name: 'StarIcon',
|
|
3140
|
-
height: 512,
|
|
3141
|
-
width: 576,
|
|
3142
|
-
svgPath: 'M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z',
|
|
3143
|
-
yOffset: 0,
|
|
3144
|
-
xOffset: 0,
|
|
3145
|
-
};
|
|
3146
|
-
|
|
3147
|
-
const StarIcon = createIcon(StarIconConfig);
|
|
3148
|
-
|
|
3149
|
-
const MenuItemActionBase = (_a) => {
|
|
3150
|
-
var { className, icon, onClick, 'aria-label': ariaLabel, isFavorited = null, isDisabled, actionId, innerRef } = _a, props = __rest(_a, ["className", "icon", "onClick", 'aria-label', "isFavorited", "isDisabled", "actionId", "innerRef"]);
|
|
3151
|
-
return (jsxRuntimeExports.jsx(MenuContext.Consumer, { children: ({ onActionClick }) => (jsxRuntimeExports.jsx(MenuItemContext.Consumer, { children: ({ itemId, isDisabled: isDisabledContext }) => {
|
|
3152
|
-
const onClickButton = (event) => {
|
|
3153
|
-
// event specified on the MenuItemAction
|
|
3154
|
-
onClick && onClick(event);
|
|
3155
|
-
// event specified on the Menu
|
|
3156
|
-
onActionClick && onActionClick(event, itemId, actionId);
|
|
3157
|
-
};
|
|
3158
|
-
return (jsxRuntimeExports.jsx("div", Object.assign({ className: css(menuStyles.menuItemAction, isFavorited !== null && 'pf-m-favorite', isFavorited && menuStyles.modifiers.favorited, className) }, props, { children: jsxRuntimeExports.jsx(Button, { "aria-label": ariaLabel, onClick: onClickButton, ref: innerRef, role: "menuitem", variant: "plain", tabIndex: -1, isDisabled: isDisabled || isDisabledContext, icon: icon === 'favorites' || isFavorited !== null ? jsxRuntimeExports.jsx(StarIcon, {}) : icon }) })));
|
|
3159
|
-
} })) }));
|
|
3160
|
-
};
|
|
3161
|
-
const MenuItemAction = reactExports.forwardRef((props, ref) => (jsxRuntimeExports.jsx(MenuItemActionBase, Object.assign({}, props, { innerRef: ref }))));
|
|
3162
|
-
MenuItemAction.displayName = 'MenuItemAction';
|
|
3163
|
-
|
|
3164
|
-
const FlyoutContext = reactExports.createContext({
|
|
3165
|
-
direction: 'right'
|
|
3166
|
-
});
|
|
3167
|
-
const MenuItemBase = (_a) => {
|
|
3168
|
-
var { children, className, itemId = null, to, hasCheckbox = false, isActive = null, isFavorited = null, isLoadButton = false, isLoading = false, flyoutMenu, direction, description = null, onClick = () => { }, component = 'button', isDisabled = false, isAriaDisabled = false, isExternalLink = false, isSelected = null, isFocused, isDanger = false, icon, actions, onShowFlyout, drilldownMenu, isOnPath, innerRef, id, 'aria-label': ariaLabel, tooltipProps, rel, target, download } = _a, props = __rest(_a, ["children", "className", "itemId", "to", "hasCheckbox", "isActive", "isFavorited", "isLoadButton", "isLoading", "flyoutMenu", "direction", "description", "onClick", "component", "isDisabled", "isAriaDisabled", "isExternalLink", "isSelected", "isFocused", "isDanger", "icon", "actions", "onShowFlyout", "drilldownMenu", "isOnPath", "innerRef", "id", 'aria-label', "tooltipProps", "rel", "target", "download"]);
|
|
3169
|
-
const { menuId, parentMenu, onSelect, onActionClick, activeItemId, selected, drilldownItemPath, onDrillIn, onDrillOut, flyoutRef, setFlyoutRef, disableHover, role: menuRole } = reactExports.useContext(MenuContext);
|
|
3170
|
-
let Component = (to ? 'a' : component);
|
|
3171
|
-
if (hasCheckbox && !to) {
|
|
3172
|
-
Component = 'label';
|
|
3173
|
-
}
|
|
3174
|
-
const [flyoutTarget, setFlyoutTarget] = reactExports.useState(null);
|
|
3175
|
-
const flyoutContext = reactExports.useContext(FlyoutContext);
|
|
3176
|
-
const [flyoutXDirection, setFlyoutXDirection] = reactExports.useState(flyoutContext.direction);
|
|
3177
|
-
const ref = reactExports.useRef(undefined);
|
|
3178
|
-
const privateRef = reactExports.useRef(undefined);
|
|
3179
|
-
const innerComponentRef = innerRef || privateRef;
|
|
3180
|
-
const flyoutVisible = ref === flyoutRef;
|
|
3181
|
-
const hasFlyout = flyoutMenu !== undefined;
|
|
3182
|
-
const showFlyout = (show) => {
|
|
3183
|
-
if (!flyoutVisible && show) {
|
|
3184
|
-
setFlyoutRef(ref);
|
|
3185
|
-
}
|
|
3186
|
-
else if (flyoutVisible && !show) {
|
|
3187
|
-
setFlyoutRef(null);
|
|
3188
|
-
}
|
|
3189
|
-
onShowFlyout && show && onShowFlyout();
|
|
3190
|
-
};
|
|
3191
|
-
useIsomorphicLayoutEffect(() => {
|
|
3192
|
-
if (hasFlyout && ref.current && canUseDOM) {
|
|
3193
|
-
const flyoutMenu = ref.current.lastElementChild;
|
|
3194
|
-
if (flyoutMenu && flyoutMenu.classList.contains(menuStyles.menu)) {
|
|
3195
|
-
const origin = ref.current.getClientRects()[0];
|
|
3196
|
-
const rect = flyoutMenu.getClientRects()[0];
|
|
3197
|
-
if (origin && rect) {
|
|
3198
|
-
const spaceLeftLeft = origin.x - rect.width;
|
|
3199
|
-
const spaceLeftRight = window.innerWidth - origin.x - origin.width - rect.width;
|
|
3200
|
-
let xDir = flyoutXDirection;
|
|
3201
|
-
if (spaceLeftRight < 0 && xDir !== 'left') {
|
|
3202
|
-
setFlyoutXDirection('left');
|
|
3203
|
-
xDir = 'left';
|
|
3204
|
-
}
|
|
3205
|
-
else if (spaceLeftLeft < 0 && xDir !== 'right') {
|
|
3206
|
-
setFlyoutXDirection('right');
|
|
3207
|
-
xDir = 'right';
|
|
3208
|
-
}
|
|
3209
|
-
let xOffset = 0;
|
|
3210
|
-
if (spaceLeftLeft < 0 && spaceLeftRight < 0) {
|
|
3211
|
-
xOffset = xDir === 'right' ? -spaceLeftRight : -spaceLeftLeft;
|
|
3212
|
-
}
|
|
3213
|
-
if (xDir === 'left') {
|
|
3214
|
-
flyoutMenu.classList.add(menuStyles.modifiers.left);
|
|
3215
|
-
flyoutMenu.style.setProperty(c_menu_m_flyout__menu_m_left_right_offset.name, `-${xOffset}px`);
|
|
3216
|
-
}
|
|
3217
|
-
else {
|
|
3218
|
-
flyoutMenu.style.setProperty(c_menu_m_flyout__menu_left_offset.name, `-${xOffset}px`);
|
|
3219
|
-
}
|
|
3220
|
-
const spaceLeftBot = window.innerHeight - origin.y - rect.height;
|
|
3221
|
-
const spaceLeftTop = window.innerHeight - rect.height;
|
|
3222
|
-
if (spaceLeftTop < 0 && spaceLeftBot < 0) ;
|
|
3223
|
-
else if (spaceLeftBot < 0) {
|
|
3224
|
-
flyoutMenu.style.setProperty(c_menu_m_flyout__menu_top_offset.name, `${spaceLeftBot}px`);
|
|
3225
|
-
}
|
|
3226
|
-
}
|
|
3227
|
-
}
|
|
3228
|
-
}
|
|
3229
|
-
}, [flyoutVisible, flyoutMenu]);
|
|
3230
|
-
reactExports.useEffect(() => {
|
|
3231
|
-
setFlyoutXDirection(flyoutContext.direction);
|
|
3232
|
-
}, [flyoutContext]);
|
|
3233
|
-
reactExports.useEffect(() => {
|
|
3234
|
-
if (flyoutTarget) {
|
|
3235
|
-
if (flyoutVisible) {
|
|
3236
|
-
const flyoutMenu = flyoutTarget.nextElementSibling;
|
|
3237
|
-
const flyoutItems = Array.from(flyoutMenu.getElementsByTagName('UL')[0].children).filter((el) => !(el.classList.contains('pf-m-disabled') || el.classList.contains(menuStyles.divider)));
|
|
3238
|
-
flyoutItems[0].firstChild.focus();
|
|
3239
|
-
}
|
|
3240
|
-
else {
|
|
3241
|
-
flyoutTarget.focus();
|
|
3242
|
-
}
|
|
3243
|
-
}
|
|
3244
|
-
}, [flyoutVisible, flyoutTarget]);
|
|
3245
|
-
const handleFlyout = (event) => {
|
|
3246
|
-
const key = event.key;
|
|
3247
|
-
const target = event.target;
|
|
3248
|
-
const type = event.type;
|
|
3249
|
-
if (key === ' ' || key === 'Enter' || key === 'ArrowRight' || type === 'click') {
|
|
3250
|
-
event.stopPropagation();
|
|
3251
|
-
event.preventDefault();
|
|
3252
|
-
if (!flyoutVisible) {
|
|
3253
|
-
showFlyout(true);
|
|
3254
|
-
setFlyoutTarget(target);
|
|
3255
|
-
}
|
|
3256
|
-
}
|
|
3257
|
-
if (key === 'Escape' || key === 'ArrowLeft') {
|
|
3258
|
-
if (flyoutVisible) {
|
|
3259
|
-
event.stopPropagation();
|
|
3260
|
-
showFlyout(false);
|
|
3261
|
-
}
|
|
3262
|
-
}
|
|
3263
|
-
};
|
|
3264
|
-
const onItemSelect = (event, onSelect) => {
|
|
3265
|
-
if (!isAriaDisabled) {
|
|
3266
|
-
// Trigger callback for Menu onSelect
|
|
3267
|
-
onSelect && onSelect(event, itemId);
|
|
3268
|
-
// Trigger callback for item onClick
|
|
3269
|
-
onClick && onClick(event);
|
|
3270
|
-
}
|
|
3271
|
-
};
|
|
3272
|
-
const _isOnPath = (isOnPath && isOnPath) || (drilldownItemPath && drilldownItemPath.includes(itemId)) || false;
|
|
3273
|
-
let drill;
|
|
3274
|
-
if (direction) {
|
|
3275
|
-
if (direction === 'down') {
|
|
3276
|
-
drill = (event) => onDrillIn &&
|
|
3277
|
-
onDrillIn(event, menuId, typeof drilldownMenu === 'function'
|
|
3278
|
-
? drilldownMenu().props.id
|
|
3279
|
-
: drilldownMenu.props.id, itemId);
|
|
3280
|
-
}
|
|
3281
|
-
else {
|
|
3282
|
-
drill = (event) => onDrillOut && onDrillOut(event, parentMenu, itemId);
|
|
3283
|
-
}
|
|
3284
|
-
}
|
|
3285
|
-
let additionalProps = {};
|
|
3286
|
-
if (Component === 'a') {
|
|
3287
|
-
additionalProps = {
|
|
3288
|
-
href: to,
|
|
3289
|
-
'aria-disabled': isDisabled || isAriaDisabled ? true : null,
|
|
3290
|
-
// prevent invalid 'disabled' attribute on <a> tags
|
|
3291
|
-
disabled: null,
|
|
3292
|
-
target: isExternalLink ? '_blank' : target,
|
|
3293
|
-
rel,
|
|
3294
|
-
download
|
|
3295
|
-
};
|
|
3296
|
-
}
|
|
3297
|
-
else if (Component === 'button') {
|
|
3298
|
-
additionalProps = {
|
|
3299
|
-
type: 'button',
|
|
3300
|
-
'aria-disabled': isAriaDisabled ? true : null
|
|
3301
|
-
};
|
|
3302
|
-
}
|
|
3303
|
-
if (isOnPath) {
|
|
3304
|
-
additionalProps['aria-expanded'] = true;
|
|
3305
|
-
}
|
|
3306
|
-
else if (hasFlyout) {
|
|
3307
|
-
additionalProps['aria-haspopup'] = 'menu';
|
|
3308
|
-
additionalProps['aria-expanded'] = flyoutVisible;
|
|
3309
|
-
}
|
|
3310
|
-
const getAriaCurrent = () => {
|
|
3311
|
-
if (isActive !== null) {
|
|
3312
|
-
if (isActive) {
|
|
3313
|
-
return 'page';
|
|
3314
|
-
}
|
|
3315
|
-
else {
|
|
3316
|
-
return null;
|
|
3317
|
-
}
|
|
3318
|
-
}
|
|
3319
|
-
else if (itemId !== null && activeItemId !== null) {
|
|
3320
|
-
return itemId === activeItemId;
|
|
3321
|
-
}
|
|
3322
|
-
return null;
|
|
3323
|
-
};
|
|
3324
|
-
const getIsSelected = () => {
|
|
3325
|
-
if (isSelected !== null) {
|
|
3326
|
-
return isSelected;
|
|
3327
|
-
}
|
|
3328
|
-
else if (selected !== null && itemId !== null) {
|
|
3329
|
-
return (Array.isArray(selected) && selected.includes(itemId)) || itemId === selected;
|
|
3330
|
-
}
|
|
3331
|
-
return false;
|
|
3332
|
-
};
|
|
3333
|
-
const onMouseOver = () => {
|
|
3334
|
-
if (disableHover) {
|
|
3335
|
-
return;
|
|
3336
|
-
}
|
|
3337
|
-
if (hasFlyout) {
|
|
3338
|
-
showFlyout(true);
|
|
3339
|
-
}
|
|
3340
|
-
else {
|
|
3341
|
-
setFlyoutRef(null);
|
|
3342
|
-
}
|
|
3343
|
-
};
|
|
3344
|
-
reactExports.useEffect(() => {
|
|
3345
|
-
if (isFocused && ref.current) {
|
|
3346
|
-
const itemEl = ref.current;
|
|
3347
|
-
const parentListEl = itemEl.parentElement;
|
|
3348
|
-
if (parentListEl) {
|
|
3349
|
-
const isAboveTop = itemEl.offsetTop - parentListEl.offsetTop < parentListEl.scrollTop;
|
|
3350
|
-
const isBelowBottom = itemEl.offsetTop - parentListEl.offsetTop + itemEl.clientHeight;
|
|
3351
|
-
if (isAboveTop || isBelowBottom) {
|
|
3352
|
-
itemEl.scrollIntoView({ behavior: 'auto', block: 'nearest' });
|
|
3353
|
-
}
|
|
3354
|
-
}
|
|
3355
|
-
}
|
|
3356
|
-
}, [isFocused]);
|
|
3357
|
-
const isSelectMenu = menuRole === 'listbox';
|
|
3358
|
-
const renderItem = (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(GenerateId, { children: (randomId) => (jsxRuntimeExports.jsxs(Component, Object.assign({ id: id, tabIndex: -1, className: css(menuStyles.menuItem, getIsSelected() && !hasCheckbox && menuStyles.modifiers.selected, className), "aria-current": getAriaCurrent() }, (!hasCheckbox && { disabled: isDisabled, 'aria-label': ariaLabel }), (!hasCheckbox && !flyoutMenu && { role: isSelectMenu ? 'option' : 'menuitem' }), (!hasCheckbox && !flyoutMenu && isSelectMenu && { 'aria-selected': getIsSelected() }), { ref: innerComponentRef }, (!hasCheckbox && {
|
|
3359
|
-
onClick: (event) => {
|
|
3360
|
-
if (!isAriaDisabled) {
|
|
3361
|
-
onItemSelect(event, onSelect);
|
|
3362
|
-
drill && drill(event);
|
|
3363
|
-
flyoutMenu && handleFlyout(event);
|
|
3364
|
-
}
|
|
3365
|
-
else {
|
|
3366
|
-
event.preventDefault();
|
|
3367
|
-
}
|
|
3368
|
-
}
|
|
3369
|
-
}), (hasCheckbox && { htmlFor: randomId }), additionalProps, { children: [jsxRuntimeExports.jsxs("span", { className: css(menuStyles.menuItemMain), children: [direction === 'up' && (jsxRuntimeExports.jsx("span", { className: css(menuStyles.menuItemToggleIcon), children: jsxRuntimeExports.jsx(AngleLeftIcon, {}) })), icon && jsxRuntimeExports.jsx("span", { className: css(menuStyles.menuItemIcon), children: icon }), hasCheckbox && (jsxRuntimeExports.jsx("span", { className: css(menuStyles.menuItemCheck), children: jsxRuntimeExports.jsx(Checkbox, { id: randomId, component: "span", isChecked: isSelected || false, onChange: (event) => onItemSelect(event, onSelect), isDisabled: isDisabled, "aria-disabled": isAriaDisabled }) })), jsxRuntimeExports.jsx("span", { className: css(menuStyles.menuItemText), children: children }), isExternalLink && (jsxRuntimeExports.jsx("span", { className: css(menuStyles.menuItemExternalIcon), children: jsxRuntimeExports.jsx(ExternalLinkAltIcon, {}) })), (flyoutMenu || direction === 'down') && (jsxRuntimeExports.jsx("span", { className: css(menuStyles.menuItemToggleIcon), children: jsxRuntimeExports.jsx(AngleRightIcon, {}) })), getIsSelected() && (jsxRuntimeExports.jsx("span", { className: css(menuStyles.menuItemSelectIcon), children: jsxRuntimeExports.jsx(CheckIcon, {}) }))] }), description && direction !== 'up' && (jsxRuntimeExports.jsx("span", { className: css(menuStyles.menuItemDescription), children: jsxRuntimeExports.jsx("span", { children: description }) }))] }))) }), flyoutVisible && (jsxRuntimeExports.jsx(MenuContext.Provider, { value: { disableHover }, children: jsxRuntimeExports.jsx(FlyoutContext.Provider, { value: { direction: flyoutXDirection }, children: flyoutMenu }) })), typeof drilldownMenu === 'function' ? drilldownMenu() : drilldownMenu, jsxRuntimeExports.jsxs(MenuItemContext.Provider, { value: { itemId, isDisabled }, children: [actions, isFavorited !== null && (jsxRuntimeExports.jsx(MenuItemAction, { icon: "favorites", isFavorited: isFavorited, "aria-label": isFavorited ? 'starred' : 'not starred', onClick: (event) => onActionClick(event, itemId), tabIndex: -1, actionId: "fav" }))] })] }));
|
|
3370
|
-
return (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("li", Object.assign({ className: css(menuStyles.menuListItem, isDisabled && menuStyles.modifiers.disabled, isAriaDisabled && menuStyles.modifiers.ariaDisabled, _isOnPath && menuStyles.modifiers.currentPath, isLoadButton && menuStyles.modifiers.load, isLoading && menuStyles.modifiers.loading, isFocused && 'pf-m-focus', isDanger && menuStyles.modifiers.danger, className), onMouseOver: () => {
|
|
3371
|
-
if (!isAriaDisabled) {
|
|
3372
|
-
onMouseOver();
|
|
3373
|
-
}
|
|
3374
|
-
} }, (flyoutMenu && !isAriaDisabled && { onKeyDown: handleFlyout }), { ref: ref, role: !hasCheckbox ? 'none' : 'menuitem' }, (hasCheckbox && { 'aria-label': ariaLabel }), props, { children: renderItem })), tooltipProps && jsxRuntimeExports.jsx(Tooltip, Object.assign({}, tooltipProps, { triggerRef: innerComponentRef }))] }));
|
|
3375
|
-
};
|
|
3376
|
-
const MenuItem = reactExports.forwardRef((props, ref) => (jsxRuntimeExports.jsx(MenuItemBase, Object.assign({}, props, { innerRef: ref }))));
|
|
3377
|
-
MenuItem.displayName = 'MenuItem';
|
|
3378
|
-
|
|
3379
|
-
const MenuList = (_a) => {
|
|
3380
|
-
var { children = null, className, isAriaMultiselectable = false, 'aria-label': ariaLabel } = _a, props = __rest(_a, ["children", "className", "isAriaMultiselectable", 'aria-label']);
|
|
3381
|
-
const { role } = reactExports.useContext(MenuContext);
|
|
3382
|
-
return (jsxRuntimeExports.jsx("ul", Object.assign({ role: role }, (role === 'listbox' && { 'aria-multiselectable': isAriaMultiselectable }), { className: css(menuStyles.menuList, className), "aria-label": ariaLabel }, props, { children: children })));
|
|
3383
|
-
};
|
|
3384
|
-
MenuList.displayName = 'MenuList';
|
|
3385
|
-
|
|
3386
|
-
const styles = {
|
|
3387
|
-
"menuToggle": "pf-v6-c-menu-toggle",
|
|
3388
|
-
"menuToggleButton": "pf-v6-c-menu-toggle__button",
|
|
3389
|
-
"menuToggleControls": "pf-v6-c-menu-toggle__controls",
|
|
3390
|
-
"menuToggleCount": "pf-v6-c-menu-toggle__count",
|
|
3391
|
-
"menuToggleIcon": "pf-v6-c-menu-toggle__icon",
|
|
3392
|
-
"menuToggleStatusIcon": "pf-v6-c-menu-toggle__status-icon",
|
|
3393
|
-
"menuToggleText": "pf-v6-c-menu-toggle__text",
|
|
3394
|
-
"menuToggleToggleIcon": "pf-v6-c-menu-toggle__toggle-icon",
|
|
3395
|
-
"modifiers": {
|
|
3396
|
-
"primary": "pf-m-primary",
|
|
3397
|
-
"secondary": "pf-m-secondary",
|
|
3398
|
-
"fullHeight": "pf-m-full-height",
|
|
3399
|
-
"fullWidth": "pf-m-full-width",
|
|
3400
|
-
"plain": "pf-m-plain",
|
|
3401
|
-
"expanded": "pf-m-expanded",
|
|
3402
|
-
"disabled": "pf-m-disabled",
|
|
3403
|
-
"small": "pf-m-small",
|
|
3404
|
-
"success": "pf-m-success",
|
|
3405
|
-
"warning": "pf-m-warning",
|
|
3406
|
-
"danger": "pf-m-danger",
|
|
3407
|
-
"placeholder": "pf-m-placeholder",
|
|
3408
|
-
"splitButton": "pf-m-split-button",
|
|
3409
|
-
"standalone": "pf-m-standalone",
|
|
3410
|
-
"typeahead": "pf-m-typeahead",
|
|
3411
|
-
"text": "pf-m-text",
|
|
3412
|
-
"avatar": "pf-m-avatar"
|
|
3413
|
-
}};
|
|
3414
|
-
|
|
3415
|
-
const CaretDownIconConfig = {
|
|
3416
|
-
name: 'CaretDownIcon',
|
|
3417
|
-
height: 512,
|
|
3418
|
-
width: 320,
|
|
3419
|
-
svgPath: 'M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z',
|
|
3420
|
-
yOffset: 0,
|
|
3421
|
-
xOffset: 0,
|
|
3422
|
-
};
|
|
3423
|
-
|
|
3424
|
-
const CaretDownIcon = createIcon(CaretDownIconConfig);
|
|
3425
|
-
|
|
3426
|
-
var MenuToggleStatus;
|
|
3427
|
-
(function (MenuToggleStatus) {
|
|
3428
|
-
MenuToggleStatus["success"] = "success";
|
|
3429
|
-
MenuToggleStatus["danger"] = "danger";
|
|
3430
|
-
MenuToggleStatus["warning"] = "warning";
|
|
3431
|
-
})(MenuToggleStatus || (MenuToggleStatus = {}));
|
|
3432
|
-
var MenuToggleSize;
|
|
3433
|
-
(function (MenuToggleSize) {
|
|
3434
|
-
MenuToggleSize["default"] = "default";
|
|
3435
|
-
MenuToggleSize["sm"] = "sm";
|
|
3436
|
-
})(MenuToggleSize || (MenuToggleSize = {}));
|
|
3437
|
-
class MenuToggleBase extends reactExports.Component {
|
|
3438
|
-
constructor() {
|
|
3439
|
-
super(...arguments);
|
|
3440
|
-
this.displayName = 'MenuToggleBase';
|
|
3441
|
-
this.state = {
|
|
3442
|
-
ouiaStateId: getDefaultOUIAId(MenuToggle.displayName, this.props.variant)
|
|
3443
|
-
};
|
|
3444
|
-
}
|
|
3445
|
-
render() {
|
|
3446
|
-
const _a = this.props, { children, className, icon, badge, isExpanded, isDisabled, isFullHeight, isFullWidth, isPlaceholder, splitButtonItems, variant, status, statusIcon, innerRef, onClick, 'aria-label': ariaLabel, ouiaId, ouiaSafe, size } = _a, otherProps = __rest(_a, ["children", "className", "icon", "badge", "isExpanded", "isDisabled", "isFullHeight", "isFullWidth", "isPlaceholder", "splitButtonItems", "variant", "status", "statusIcon", "innerRef", "onClick", 'aria-label', "ouiaId", "ouiaSafe", "size"]);
|
|
3447
|
-
const isPlain = variant === 'plain';
|
|
3448
|
-
const isPlainText = variant === 'plainText';
|
|
3449
|
-
const isTypeahead = variant === 'typeahead';
|
|
3450
|
-
const ouiaProps = getOUIAProps(MenuToggle.displayName, ouiaId !== null && ouiaId !== void 0 ? ouiaId : this.state.ouiaStateId, ouiaSafe);
|
|
3451
|
-
let _statusIcon = statusIcon;
|
|
3452
|
-
if (!statusIcon) {
|
|
3453
|
-
switch (status) {
|
|
3454
|
-
case MenuToggleStatus.success:
|
|
3455
|
-
_statusIcon = jsxRuntimeExports.jsx(CheckCircleIcon, {});
|
|
3456
|
-
break;
|
|
3457
|
-
case MenuToggleStatus.warning:
|
|
3458
|
-
_statusIcon = jsxRuntimeExports.jsx(ExclamationTriangleIcon, {});
|
|
3459
|
-
break;
|
|
3460
|
-
case MenuToggleStatus.danger:
|
|
3461
|
-
_statusIcon = jsxRuntimeExports.jsx(ExclamationCircleIcon, {});
|
|
3462
|
-
break;
|
|
3463
|
-
}
|
|
3464
|
-
}
|
|
3465
|
-
const toggleControls = (jsxRuntimeExports.jsxs("span", { className: css(styles.menuToggleControls), children: [status !== undefined && jsxRuntimeExports.jsx("span", { className: css(styles.menuToggleStatusIcon), children: _statusIcon }), jsxRuntimeExports.jsx("span", { className: css(styles.menuToggleToggleIcon), children: jsxRuntimeExports.jsx(CaretDownIcon, {}) })] }));
|
|
3466
|
-
const content = (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [icon && jsxRuntimeExports.jsx("span", { className: css(styles.menuToggleIcon), children: icon }), isTypeahead ? children : children && jsxRuntimeExports.jsx("span", { className: css(styles.menuToggleText), children: children }), reactExports.isValidElement(badge) && jsxRuntimeExports.jsx("span", { className: css(styles.menuToggleCount), children: badge }), isTypeahead ? (jsxRuntimeExports.jsx("button", Object.assign({ type: "button", className: css(styles.menuToggleButton), "aria-expanded": isExpanded, onClick: onClick, "aria-label": ariaLabel || 'Menu toggle', tabIndex: -1 }, ouiaProps, { children: toggleControls }))) : (!isPlain && toggleControls)] }));
|
|
3467
|
-
const commonStyles = css(styles.menuToggle, isExpanded && styles.modifiers.expanded, variant === 'primary' && styles.modifiers.primary, variant === 'secondary' && styles.modifiers.secondary, status && styles.modifiers[status], (isPlain || isPlainText) && styles.modifiers.plain, isPlainText && 'pf-m-text', isFullHeight && styles.modifiers.fullHeight, isFullWidth && styles.modifiers.fullWidth, isDisabled && styles.modifiers.disabled, isPlaceholder && styles.modifiers.placeholder, size === MenuToggleSize.sm && styles.modifiers.small, className);
|
|
3468
|
-
const componentProps = Object.assign(Object.assign({ children: content }, (isDisabled && { disabled: true })), otherProps);
|
|
3469
|
-
if (isTypeahead) {
|
|
3470
|
-
return (jsxRuntimeExports.jsx("div", Object.assign({ ref: innerRef, className: css(commonStyles, styles.modifiers.typeahead) }, componentProps)));
|
|
3471
|
-
}
|
|
3472
|
-
if (splitButtonItems) {
|
|
3473
|
-
return (jsxRuntimeExports.jsxs("div", { ref: innerRef, className: css(commonStyles, styles.modifiers.splitButton), children: [splitButtonItems, jsxRuntimeExports.jsxs("button", Object.assign({ className: css(styles.menuToggleButton, children && styles.modifiers.text), type: "button", "aria-expanded": isExpanded, "aria-label": ariaLabel, disabled: isDisabled, onClick: onClick }, otherProps, ouiaProps, { children: [children && jsxRuntimeExports.jsx("span", { className: css(styles.menuToggleText), children: children }), toggleControls] }))] }));
|
|
3474
|
-
}
|
|
3475
|
-
return (jsxRuntimeExports.jsx("button", Object.assign({ className: css(commonStyles), type: "button", "aria-label": ariaLabel, "aria-expanded": isExpanded, ref: innerRef, disabled: isDisabled, onClick: onClick }, componentProps, ouiaProps)));
|
|
3476
|
-
}
|
|
3477
|
-
}
|
|
3478
|
-
MenuToggleBase.defaultProps = {
|
|
3479
|
-
className: '',
|
|
3480
|
-
isExpanded: false,
|
|
3481
|
-
isDisabled: false,
|
|
3482
|
-
isFullWidth: false,
|
|
3483
|
-
isFullHeight: false,
|
|
3484
|
-
isPlaceholder: false,
|
|
3485
|
-
size: 'default',
|
|
3486
|
-
ouiaSafe: true
|
|
3487
|
-
};
|
|
3488
|
-
const MenuToggle = reactExports.forwardRef((props, ref) => (jsxRuntimeExports.jsx(MenuToggleBase, Object.assign({ innerRef: ref }, props))));
|
|
3489
|
-
MenuToggle.displayName = 'MenuToggle';
|
|
3490
|
-
|
|
3491
|
-
const dividerStyles = {
|
|
3492
|
-
"divider": "pf-v6-c-divider",
|
|
3493
|
-
"modifiers": {
|
|
3494
|
-
"hidden": "pf-m-hidden",
|
|
3495
|
-
"hiddenOnSm": "pf-m-hidden-on-sm",
|
|
3496
|
-
"visibleOnSm": "pf-m-visible-on-sm",
|
|
3497
|
-
"hiddenOnMd": "pf-m-hidden-on-md",
|
|
3498
|
-
"visibleOnMd": "pf-m-visible-on-md",
|
|
3499
|
-
"hiddenOnLg": "pf-m-hidden-on-lg",
|
|
3500
|
-
"visibleOnLg": "pf-m-visible-on-lg",
|
|
3501
|
-
"hiddenOnXl": "pf-m-hidden-on-xl",
|
|
3502
|
-
"visibleOnXl": "pf-m-visible-on-xl",
|
|
3503
|
-
"hiddenOn_2xl": "pf-m-hidden-on-2xl",
|
|
3504
|
-
"visibleOn_2xl": "pf-m-visible-on-2xl",
|
|
3505
|
-
"horizontal": "pf-m-horizontal",
|
|
3506
|
-
"vertical": "pf-m-vertical",
|
|
3507
|
-
"insetNone": "pf-m-inset-none",
|
|
3508
|
-
"insetXs": "pf-m-inset-xs",
|
|
3509
|
-
"insetSm": "pf-m-inset-sm",
|
|
3510
|
-
"insetMd": "pf-m-inset-md",
|
|
3511
|
-
"insetLg": "pf-m-inset-lg",
|
|
3512
|
-
"insetXl": "pf-m-inset-xl",
|
|
3513
|
-
"inset_2xl": "pf-m-inset-2xl",
|
|
3514
|
-
"inset_3xl": "pf-m-inset-3xl",
|
|
3515
|
-
"horizontalOnSm": "pf-m-horizontal-on-sm",
|
|
3516
|
-
"verticalOnSm": "pf-m-vertical-on-sm",
|
|
3517
|
-
"insetNoneOnSm": "pf-m-inset-none-on-sm",
|
|
3518
|
-
"insetXsOnSm": "pf-m-inset-xs-on-sm",
|
|
3519
|
-
"insetSmOnSm": "pf-m-inset-sm-on-sm",
|
|
3520
|
-
"insetMdOnSm": "pf-m-inset-md-on-sm",
|
|
3521
|
-
"insetLgOnSm": "pf-m-inset-lg-on-sm",
|
|
3522
|
-
"insetXlOnSm": "pf-m-inset-xl-on-sm",
|
|
3523
|
-
"inset_2xlOnSm": "pf-m-inset-2xl-on-sm",
|
|
3524
|
-
"inset_3xlOnSm": "pf-m-inset-3xl-on-sm",
|
|
3525
|
-
"horizontalOnMd": "pf-m-horizontal-on-md",
|
|
3526
|
-
"verticalOnMd": "pf-m-vertical-on-md",
|
|
3527
|
-
"insetNoneOnMd": "pf-m-inset-none-on-md",
|
|
3528
|
-
"insetXsOnMd": "pf-m-inset-xs-on-md",
|
|
3529
|
-
"insetSmOnMd": "pf-m-inset-sm-on-md",
|
|
3530
|
-
"insetMdOnMd": "pf-m-inset-md-on-md",
|
|
3531
|
-
"insetLgOnMd": "pf-m-inset-lg-on-md",
|
|
3532
|
-
"insetXlOnMd": "pf-m-inset-xl-on-md",
|
|
3533
|
-
"inset_2xlOnMd": "pf-m-inset-2xl-on-md",
|
|
3534
|
-
"inset_3xlOnMd": "pf-m-inset-3xl-on-md",
|
|
3535
|
-
"horizontalOnLg": "pf-m-horizontal-on-lg",
|
|
3536
|
-
"verticalOnLg": "pf-m-vertical-on-lg",
|
|
3537
|
-
"insetNoneOnLg": "pf-m-inset-none-on-lg",
|
|
3538
|
-
"insetXsOnLg": "pf-m-inset-xs-on-lg",
|
|
3539
|
-
"insetSmOnLg": "pf-m-inset-sm-on-lg",
|
|
3540
|
-
"insetMdOnLg": "pf-m-inset-md-on-lg",
|
|
3541
|
-
"insetLgOnLg": "pf-m-inset-lg-on-lg",
|
|
3542
|
-
"insetXlOnLg": "pf-m-inset-xl-on-lg",
|
|
3543
|
-
"inset_2xlOnLg": "pf-m-inset-2xl-on-lg",
|
|
3544
|
-
"inset_3xlOnLg": "pf-m-inset-3xl-on-lg",
|
|
3545
|
-
"horizontalOnXl": "pf-m-horizontal-on-xl",
|
|
3546
|
-
"verticalOnXl": "pf-m-vertical-on-xl",
|
|
3547
|
-
"insetNoneOnXl": "pf-m-inset-none-on-xl",
|
|
3548
|
-
"insetXsOnXl": "pf-m-inset-xs-on-xl",
|
|
3549
|
-
"insetSmOnXl": "pf-m-inset-sm-on-xl",
|
|
3550
|
-
"insetMdOnXl": "pf-m-inset-md-on-xl",
|
|
3551
|
-
"insetLgOnXl": "pf-m-inset-lg-on-xl",
|
|
3552
|
-
"insetXlOnXl": "pf-m-inset-xl-on-xl",
|
|
3553
|
-
"inset_2xlOnXl": "pf-m-inset-2xl-on-xl",
|
|
3554
|
-
"inset_3xlOnXl": "pf-m-inset-3xl-on-xl",
|
|
3555
|
-
"horizontalOn_2xl": "pf-m-horizontal-on-2xl",
|
|
3556
|
-
"verticalOn_2xl": "pf-m-vertical-on-2xl",
|
|
3557
|
-
"insetNoneOn_2xl": "pf-m-inset-none-on-2xl",
|
|
3558
|
-
"insetXsOn_2xl": "pf-m-inset-xs-on-2xl",
|
|
3559
|
-
"insetSmOn_2xl": "pf-m-inset-sm-on-2xl",
|
|
3560
|
-
"insetMdOn_2xl": "pf-m-inset-md-on-2xl",
|
|
3561
|
-
"insetLgOn_2xl": "pf-m-inset-lg-on-2xl",
|
|
3562
|
-
"insetXlOn_2xl": "pf-m-inset-xl-on-2xl",
|
|
3563
|
-
"inset_2xlOn_2xl": "pf-m-inset-2xl-on-2xl",
|
|
3564
|
-
"inset_3xlOn_2xl": "pf-m-inset-3xl-on-2xl"
|
|
3565
|
-
}
|
|
3566
|
-
};
|
|
3567
|
-
|
|
3568
|
-
var DividerVariant;
|
|
3569
|
-
(function (DividerVariant) {
|
|
3570
|
-
DividerVariant["hr"] = "hr";
|
|
3571
|
-
DividerVariant["li"] = "li";
|
|
3572
|
-
DividerVariant["div"] = "div";
|
|
3573
|
-
})(DividerVariant || (DividerVariant = {}));
|
|
3574
|
-
const Divider = (_a) => {
|
|
3575
|
-
var { className, component = DividerVariant.hr, inset, orientation } = _a, props = __rest(_a, ["className", "component", "inset", "orientation"]);
|
|
3576
|
-
const Component = component;
|
|
3577
|
-
return (jsxRuntimeExports.jsx(Component, Object.assign({ className: css(dividerStyles.divider, formatBreakpointMods(inset, dividerStyles), formatBreakpointMods(orientation, dividerStyles), className) }, (component !== 'hr' && { role: 'separator' }), props)));
|
|
3578
|
-
};
|
|
3579
|
-
Divider.displayName = 'Divider';
|
|
3580
|
-
|
|
3581
|
-
const DropdownBase = (_a) => {
|
|
3582
|
-
var { children, className, onSelect, isOpen, toggle, shouldFocusToggleOnSelect = false, onOpenChange, onToggleKeydown, isPlain, isScrollable, innerRef, ouiaId, ouiaSafe = true, zIndex = 9999, popperProps, onOpenChangeKeys = ['Escape', 'Tab'], menuHeight, maxMenuHeight, shouldFocusFirstItemOnOpen = false, shouldPreventScrollOnItemFocus = true, focusTimeoutDelay = 0 } = _a, props = __rest(_a, ["children", "className", "onSelect", "isOpen", "toggle", "shouldFocusToggleOnSelect", "onOpenChange", "onToggleKeydown", "isPlain", "isScrollable", "innerRef", "ouiaId", "ouiaSafe", "zIndex", "popperProps", "onOpenChangeKeys", "menuHeight", "maxMenuHeight", "shouldFocusFirstItemOnOpen", "shouldPreventScrollOnItemFocus", "focusTimeoutDelay"]);
|
|
3583
|
-
const localMenuRef = reactExports.useRef(undefined);
|
|
3584
|
-
const localToggleRef = reactExports.useRef(undefined);
|
|
3585
|
-
const ouiaProps = useOUIAProps(Dropdown.displayName, ouiaId, ouiaSafe);
|
|
3586
|
-
const menuRef = innerRef || localMenuRef;
|
|
3587
|
-
const toggleRef = typeof toggle === 'function' || (typeof toggle !== 'function' && !toggle.toggleRef)
|
|
3588
|
-
? localToggleRef
|
|
3589
|
-
: toggle === null || toggle === void 0 ? void 0 : toggle.toggleRef;
|
|
3590
|
-
const prevIsOpen = reactExports.useRef(isOpen);
|
|
3591
|
-
reactExports.useEffect(() => {
|
|
3592
|
-
// menu was opened, focus on first menu item
|
|
3593
|
-
if (prevIsOpen.current === false && isOpen === true && shouldFocusFirstItemOnOpen) {
|
|
3594
|
-
setTimeout(() => {
|
|
3595
|
-
var _a;
|
|
3596
|
-
const firstElement = (_a = menuRef === null || menuRef === void 0 ? void 0 : menuRef.current) === null || _a === void 0 ? void 0 : _a.querySelector('li button:not(:disabled),li input:not(:disabled),li a:not([aria-disabled="true"])');
|
|
3597
|
-
firstElement && firstElement.focus({ preventScroll: shouldPreventScrollOnItemFocus });
|
|
3598
|
-
}, focusTimeoutDelay);
|
|
3599
|
-
}
|
|
3600
|
-
prevIsOpen.current = isOpen;
|
|
3601
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3602
|
-
}, [isOpen]);
|
|
3603
|
-
reactExports.useEffect(() => {
|
|
3604
|
-
const handleMenuKeys = (event) => {
|
|
3605
|
-
var _a, _b, _c, _d;
|
|
3606
|
-
// Close the menu on tab or escape if onOpenChange is provided
|
|
3607
|
-
if (isOpen &&
|
|
3608
|
-
onOpenChange &&
|
|
3609
|
-
(((_a = menuRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target)) || ((_b = toggleRef.current) === null || _b === void 0 ? void 0 : _b.contains(event.target)))) {
|
|
3610
|
-
if (onOpenChangeKeys.includes(event.key)) {
|
|
3611
|
-
onOpenChange(false);
|
|
3612
|
-
(_c = toggleRef.current) === null || _c === void 0 ? void 0 : _c.focus();
|
|
3613
|
-
}
|
|
3614
|
-
}
|
|
3615
|
-
if ((_d = toggleRef.current) === null || _d === void 0 ? void 0 : _d.contains(event.target)) {
|
|
3616
|
-
if (onToggleKeydown) {
|
|
3617
|
-
onToggleKeydown(event);
|
|
3618
|
-
}
|
|
3619
|
-
else if (isOpen) {
|
|
3620
|
-
onToggleArrowKeydownDefault(event, menuRef);
|
|
3621
|
-
}
|
|
3622
|
-
}
|
|
3623
|
-
};
|
|
3624
|
-
const handleClick = (event) => {
|
|
3625
|
-
var _a, _b;
|
|
3626
|
-
// If the event is not on the toggle and onOpenChange callback is provided, close the menu
|
|
3627
|
-
if (isOpen && onOpenChange && !((_a = toggleRef === null || toggleRef === void 0 ? void 0 : toggleRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target))) {
|
|
3628
|
-
if (isOpen && !((_b = menuRef.current) === null || _b === void 0 ? void 0 : _b.contains(event.target))) {
|
|
3629
|
-
onOpenChange(false);
|
|
3630
|
-
}
|
|
3631
|
-
}
|
|
3632
|
-
};
|
|
3633
|
-
window.addEventListener('keydown', handleMenuKeys);
|
|
3634
|
-
window.addEventListener('click', handleClick);
|
|
3635
|
-
return () => {
|
|
3636
|
-
window.removeEventListener('keydown', handleMenuKeys);
|
|
3637
|
-
window.removeEventListener('click', handleClick);
|
|
3638
|
-
};
|
|
3639
|
-
}, [
|
|
3640
|
-
isOpen,
|
|
3641
|
-
menuRef,
|
|
3642
|
-
toggleRef,
|
|
3643
|
-
onOpenChange,
|
|
3644
|
-
onOpenChangeKeys,
|
|
3645
|
-
onToggleKeydown,
|
|
3646
|
-
shouldPreventScrollOnItemFocus,
|
|
3647
|
-
shouldFocusFirstItemOnOpen,
|
|
3648
|
-
focusTimeoutDelay
|
|
3649
|
-
]);
|
|
3650
|
-
const scrollable = maxMenuHeight !== undefined || menuHeight !== undefined || isScrollable;
|
|
3651
|
-
const menu = (jsxRuntimeExports.jsx(Menu, Object.assign({ className: css(className), ref: menuRef, onSelect: (event, value) => {
|
|
3652
|
-
var _a;
|
|
3653
|
-
onSelect && onSelect(event, value);
|
|
3654
|
-
shouldFocusToggleOnSelect && ((_a = toggleRef.current) === null || _a === void 0 ? void 0 : _a.focus());
|
|
3655
|
-
}, isPlain: isPlain, isScrollable: scrollable }, props, ouiaProps, { children: jsxRuntimeExports.jsx(MenuContent, { menuHeight: menuHeight, maxMenuHeight: maxMenuHeight, children: children }) })));
|
|
3656
|
-
return (jsxRuntimeExports.jsx(Popper, Object.assign({ trigger: typeof toggle === 'function' ? toggle(toggleRef) : toggle.toggleNode, triggerRef: toggleRef, popper: menu, popperRef: menuRef, isVisible: isOpen, zIndex: zIndex }, popperProps)));
|
|
3657
|
-
};
|
|
3658
|
-
const Dropdown = reactExports.forwardRef((props, ref) => (jsxRuntimeExports.jsx(DropdownBase, Object.assign({ innerRef: ref }, props))));
|
|
3659
|
-
Dropdown.displayName = 'Dropdown';
|
|
3660
|
-
|
|
3661
|
-
const DropdownItemBase = (_a) => {
|
|
3662
|
-
var { children, className, description, isDisabled, isAriaDisabled, value, onClick, ouiaId, ouiaSafe, innerRef, tooltipProps } = _a, props = __rest(_a, ["children", "className", "description", "isDisabled", "isAriaDisabled", "value", "onClick", "ouiaId", "ouiaSafe", "innerRef", "tooltipProps"]);
|
|
3663
|
-
const ouiaProps = useOUIAProps(DropdownItem.displayName, ouiaId, ouiaSafe);
|
|
3664
|
-
return (jsxRuntimeExports.jsx(MenuItem, Object.assign({ className: css(className), description: description, isDisabled: isDisabled, isAriaDisabled: isAriaDisabled, itemId: value, onClick: onClick, tooltipProps: tooltipProps, ref: innerRef }, ouiaProps, props, { children: children })));
|
|
3665
|
-
};
|
|
3666
|
-
const DropdownItem = reactExports.forwardRef((props, ref) => (jsxRuntimeExports.jsx(DropdownItemBase, Object.assign({}, props, { innerRef: ref }))));
|
|
3667
|
-
DropdownItem.displayName = 'DropdownItem';
|
|
3668
|
-
|
|
3669
|
-
const DropdownList = (_a) => {
|
|
3670
|
-
var { children, className } = _a, props = __rest(_a, ["children", "className"]);
|
|
3671
|
-
return (jsxRuntimeExports.jsx(MenuList, Object.assign({ className: css(className) }, props, { children: children })));
|
|
3672
|
-
};
|
|
3673
|
-
DropdownList.displayName = 'DropdownList';
|
|
3674
|
-
|
|
3675
|
-
const AngleDownIconConfig = {
|
|
3676
|
-
name: 'AngleDownIcon',
|
|
3677
|
-
height: 512,
|
|
3678
|
-
width: 320,
|
|
3679
|
-
svgPath: 'M143 352.3L7 216.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.2 9.4-24.4 9.4-33.8 0z',
|
|
3680
|
-
yOffset: 0,
|
|
3681
|
-
xOffset: 0,
|
|
3682
|
-
};
|
|
3683
|
-
|
|
3684
|
-
const AngleDownIcon = createIcon(AngleDownIconConfig);
|
|
3685
|
-
|
|
3686
|
-
export { ASTERISK as A, CaretDownIcon as C, Divider as D, GenerateId as G, MenuToggle as M, Popper as P, StarIcon as S, TimesIcon as T, AngleDownIcon as a, Dropdown as b, DropdownList as c, DropdownItem as d, Tooltip as e, checkStyles as f, Checkbox as g, handleArrows as h, menuStyles as m, setTabIndex as s, useIsomorphicLayoutEffect as u };
|