@shapio/cms 0.0.0-stage → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -2
- package/dist/admin/apple-touch-icon.png +0 -0
- package/dist/admin/assets/AssistError-BITJ_tpg.js +2 -0
- package/dist/admin/assets/AssistError-BITJ_tpg.js.map +1 -0
- package/dist/admin/assets/BlockMenuItems-CcluK965.js +6 -0
- package/dist/admin/assets/BlockMenuItems-CcluK965.js.map +1 -0
- package/dist/admin/assets/Body-BXa9DhtH.js +2 -0
- package/dist/admin/assets/Body-BXa9DhtH.js.map +1 -0
- package/dist/admin/assets/Builder-DcpRfXuc.js +2 -0
- package/dist/admin/assets/Builder-DcpRfXuc.js.map +1 -0
- package/dist/admin/assets/ConfirmDialog-B9nWhIIz.js +2 -0
- package/dist/admin/assets/ConfirmDialog-B9nWhIIz.js.map +1 -0
- package/dist/admin/assets/CopyButton-BoWb-xi1.js +2 -0
- package/dist/admin/assets/CopyButton-BoWb-xi1.js.map +1 -0
- package/dist/admin/assets/CursorPager-BnxmTk47.js +2 -0
- package/dist/admin/assets/CursorPager-BnxmTk47.js.map +1 -0
- package/dist/admin/assets/ExternalLink-Eeb9mONJ.js +2 -0
- package/dist/admin/assets/ExternalLink-Eeb9mONJ.js.map +1 -0
- package/dist/admin/assets/Form-DZRLD3vH.js +2 -0
- package/dist/admin/assets/Form-DZRLD3vH.js.map +1 -0
- package/dist/admin/assets/FormCheckboxGroup-uIC2XQIL.js +2 -0
- package/dist/admin/assets/FormCheckboxGroup-uIC2XQIL.js.map +1 -0
- package/dist/admin/assets/FormRadioGroup-hd95vPOu.js +2 -0
- package/dist/admin/assets/FormRadioGroup-hd95vPOu.js.map +1 -0
- package/dist/admin/assets/FormSelectField-D7VHmnx5.js +2 -0
- package/dist/admin/assets/FormSelectField-D7VHmnx5.js.map +1 -0
- package/dist/admin/assets/FormSwitchField-ft8Jbe6E.js +2 -0
- package/dist/admin/assets/FormSwitchField-ft8Jbe6E.js.map +1 -0
- package/dist/admin/assets/FormTextareaField-DzyOzfZb.js +2 -0
- package/dist/admin/assets/FormTextareaField-DzyOzfZb.js.map +1 -0
- package/dist/admin/assets/HintedLabel-CvC46uy_.js +2 -0
- package/dist/admin/assets/HintedLabel-CvC46uy_.js.map +1 -0
- package/dist/admin/assets/InfoHint-GJLRVumb.js +2 -0
- package/dist/admin/assets/InfoHint-GJLRVumb.js.map +1 -0
- package/dist/admin/assets/InsertMenuItem-D976G0Rj.js +2 -0
- package/dist/admin/assets/InsertMenuItem-D976G0Rj.js.map +1 -0
- package/dist/admin/assets/LinkTabs-BZSlA57U.js +2 -0
- package/dist/admin/assets/LinkTabs-BZSlA57U.js.map +1 -0
- package/dist/admin/assets/Match-DdxTHHM4.js +2 -0
- package/dist/admin/assets/Match-DdxTHHM4.js.map +1 -0
- package/dist/admin/assets/Panel-iIKjEURi.js +2 -0
- package/dist/admin/assets/Panel-iIKjEURi.js.map +1 -0
- package/dist/admin/assets/QueryView-D6aZQJRN.js +2 -0
- package/dist/admin/assets/QueryView-D6aZQJRN.js.map +1 -0
- package/dist/admin/assets/RadioTile-BpB79rIK.js +2 -0
- package/dist/admin/assets/RadioTile-BpB79rIK.js.map +1 -0
- package/dist/admin/assets/RichTextField-BuHCONPu.js +144 -0
- package/dist/admin/assets/RichTextField-BuHCONPu.js.map +1 -0
- package/dist/admin/assets/RowTitle--uFCpx8n.js +2 -0
- package/dist/admin/assets/RowTitle--uFCpx8n.js.map +1 -0
- package/dist/admin/assets/SecretReveal-DFpzeNE0.js +2 -0
- package/dist/admin/assets/SecretReveal-DFpzeNE0.js.map +1 -0
- package/dist/admin/assets/SharedGlyph-Cqkx30tn.js +2 -0
- package/dist/admin/assets/SharedGlyph-Cqkx30tn.js.map +1 -0
- package/dist/admin/assets/StepList-BY5MuJPJ.js +2 -0
- package/dist/admin/assets/StepList-BY5MuJPJ.js.map +1 -0
- package/dist/admin/assets/Structure-CqRa2t7z.js +2 -0
- package/dist/admin/assets/Structure-CqRa2t7z.js.map +1 -0
- package/dist/admin/assets/SubNavLink-B2o4kSZ9.js +2 -0
- package/dist/admin/assets/SubNavLink-B2o4kSZ9.js.map +1 -0
- package/dist/admin/assets/SuggestAltButton-4rf2xhEJ.js +2 -0
- package/dist/admin/assets/SuggestAltButton-4rf2xhEJ.js.map +1 -0
- package/dist/admin/assets/TextLink-D15oyXlc.js +2 -0
- package/dist/admin/assets/TextLink-D15oyXlc.js.map +1 -0
- package/dist/admin/assets/Thumbnail-CP5mfgNY.js +2 -0
- package/dist/admin/assets/Thumbnail-CP5mfgNY.js.map +1 -0
- package/dist/admin/assets/UnsavedChangesGuard-DgOASh0p.js +2 -0
- package/dist/admin/assets/UnsavedChangesGuard-DgOASh0p.js.map +1 -0
- package/dist/admin/assets/UserAvatar-BocvNVL-.js +2 -0
- package/dist/admin/assets/UserAvatar-BocvNVL-.js.map +1 -0
- package/dist/admin/assets/View-BLsQYPow.js +11 -0
- package/dist/admin/assets/View-BLsQYPow.js.map +1 -0
- package/dist/admin/assets/arrow-up-gf_j6SVQ.js +2 -0
- package/dist/admin/assets/arrow-up-gf_j6SVQ.js.map +1 -0
- package/dist/admin/assets/auth-pcS9CCXu.js +2 -0
- package/dist/admin/assets/auth-pcS9CCXu.js.map +1 -0
- package/dist/admin/assets/badge-DD0mE96i.js +2 -0
- package/dist/admin/assets/badge-DD0mE96i.js.map +1 -0
- package/dist/admin/assets/boxes-DcK-kaSa.js +2 -0
- package/dist/admin/assets/boxes-DcK-kaSa.js.map +1 -0
- package/dist/admin/assets/calendar-clock-DEwACe0M.js +2 -0
- package/dist/admin/assets/calendar-clock-DEwACe0M.js.map +1 -0
- package/dist/admin/assets/changeSets-BjUEfYbj.js +2 -0
- package/dist/admin/assets/changeSets-BjUEfYbj.js.map +1 -0
- package/dist/admin/assets/chevron-left-BsQYDUEC.js +2 -0
- package/dist/admin/assets/chevron-left-BsQYDUEC.js.map +1 -0
- package/dist/admin/assets/circle-check-Dq1owihe.js +2 -0
- package/dist/admin/assets/circle-check-Dq1owihe.js.map +1 -0
- package/dist/admin/assets/circle-x-Dx6zIZko.js +2 -0
- package/dist/admin/assets/circle-x-Dx6zIZko.js.map +1 -0
- package/dist/admin/assets/client-C8vMCv-p.js +10 -0
- package/dist/admin/assets/client-C8vMCv-p.js.map +1 -0
- package/dist/admin/assets/clock-DQvkffqQ.js +2 -0
- package/dist/admin/assets/clock-DQvkffqQ.js.map +1 -0
- package/dist/admin/assets/cn-BQ3voEft.js +2 -0
- package/dist/admin/assets/cn-BQ3voEft.js.map +1 -0
- package/dist/admin/assets/coerce-OsqQRj19.js +2 -0
- package/dist/admin/assets/coerce-OsqQRj19.js.map +1 -0
- package/dist/admin/assets/constants-DCtq_UOe.js +2 -0
- package/dist/admin/assets/constants-DCtq_UOe.js.map +1 -0
- package/dist/admin/assets/constants-DUBUgzpU.js +2 -0
- package/dist/admin/assets/constants-DUBUgzpU.js.map +1 -0
- package/dist/admin/assets/constants-SrImR6C3.js +2 -0
- package/dist/admin/assets/constants-SrImR6C3.js.map +1 -0
- package/dist/admin/assets/content-_SLbbnfX.js +3 -0
- package/dist/admin/assets/content-_SLbbnfX.js.map +1 -0
- package/dist/admin/assets/contentCounts-Ch3uMXVU.js +2 -0
- package/dist/admin/assets/contentCounts-Ch3uMXVU.js.map +1 -0
- package/dist/admin/assets/contentTypes-BCOdUK_Z.js +2 -0
- package/dist/admin/assets/contentTypes-BCOdUK_Z.js.map +1 -0
- package/dist/admin/assets/copy-BDc3r0fO.js +2 -0
- package/dist/admin/assets/copy-BDc3r0fO.js.map +1 -0
- package/dist/admin/assets/dateTimeLocal-C92tyKwz.js +2 -0
- package/dist/admin/assets/dateTimeLocal-C92tyKwz.js.map +1 -0
- package/dist/admin/assets/defineEditor-CiJc766Y.js +2 -0
- package/dist/admin/assets/defineEditor-CiJc766Y.js.map +1 -0
- package/dist/admin/assets/develop-DS9TlDmv.js +11 -0
- package/dist/admin/assets/develop-DS9TlDmv.js.map +1 -0
- package/dist/admin/assets/dropdown-menu-gmP2Rp3n.js +2 -0
- package/dist/admin/assets/dropdown-menu-gmP2Rp3n.js.map +1 -0
- package/dist/admin/assets/ellipsis-NK0pWgqU.js +2 -0
- package/dist/admin/assets/ellipsis-NK0pWgqU.js.map +1 -0
- package/dist/admin/assets/external-link-D3Aoi2yX.js +2 -0
- package/dist/admin/assets/external-link-D3Aoi2yX.js.map +1 -0
- package/dist/admin/assets/file-text-DxXAmmxL.js +2 -0
- package/dist/admin/assets/file-text-DxXAmmxL.js.map +1 -0
- package/dist/admin/assets/fileRoute-C2tOrKhO.js +2 -0
- package/dist/admin/assets/fileRoute-C2tOrKhO.js.map +1 -0
- package/dist/admin/assets/followPlural-CN6cQfNk.js +2 -0
- package/dist/admin/assets/followPlural-CN6cQfNk.js.map +1 -0
- package/dist/admin/assets/globe-CuElSilX.js +2 -0
- package/dist/admin/assets/globe-CuElSilX.js.map +1 -0
- package/dist/admin/assets/image-CsH8dZve.js +2 -0
- package/dist/admin/assets/image-CsH8dZve.js.map +1 -0
- package/dist/admin/assets/image-off-B_uBCsYu.js +2 -0
- package/dist/admin/assets/image-off-B_uBCsYu.js.map +1 -0
- package/dist/admin/assets/inbox-3iAHL3pC.js +2 -0
- package/dist/admin/assets/inbox-3iAHL3pC.js.map +1 -0
- package/dist/admin/assets/inbox-DsuXNaKE.js +2 -0
- package/dist/admin/assets/inbox-DsuXNaKE.js.map +1 -0
- package/dist/admin/assets/index-BLYOgCKc.css +2 -0
- package/dist/admin/assets/index-BSzXA60W.js +4 -0
- package/dist/admin/assets/index-BSzXA60W.js.map +1 -0
- package/dist/admin/assets/jsx-runtime-DREnUpxT.js +2 -0
- package/dist/admin/assets/jsx-runtime-DREnUpxT.js.map +1 -0
- package/dist/admin/assets/key-round-B17HiT3K.js +2 -0
- package/dist/admin/assets/key-round-B17HiT3K.js.map +1 -0
- package/dist/admin/assets/link-2-off-hWGS8LW6.js +2 -0
- package/dist/admin/assets/link-2-off-hWGS8LW6.js.map +1 -0
- package/dist/admin/assets/link-bhHmG4Tc.js +2 -0
- package/dist/admin/assets/link-bhHmG4Tc.js.map +1 -0
- package/dist/admin/assets/list-DRtRdjBC.js +2 -0
- package/dist/admin/assets/list-DRtRdjBC.js.map +1 -0
- package/dist/admin/assets/locales-BzPbz8FF.js +2 -0
- package/dist/admin/assets/locales-BzPbz8FF.js.map +1 -0
- package/dist/admin/assets/media-WLnWaL7U.js +2 -0
- package/dist/admin/assets/media-WLnWaL7U.js.map +1 -0
- package/dist/admin/assets/media-Xzot1ueY.js +2 -0
- package/dist/admin/assets/media-Xzot1ueY.js.map +1 -0
- package/dist/admin/assets/modelPermissions-DZ1lWfQZ.js +2 -0
- package/dist/admin/assets/modelPermissions-DZ1lWfQZ.js.map +1 -0
- package/dist/admin/assets/network-DHGqLwji.js +2 -0
- package/dist/admin/assets/network-DHGqLwji.js.map +1 -0
- package/dist/admin/assets/pencil-Bdp2z9D_.js +2 -0
- package/dist/admin/assets/pencil-Bdp2z9D_.js.map +1 -0
- package/dist/admin/assets/plus-BN_iSsnp.js +2 -0
- package/dist/admin/assets/plus-BN_iSsnp.js.map +1 -0
- package/dist/admin/assets/preload-helper-DAbCfXID.js +2 -0
- package/dist/admin/assets/preload-helper-DAbCfXID.js.map +1 -0
- package/dist/admin/assets/publishing-B7zv1e7j.js +2 -0
- package/dist/admin/assets/publishing-B7zv1e7j.js.map +1 -0
- package/dist/admin/assets/publishing-d9yhMwgA.js +2 -0
- package/dist/admin/assets/publishing-d9yhMwgA.js.map +1 -0
- package/dist/admin/assets/radio-group-DHIxK-IU.js +2 -0
- package/dist/admin/assets/radio-group-DHIxK-IU.js.map +1 -0
- package/dist/admin/assets/react-CQOZoUwg.js +2 -0
- package/dist/admin/assets/react-CQOZoUwg.js.map +1 -0
- package/dist/admin/assets/react-dom-pEVw9mjF.js +2 -0
- package/dist/admin/assets/react-dom-pEVw9mjF.js.map +1 -0
- package/dist/admin/assets/rolldown-runtime-Dd_uD5pT.js +1 -0
- package/dist/admin/assets/root-CDpNo7ef.js +2 -0
- package/dist/admin/assets/root-CDpNo7ef.js.map +1 -0
- package/dist/admin/assets/rotate-ccw-CBoZle-b.js +2 -0
- package/dist/admin/assets/rotate-ccw-CBoZle-b.js.map +1 -0
- package/dist/admin/assets/schedules-Dy89Nm6P.js +2 -0
- package/dist/admin/assets/schedules-Dy89Nm6P.js.map +1 -0
- package/dist/admin/assets/schema-B4smPFcR.js +2 -0
- package/dist/admin/assets/schema-B4smPFcR.js.map +1 -0
- package/dist/admin/assets/scroll-text-UbyzpWh-.js +2 -0
- package/dist/admin/assets/scroll-text-UbyzpWh-.js.map +1 -0
- package/dist/admin/assets/search-_YlNpPvU.js +2 -0
- package/dist/admin/assets/search-_YlNpPvU.js.map +1 -0
- package/dist/admin/assets/searchSchema-CvOhn4FV.js +2 -0
- package/dist/admin/assets/searchSchema-CvOhn4FV.js.map +1 -0
- package/dist/admin/assets/searchSchemas-BxRnxenn.js +2 -0
- package/dist/admin/assets/searchSchemas-BxRnxenn.js.map +1 -0
- package/dist/admin/assets/sections-Bb3Q4bcY.js +2 -0
- package/dist/admin/assets/sections-Bb3Q4bcY.js.map +1 -0
- package/dist/admin/assets/sections-DiySZZHb.js +2 -0
- package/dist/admin/assets/sections-DiySZZHb.js.map +1 -0
- package/dist/admin/assets/select-tHVWX85X.js +2 -0
- package/dist/admin/assets/select-tHVWX85X.js.map +1 -0
- package/dist/admin/assets/send-BqECHYi6.js +2 -0
- package/dist/admin/assets/send-BqECHYi6.js.map +1 -0
- package/dist/admin/assets/settings-D-v8gL8F.js +2 -0
- package/dist/admin/assets/settings-D-v8gL8F.js.map +1 -0
- package/dist/admin/assets/settle-LRKtTN_e.js +2 -0
- package/dist/admin/assets/settle-LRKtTN_e.js.map +1 -0
- package/dist/admin/assets/shared-react-KADNSNpb.js +1 -0
- package/dist/admin/assets/shared-react-dom-BpneAejY.js +1 -0
- package/dist/admin/assets/shared-react-dom-client-CnpZTXxo.js +1 -0
- package/dist/admin/assets/shared-react-jsx-runtime-CU_Fm1m8.js +1 -0
- package/dist/admin/assets/shared-shapio-editor-sdk-9ANIbEN0.js +1 -0
- package/dist/admin/assets/sites-C6_THCVK.js +2 -0
- package/dist/admin/assets/sites-C6_THCVK.js.map +1 -0
- package/dist/admin/assets/skeleton-C3QLIh7W.js +42 -0
- package/dist/admin/assets/skeleton-C3QLIh7W.js.map +1 -0
- package/dist/admin/assets/snapshots-BQrhsCmC.js +2 -0
- package/dist/admin/assets/snapshots-BQrhsCmC.js.map +1 -0
- package/dist/admin/assets/sparkles-BW4CbD6W.js +2 -0
- package/dist/admin/assets/sparkles-BW4CbD6W.js.map +1 -0
- package/dist/admin/assets/src-XaU0N8C-.js +4 -0
- package/dist/admin/assets/src-XaU0N8C-.js.map +1 -0
- package/dist/admin/assets/stableId-C9Yq5iUw.js +2 -0
- package/dist/admin/assets/stableId-C9Yq5iUw.js.map +1 -0
- package/dist/admin/assets/store-BphwUzV5.js +2 -0
- package/dist/admin/assets/store-BphwUzV5.js.map +1 -0
- package/dist/admin/assets/switch-BVy02Vc8.js +2 -0
- package/dist/admin/assets/switch-BVy02Vc8.js.map +1 -0
- package/dist/admin/assets/table-CZYtdoHn.js +56 -0
- package/dist/admin/assets/table-CZYtdoHn.js.map +1 -0
- package/dist/admin/assets/tabs-quHbeVxA.js +5 -0
- package/dist/admin/assets/tabs-quHbeVxA.js.map +1 -0
- package/dist/admin/assets/textarea-B8Vl5gJ1.js +2 -0
- package/dist/admin/assets/textarea-B8Vl5gJ1.js.map +1 -0
- package/dist/admin/assets/titles-B2z5ckxG.js +2 -0
- package/dist/admin/assets/titles-B2z5ckxG.js.map +1 -0
- package/dist/admin/assets/tokens-Fh_OeIlf.js +2 -0
- package/dist/admin/assets/tokens-Fh_OeIlf.js.map +1 -0
- package/dist/admin/assets/tooltip-DwqM3opE.js +2 -0
- package/dist/admin/assets/tooltip-DwqM3opE.js.map +1 -0
- package/dist/admin/assets/undo-2-D4Fz4JMZ.js +2 -0
- package/dist/admin/assets/undo-2-D4Fz4JMZ.js.map +1 -0
- package/dist/admin/assets/useAuditLabels-DKrsrciQ.js +2 -0
- package/dist/admin/assets/useAuditLabels-DKrsrciQ.js.map +1 -0
- package/dist/admin/assets/useConfirmTarget-Dp8mCulm.js +2 -0
- package/dist/admin/assets/useConfirmTarget-Dp8mCulm.js.map +1 -0
- package/dist/admin/assets/useContentSchema-Bv4_6VJR.js +2 -0
- package/dist/admin/assets/useContentSchema-Bv4_6VJR.js.map +1 -0
- package/dist/admin/assets/useCursorPager-B1upg5EU.js +2 -0
- package/dist/admin/assets/useCursorPager-B1upg5EU.js.map +1 -0
- package/dist/admin/assets/useDebouncedValue-Dqs3wwhn.js +2 -0
- package/dist/admin/assets/useDebouncedValue-Dqs3wwhn.js.map +1 -0
- package/dist/admin/assets/useDiscardGuard-34ynGJIk.js +2 -0
- package/dist/admin/assets/useDiscardGuard-34ynGJIk.js.map +1 -0
- package/dist/admin/assets/useMediaUploader-QXSjZStv.js +2 -0
- package/dist/admin/assets/useMediaUploader-QXSjZStv.js.map +1 -0
- package/dist/admin/assets/usePaletteItems-62-TZhy7.js +2 -0
- package/dist/admin/assets/usePaletteItems-62-TZhy7.js.map +1 -0
- package/dist/admin/assets/usePlaces-CY6f2DmI.js +2 -0
- package/dist/admin/assets/usePlaces-CY6f2DmI.js.map +1 -0
- package/dist/admin/assets/useQueries-BuKJBA0M.js +2 -0
- package/dist/admin/assets/useQueries-BuKJBA0M.js.map +1 -0
- package/dist/admin/assets/useSaveShortcut-rKtp1qK7.js +2 -0
- package/dist/admin/assets/useSaveShortcut-rKtp1qK7.js.map +1 -0
- package/dist/admin/assets/useSchemaScopeAccess-DUBeS9kU.js +2 -0
- package/dist/admin/assets/useSchemaScopeAccess-DUBeS9kU.js.map +1 -0
- package/dist/admin/assets/useSearchInput-1fDoEtXe.js +2 -0
- package/dist/admin/assets/useSearchInput-1fDoEtXe.js.map +1 -0
- package/dist/admin/assets/users-BOn2ohJQ.js +2 -0
- package/dist/admin/assets/users-BOn2ohJQ.js.map +1 -0
- package/dist/admin/assets/users-BkKc4MNB.js +2 -0
- package/dist/admin/assets/users-BkKc4MNB.js.map +1 -0
- package/dist/admin/assets/w3c-keyname-BOAvb0qz.js +2 -0
- package/dist/admin/assets/w3c-keyname-BOAvb0qz.js.map +1 -0
- package/dist/admin/assets/zod-BHAd1wTC.js +2 -0
- package/dist/admin/assets/zod-BHAd1wTC.js.map +1 -0
- package/dist/admin/favicon-32.png +0 -0
- package/dist/admin/favicon.svg +5 -0
- package/dist/admin/fonts/OFL-SourceSerif4.txt +93 -0
- package/dist/admin/fonts/OFL.txt +93 -0
- package/dist/admin/fonts/manrope-latin-ext-wght-normal.woff2 +0 -0
- package/dist/admin/fonts/manrope-latin-wght-normal.woff2 +0 -0
- package/dist/admin/fonts/source-serif-4-latin-ext-wght-italic.woff2 +0 -0
- package/dist/admin/fonts/source-serif-4-latin-ext-wght-normal.woff2 +0 -0
- package/dist/admin/fonts/source-serif-4-latin-wght-italic.woff2 +0 -0
- package/dist/admin/fonts/source-serif-4-latin-wght-normal.woff2 +0 -0
- package/dist/admin/index.html +90 -0
- package/dist/admin/theme-init.js +18 -0
- package/dist/cli.js +5383 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +2 -0
- package/dist/config.js +39 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +1056 -0
- package/dist/index.js +3 -0
- package/dist/public-CGO8RBn3.d.ts +1185 -0
- package/dist/worker-BLXy8aRW.js +47532 -0
- package/dist/worker-BLXy8aRW.js.map +1 -0
- package/package.json +97 -3
- package/vendor/graphiql/LICENSE.graphiql +21 -0
- package/vendor/graphiql/LICENSE.react +21 -0
- package/vendor/graphiql/LICENSE.react-dom +21 -0
- package/vendor/graphiql/graphiql.min.css +1 -0
- package/vendor/graphiql/graphiql.min.js +46 -0
- package/vendor/graphiql/react-dom.production.min.js +267 -0
- package/vendor/graphiql/react.production.min.js +31 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).GraphiQL=t(e.React,e.ReactDOM)}(this,(function(e,t){"use strict";function n(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const n in e)if("default"!==n){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}return t.default=e,Object.freeze(t)}function r(e,t){for(var n=0;n<t.length;n++){const r=t[n];if("string"!=typeof r&&!Array.isArray(r))for(const t in r)if("default"!==t&&!(t in e)){const n=Object.getOwnPropertyDescriptor(r,t);n&&Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const i=n(e),o=n(t);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var s={exports:{}},l={},c=e,u=Symbol.for("react.element"),d=Symbol.for("react.fragment"),f=Object.prototype.hasOwnProperty,p=c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,h={key:!0,ref:!0,__self:!0,__source:!0};function m(e,t,n){var r,i={},o=null,a=null;for(r in void 0!==n&&(o=""+n),void 0!==t.key&&(o=""+t.key),void 0!==t.ref&&(a=t.ref),t)f.call(t,r)&&!h.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:u,type:e,key:o,ref:a,props:i,_owner:p.current}}l.Fragment=d,l.jsx=m,l.jsxs=m,s.exports=l;var v=s.exports,g=Object.create,y=Object.defineProperty,b=Object.getOwnPropertyDescriptor,E=Object.getOwnPropertyNames,x=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,T=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of E(t))w.call(e,i)||i===n||y(e,i,{get:()=>t[i],enumerable:!(r=b(t,i))||r.enumerable});return e},C={};
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*
|
|
8
|
+
* @lightSyntaxTransform
|
|
9
|
+
* @noflow
|
|
10
|
+
* @nolint
|
|
11
|
+
* @preventMunge
|
|
12
|
+
* @preserve-invariant-messages
|
|
13
|
+
*/((e,t)=>{for(var n in t)y(e,n,{get:t[n],enumerable:!0})})(C,{$dispatcherGuard:()=>B,$makeReadOnly:()=>U,$reset:()=>$,$structuralCheck:()=>G,c:()=>R,clearRenderCounterRegistry:()=>q,renderCounterRegistry:()=>H,useRenderCounter:()=>z});var k,S,_,N=(k=C,T(y({},"__esModule",{value:!0}),k)),A=((e,t,n)=>(n=null!=e?g(x(e)):{},T(e&&e.__esModule?n:y(n,"default",{value:e,enumerable:!0}),e)))(e),{useRef:D,useEffect:I,isValidElement:O}=A,L=null!=(S=A.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)?S:A.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,F=Symbol.for("react.memo_cache_sentinel"),R="function"==typeof(null==(_=A.__COMPILER_RUNTIME)?void 0:_.c)?A.__COMPILER_RUNTIME.c:function(e){return A.useMemo((()=>{const t=new Array(e);for(let n=0;n<e;n++)t[n]=F;return t[F]=!0,t}),[])},M={};["readContext","useCallback","useContext","useEffect","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useDebugValue","useDeferredValue","useTransition","useMutableSource","useSyncExternalStore","useId","unstable_isNewReconciler","getCacheSignal","getCacheForType","useCacheRefresh"].forEach((e=>{M[e]=()=>{throw new Error(`[React] Unexpected React hook call (${e}) from a React compiled function. Check that all hooks are called directly and named according to convention ('use[A-Z]') `)}}));var P=null;function j(e){return L.ReactCurrentDispatcher.current=e,L.ReactCurrentDispatcher.current}M.useMemoCache=e=>{if(null==P)throw new Error("React Compiler internal invariant violation: unexpected null dispatcher");return P.useMemoCache(e)};var V=[];function B(e){const t=L.ReactCurrentDispatcher.current;if(0===e){if(V.push(t),1===V.length&&(P=t),t===M)throw new Error("[React] Unexpected call to custom hook or component from a React compiled function. Check that (1) all hooks are called directly and named according to convention ('use[A-Z]') and (2) components are returned as JSX instead of being directly invoked.");j(M)}else if(1===e){const e=V.pop();if(null==e)throw new Error("React Compiler internal error: unexpected null in guard stack");0===V.length&&(P=null),j(e)}else if(2===e)V.push(t),j(P);else{if(3!==e)throw new Error("React Compiler internal error: unreachable block"+e);{const e=V.pop();if(null==e)throw new Error("React Compiler internal error: unexpected null in guard stack");j(e)}}}function $(e){for(let t=0;t<e.length;t++)e[t]=F}function U(){throw new Error("TODO: implement $makeReadOnly in react-compiler-runtime")}var H=new Map;function q(){for(const e of H.values())e.forEach((e=>{e.count=0}))}function z(e){const t=D(null);null!=t.current&&(t.current.count+=1),I((()=>{if(null==t.current){const n={count:0};!function(e,t){let n=H.get(e);null==n&&(n=new Set,H.set(e,n)),n.add(t)}(e,n),t.current=n}return()=>{null!==t.current&&function(e,t){const n=H.get(e);null!=n&&n.delete(t)}(e,t.current)}}))}var W=new Set;function G(e,t,n,r,i,o){function a(e,t,a,s){const l=`${r}:${o} [${i}] ${n}${a} changed from ${e} to ${t} at depth ${s}`;W.has(l)||(W.add(l),console.error(l))}!function e(t,n,r,i){if(!(i>2)&&t!==n)if(typeof t!=typeof n)a("type "+typeof t,"type "+typeof n,r,i);else if("object"==typeof t){const o=Array.isArray(t),s=Array.isArray(n);if(null===t&&null!==n)a("null","type "+typeof n,r,i);else if(null===n)a("type "+typeof t,"null",r,i);else if(t instanceof Map)if(n instanceof Map)if(t.size!==n.size)a(`Map instance with size ${t.size}`,`Map instance with size ${n.size}`,r,i);else for(const[l,c]of t)n.has(l)?e(c,n.get(l),`${r}.get(${l})`,i+1):a(`Map instance with key ${l}`,`Map instance without key ${l}`,r,i);else a("Map instance","other value",r,i);else if(n instanceof Map)a("other value","Map instance",r,i);else if(t instanceof Set)if(n instanceof Set)if(t.size!==n.size)a(`Set instance with size ${t.size}`,`Set instance with size ${n.size}`,r,i);else for(const e of n)t.has(e)||a(`Set instance without element ${e}`,`Set instance with element ${e}`,r,i);else a("Set instance","other value",r,i);else if(n instanceof Set)a("other value","Set instance",r,i);else if(o||s)if(o!==s)a("type "+(o?"array":"object"),"type "+(s?"array":"object"),r,i);else if(t.length!==n.length)a(`array with length ${t.length}`,`array with length ${n.length}`,r,i);else for(let a=0;a<t.length;a++)e(t[a],n[a],`${r}[${a}]`,i+1);else if(O(t)||O(n))O(t)!==O(n)?a("type "+(O(t)?"React element":"object"),"type "+(O(n)?"React element":"object"),r,i):t.type!==n.type?a(`React element of type ${t.type}`,`React element of type ${n.type}`,r,i):e(t.props,n.props,`[props of ${r}]`,i+1);else{for(const e in n)e in t||a(`object without key ${e}`,`object with key ${e}`,r,i);for(const o in t)o in n?e(t[o],n[o],`${r}.${o}`,i+1):a(`object with key ${o}`,`object without key ${o}`,r,i)}}else{if("function"==typeof t)return;isNaN(t)||isNaN(n)?isNaN(t)!==isNaN(n)&&a(""+(isNaN(t)?"NaN":"non-NaN value"),""+(isNaN(n)?"NaN":"non-NaN value"),r,i):t!==n&&a(t,n,r,i)}}(e,t,"",0)}function Y(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Y(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function K(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Y(e))&&(r&&(r+=" "),r+=t);return r}const Q=Object.freeze({major:16,minor:9,patch:0,preReleaseTag:null});function X(e,t){if(!Boolean(e))throw new Error(t)}function J(e){return"function"==typeof(null==e?void 0:e.then)}function Z(e){return"object"==typeof e&&null!==e}function ee(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}const te=/\r\n|[\n\r]/g;function ne(e,t){let n=0,r=1;for(const i of e.body.matchAll(te)){if("number"==typeof i.index||ee(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function re(e){return ie(e.source,ne(e.source,e.start))}function ie(e,t){const n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,o=e.locationOffset.line-1,a=t.line+o,s=1===t.line?n:0,l=t.column+s,c=`${e.name}:${a}:${l}\n`,u=r.split(/\r\n|[\n\r]/g),d=u[i];if(d.length>120){const e=Math.floor(l/80),t=l%80,n=[];for(let r=0;r<d.length;r+=80)n.push(d.slice(r,r+80));return c+oe([[`${a} |`,n[0]],...n.slice(1,e+1).map((e=>["|",e])),["|","^".padStart(t)],["|",n[e+1]]])}return c+oe([[a-1+" |",u[i-1]],[`${a} |`,d],["|","^".padStart(l)],[`${a+1} |`,u[i+1]]])}function oe(e){const t=e.filter((([e,t])=>void 0!==t)),n=Math.max(...t.map((([e])=>e.length)));return t.map((([e,t])=>e.padStart(n)+(t?" "+t:""))).join("\n")}class ae extends Error{constructor(e,...t){var n,r,i;const{nodes:o,source:a,positions:s,path:l,originalError:c,extensions:u}=function(e){const t=e[0];return null==t||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}(t);super(e),this.name="GraphQLError",this.path=null!=l?l:void 0,this.originalError=null!=c?c:void 0,this.nodes=se(Array.isArray(o)?o:o?[o]:void 0);const d=se(null===(n=this.nodes)||void 0===n?void 0:n.map((e=>e.loc)).filter((e=>null!=e)));this.source=null!=a?a:null==d||null===(r=d[0])||void 0===r?void 0:r.source,this.positions=null!=s?s:null==d?void 0:d.map((e=>e.start)),this.locations=s&&a?s.map((e=>ne(a,e))):null==d?void 0:d.map((e=>ne(e.source,e.start)));const f=Z(null==c?void 0:c.extensions)?null==c?void 0:c.extensions:void 0;this.extensions=null!==(i=null!=u?u:f)&&void 0!==i?i:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=c&&c.stack?Object.defineProperty(this,"stack",{value:c.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,ae):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const t of this.nodes)t.loc&&(e+="\n\n"+re(t.loc));else if(this.source&&this.locations)for(const t of this.locations)e+="\n\n"+ie(this.source,t);return e}toJSON(){const e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function se(e){return void 0===e||0===e.length?void 0:e}function le(e,t,n){return new ae(`Syntax Error: ${n}`,{source:e,positions:[t]})}let ce=class{constructor(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},ue=class{constructor(e,t,n,r,i,o){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}};const de={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},fe=new Set(Object.keys(de));function pe(e){const t=null==e?void 0:e.kind;return"string"==typeof t&&fe.has(t)}var he,me,ve,ge,ye,be,Ee,xe;function we(e){return 9===e||32===e}function Te(e){return e>=48&&e<=57}function Ce(e){return e>=97&&e<=122||e>=65&&e<=90}function ke(e){return Ce(e)||95===e}function Se(e){return Ce(e)||Te(e)||95===e}function _e(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let a=0;a<e.length;++a){var o;const t=e[a],s=Ne(t);s!==t.length&&(r=null!==(o=r)&&void 0!==o?o:a,i=a,0!==a&&s<n&&(n=s))}return e.map(((e,t)=>0===t?e:e.slice(n))).slice(null!==(t=r)&&void 0!==t?t:0,i+1)}function Ne(e){let t=0;for(;t<e.length&&we(e.charCodeAt(t));)++t;return t}function Ae(e){if(""===e)return!0;let t=!0,n=!1,r=!0,i=!1;for(let o=0;o<e.length;++o)switch(e.codePointAt(o)){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 11:case 12:case 14:case 15:case 13:return!1;case 10:if(t&&!i)return!1;i=!0,t=!0,n=!1;break;case 9:case 32:n||(n=t);break;default:r&&(r=n),t=!1}return!t&&(!r||!i)}function De(e,t){const n=e.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),i=1===r.length,o=r.length>1&&r.slice(1).every((e=>0===e.length||we(e.charCodeAt(0)))),a=n.endsWith('\\"""'),s=e.endsWith('"')&&!a,l=e.endsWith("\\"),c=s||l,u=!(null!=t&&t.minimize)&&(!i||e.length>70||c||o||a);let d="";const f=i&&we(e.charCodeAt(0));return(u&&!f||o)&&(d+="\n"),d+=n,(u||c)&&(d+="\n"),'"""'+d+'"""'}(me=he||(he={})).QUERY="query",me.MUTATION="mutation",me.SUBSCRIPTION="subscription",(ge=ve||(ve={})).QUERY="QUERY",ge.MUTATION="MUTATION",ge.SUBSCRIPTION="SUBSCRIPTION",ge.FIELD="FIELD",ge.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",ge.FRAGMENT_SPREAD="FRAGMENT_SPREAD",ge.INLINE_FRAGMENT="INLINE_FRAGMENT",ge.VARIABLE_DEFINITION="VARIABLE_DEFINITION",ge.SCHEMA="SCHEMA",ge.SCALAR="SCALAR",ge.OBJECT="OBJECT",ge.FIELD_DEFINITION="FIELD_DEFINITION",ge.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",ge.INTERFACE="INTERFACE",ge.UNION="UNION",ge.ENUM="ENUM",ge.ENUM_VALUE="ENUM_VALUE",ge.INPUT_OBJECT="INPUT_OBJECT",ge.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION",(be=ye||(ye={})).NAME="Name",be.DOCUMENT="Document",be.OPERATION_DEFINITION="OperationDefinition",be.VARIABLE_DEFINITION="VariableDefinition",be.SELECTION_SET="SelectionSet",be.FIELD="Field",be.ARGUMENT="Argument",be.FRAGMENT_SPREAD="FragmentSpread",be.INLINE_FRAGMENT="InlineFragment",be.FRAGMENT_DEFINITION="FragmentDefinition",be.VARIABLE="Variable",be.INT="IntValue",be.FLOAT="FloatValue",be.STRING="StringValue",be.BOOLEAN="BooleanValue",be.NULL="NullValue",be.ENUM="EnumValue",be.LIST="ListValue",be.OBJECT="ObjectValue",be.OBJECT_FIELD="ObjectField",be.DIRECTIVE="Directive",be.NAMED_TYPE="NamedType",be.LIST_TYPE="ListType",be.NON_NULL_TYPE="NonNullType",be.SCHEMA_DEFINITION="SchemaDefinition",be.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",be.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",be.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",be.FIELD_DEFINITION="FieldDefinition",be.INPUT_VALUE_DEFINITION="InputValueDefinition",be.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",be.UNION_TYPE_DEFINITION="UnionTypeDefinition",be.ENUM_TYPE_DEFINITION="EnumTypeDefinition",be.ENUM_VALUE_DEFINITION="EnumValueDefinition",be.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",be.DIRECTIVE_DEFINITION="DirectiveDefinition",be.SCHEMA_EXTENSION="SchemaExtension",be.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",be.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",be.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",be.UNION_TYPE_EXTENSION="UnionTypeExtension",be.ENUM_TYPE_EXTENSION="EnumTypeExtension",be.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension",(xe=Ee||(Ee={})).SOF="<SOF>",xe.EOF="<EOF>",xe.BANG="!",xe.DOLLAR="$",xe.AMP="&",xe.PAREN_L="(",xe.PAREN_R=")",xe.SPREAD="...",xe.COLON=":",xe.EQUALS="=",xe.AT="@",xe.BRACKET_L="[",xe.BRACKET_R="]",xe.BRACE_L="{",xe.PIPE="|",xe.BRACE_R="}",xe.NAME="Name",xe.INT="Int",xe.FLOAT="Float",xe.STRING="String",xe.BLOCK_STRING="BlockString",xe.COMMENT="Comment";class Ie{constructor(e){const t=new ue(Ee.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){this.lastToken=this.token;return this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==Ee.EOF)do{if(e.next)e=e.next;else{const t=Ve(this,e.end);e.next=t,t.prev=e,e=t}}while(e.kind===Ee.COMMENT);return e}}function Oe(e){return e===Ee.BANG||e===Ee.DOLLAR||e===Ee.AMP||e===Ee.PAREN_L||e===Ee.PAREN_R||e===Ee.SPREAD||e===Ee.COLON||e===Ee.EQUALS||e===Ee.AT||e===Ee.BRACKET_L||e===Ee.BRACKET_R||e===Ee.BRACE_L||e===Ee.PIPE||e===Ee.BRACE_R}function Le(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Fe(e,t){return Re(e.charCodeAt(t))&&Me(e.charCodeAt(t+1))}function Re(e){return e>=55296&&e<=56319}function Me(e){return e>=56320&&e<=57343}function Pe(e,t){const n=e.source.body.codePointAt(t);if(void 0===n)return Ee.EOF;if(n>=32&&n<=126){const e=String.fromCodePoint(n);return'"'===e?"'\"'":`"${e}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function je(e,t,n,r,i){const o=e.line,a=1+n-e.lineStart;return new ue(t,n,r,o,a,i)}function Ve(e,t){const n=e.source.body,r=n.length;let i=t;for(;i<r;){const t=n.charCodeAt(i);switch(t){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:10===n.charCodeAt(i+1)?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return Be(e,i);case 33:return je(e,Ee.BANG,i,i+1);case 36:return je(e,Ee.DOLLAR,i,i+1);case 38:return je(e,Ee.AMP,i,i+1);case 40:return je(e,Ee.PAREN_L,i,i+1);case 41:return je(e,Ee.PAREN_R,i,i+1);case 46:if(46===n.charCodeAt(i+1)&&46===n.charCodeAt(i+2))return je(e,Ee.SPREAD,i,i+3);break;case 58:return je(e,Ee.COLON,i,i+1);case 61:return je(e,Ee.EQUALS,i,i+1);case 64:return je(e,Ee.AT,i,i+1);case 91:return je(e,Ee.BRACKET_L,i,i+1);case 93:return je(e,Ee.BRACKET_R,i,i+1);case 123:return je(e,Ee.BRACE_L,i,i+1);case 124:return je(e,Ee.PIPE,i,i+1);case 125:return je(e,Ee.BRACE_R,i,i+1);case 34:return 34===n.charCodeAt(i+1)&&34===n.charCodeAt(i+2)?Ke(e,i):He(e,i)}if(Te(t)||45===t)return $e(e,i,t);if(ke(t))return Qe(e,i);throw le(e.source,i,39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":Le(t)||Fe(n,i)?`Unexpected character: ${Pe(e,i)}.`:`Invalid character: ${Pe(e,i)}.`)}return je(e,Ee.EOF,r,r)}function Be(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const e=n.charCodeAt(i);if(10===e||13===e)break;if(Le(e))++i;else{if(!Fe(n,i))break;i+=2}}return je(e,Ee.COMMENT,t,i,n.slice(t+1,i))}function $e(e,t,n){const r=e.source.body;let i=t,o=n,a=!1;if(45===o&&(o=r.charCodeAt(++i)),48===o){if(o=r.charCodeAt(++i),Te(o))throw le(e.source,i,`Invalid number, unexpected digit after 0: ${Pe(e,i)}.`)}else i=Ue(e,i,o),o=r.charCodeAt(i);if(46===o&&(a=!0,o=r.charCodeAt(++i),i=Ue(e,i,o),o=r.charCodeAt(i)),69!==o&&101!==o||(a=!0,o=r.charCodeAt(++i),43!==o&&45!==o||(o=r.charCodeAt(++i)),i=Ue(e,i,o),o=r.charCodeAt(i)),46===o||ke(o))throw le(e.source,i,`Invalid number, expected digit but got: ${Pe(e,i)}.`);return je(e,a?Ee.FLOAT:Ee.INT,t,i,r.slice(t,i))}function Ue(e,t,n){if(!Te(n))throw le(e.source,t,`Invalid number, expected digit but got: ${Pe(e,t)}.`);const r=e.source.body;let i=t+1;for(;Te(r.charCodeAt(i));)++i;return i}function He(e,t){const n=e.source.body,r=n.length;let i=t+1,o=i,a="";for(;i<r;){const r=n.charCodeAt(i);if(34===r)return a+=n.slice(o,i),je(e,Ee.STRING,t,i+1,a);if(92!==r){if(10===r||13===r)break;if(Le(r))++i;else{if(!Fe(n,i))throw le(e.source,i,`Invalid character within String: ${Pe(e,i)}.`);i+=2}}else{a+=n.slice(o,i);const t=117===n.charCodeAt(i+1)?123===n.charCodeAt(i+2)?qe(e,i):ze(e,i):Ye(e,i);a+=t.value,i+=t.size,o=i}}throw le(e.source,i,"Unterminated string.")}function qe(e,t){const n=e.source.body;let r=0,i=3;for(;i<12;){const e=n.charCodeAt(t+i++);if(125===e){if(i<5||!Le(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|Ge(e),r<0)break}throw le(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function ze(e,t){const n=e.source.body,r=We(n,t+2);if(Le(r))return{value:String.fromCodePoint(r),size:6};if(Re(r)&&92===n.charCodeAt(t+6)&&117===n.charCodeAt(t+7)){const e=We(n,t+8);if(Me(e))return{value:String.fromCodePoint(r,e),size:12}}throw le(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function We(e,t){return Ge(e.charCodeAt(t))<<12|Ge(e.charCodeAt(t+1))<<8|Ge(e.charCodeAt(t+2))<<4|Ge(e.charCodeAt(t+3))}function Ge(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Ye(e,t){const n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"\t",size:2}}throw le(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function Ke(e,t){const n=e.source.body,r=n.length;let i=e.lineStart,o=t+3,a=o,s="";const l=[];for(;o<r;){const r=n.charCodeAt(o);if(34===r&&34===n.charCodeAt(o+1)&&34===n.charCodeAt(o+2)){s+=n.slice(a,o),l.push(s);const r=je(e,Ee.BLOCK_STRING,t,o+3,_e(l).join("\n"));return e.line+=l.length-1,e.lineStart=i,r}if(92!==r||34!==n.charCodeAt(o+1)||34!==n.charCodeAt(o+2)||34!==n.charCodeAt(o+3))if(10!==r&&13!==r)if(Le(r))++o;else{if(!Fe(n,o))throw le(e.source,o,`Invalid character within String: ${Pe(e,o)}.`);o+=2}else s+=n.slice(a,o),l.push(s),13===r&&10===n.charCodeAt(o+1)?o+=2:++o,s="",a=o,i=o;else s+=n.slice(a,o),a=o+1,o+=4}throw le(e.source,o,"Unterminated string.")}function Qe(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){if(!Se(n.charCodeAt(i)))break;++i}return je(e,Ee.NAME,t,i,n.slice(t,i))}const Xe=10,Je=2;function Ze(e){return et(e,[])}function et(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function(e,t){if(null===e)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(function(e){return"function"==typeof e.toJSON}(e)){const t=e.toJSON();if(t!==e)return"string"==typeof t?t:et(t,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>Je)return"[Array]";const n=Math.min(Xe,e.length),r=e.length-n,i=[];for(let o=0;o<n;++o)i.push(et(e[o],t));1===r?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`);return"["+i.join(", ")+"]"}(e,n);return function(e,t){const n=Object.entries(e);if(0===n.length)return"{}";if(t.length>Je)return"["+function(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){const t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(e)+"]";const r=n.map((([e,n])=>e+": "+et(n,t)));return"{ "+r.join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}const tt=function(e,t){return e instanceof t};class nt{constructor(e,t="GraphQL request",n={line:1,column:1}){"string"==typeof e||X(!1,`Body must be a string. Received: ${Ze(e)}.`),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||X(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||X(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function rt(e){return tt(e,nt)}function it(e,t){return new at(e,t).parseDocument()}function ot(e,t){const n=new at(e,t);n.expectToken(Ee.SOF);const r=n.parseValueLiteral(!1);return n.expectToken(Ee.EOF),r}class at{constructor(e,t={}){const n=rt(e)?e:new nt(e);this._lexer=new Ie(n),this._options=t,this._tokenCounter=0}parseName(){const e=this.expectToken(Ee.NAME);return this.node(e,{kind:ye.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:ye.DOCUMENT,definitions:this.many(Ee.SOF,this.parseDefinition,Ee.EOF)})}parseDefinition(){if(this.peek(Ee.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===Ee.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw le(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(Ee.BRACE_L))return this.node(e,{kind:ye.OPERATION_DEFINITION,operation:he.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const t=this.parseOperationType();let n;return this.peek(Ee.NAME)&&(n=this.parseName()),this.node(e,{kind:ye.OPERATION_DEFINITION,operation:t,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(Ee.NAME);switch(e.value){case"query":return he.QUERY;case"mutation":return he.MUTATION;case"subscription":return he.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(Ee.PAREN_L,this.parseVariableDefinition,Ee.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:ye.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Ee.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Ee.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(Ee.DOLLAR),this.node(e,{kind:ye.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:ye.SELECTION_SET,selections:this.many(Ee.BRACE_L,this.parseSelection,Ee.BRACE_R)})}parseSelection(){return this.peek(Ee.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,t=this.parseName();let n,r;return this.expectOptionalToken(Ee.COLON)?(n=t,r=this.parseName()):r=t,this.node(e,{kind:ye.FIELD,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Ee.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(Ee.PAREN_L,t,Ee.PAREN_R)}parseArgument(e=!1){const t=this._lexer.token,n=this.parseName();return this.expectToken(Ee.COLON),this.node(t,{kind:ye.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(Ee.SPREAD);const t=this.expectOptionalKeyword("on");return!t&&this.peek(Ee.NAME)?this.node(e,{kind:ye.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:ye.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token;return this.expectKeyword("fragment"),!0===this._options.allowLegacyFragmentVariables?this.node(e,{kind:ye.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:ye.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(e){const t=this._lexer.token;switch(t.kind){case Ee.BRACKET_L:return this.parseList(e);case Ee.BRACE_L:return this.parseObject(e);case Ee.INT:return this.advanceLexer(),this.node(t,{kind:ye.INT,value:t.value});case Ee.FLOAT:return this.advanceLexer(),this.node(t,{kind:ye.FLOAT,value:t.value});case Ee.STRING:case Ee.BLOCK_STRING:return this.parseStringLiteral();case Ee.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:ye.BOOLEAN,value:!0});case"false":return this.node(t,{kind:ye.BOOLEAN,value:!1});case"null":return this.node(t,{kind:ye.NULL});default:return this.node(t,{kind:ye.ENUM,value:t.value})}case Ee.DOLLAR:if(e){if(this.expectToken(Ee.DOLLAR),this._lexer.token.kind===Ee.NAME){const e=this._lexer.token.value;throw le(this._lexer.source,t.start,`Unexpected variable "$${e}" in constant value.`)}throw this.unexpected(t)}return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:ye.STRING,value:e.value,block:e.kind===Ee.BLOCK_STRING})}parseList(e){return this.node(this._lexer.token,{kind:ye.LIST,values:this.any(Ee.BRACKET_L,(()=>this.parseValueLiteral(e)),Ee.BRACKET_R)})}parseObject(e){return this.node(this._lexer.token,{kind:ye.OBJECT,fields:this.any(Ee.BRACE_L,(()=>this.parseObjectField(e)),Ee.BRACE_R)})}parseObjectField(e){const t=this._lexer.token,n=this.parseName();return this.expectToken(Ee.COLON),this.node(t,{kind:ye.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];for(;this.peek(Ee.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const t=this._lexer.token;return this.expectToken(Ee.AT),this.node(t,{kind:ye.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(Ee.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(Ee.BRACKET_R),t=this.node(e,{kind:ye.LIST_TYPE,type:n})}else t=this.parseNamedType();return this.expectOptionalToken(Ee.BANG)?this.node(e,{kind:ye.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:ye.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Ee.STRING)||this.peek(Ee.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.many(Ee.BRACE_L,this.parseOperationTypeDefinition,Ee.BRACE_R);return this.node(e,{kind:ye.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r})}parseOperationTypeDefinition(){const e=this._lexer.token,t=this.parseOperationType();this.expectToken(Ee.COLON);const n=this.parseNamedType();return this.node(e,{kind:ye.OPERATION_TYPE_DEFINITION,operation:t,type:n})}parseScalarTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:ye.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r})}parseObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:ye.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Ee.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(Ee.BRACE_L,this.parseFieldDefinition,Ee.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(Ee.COLON);const i=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(e,{kind:ye.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:o})}parseArgumentDefs(){return this.optionalMany(Ee.PAREN_L,this.parseInputValueDef,Ee.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(Ee.COLON);const r=this.parseTypeReference();let i;this.expectOptionalToken(Ee.EQUALS)&&(i=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(e,{kind:ye.INPUT_VALUE_DEFINITION,description:t,name:n,type:r,defaultValue:i,directives:o})}parseInterfaceTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:ye.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o})}parseUnionTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(e,{kind:ye.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(Ee.EQUALS)?this.delimitedMany(Ee.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(e,{kind:ye.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(Ee.BRACE_L,this.parseEnumValueDefinition,Ee.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:ye.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw le(this._lexer.source,this._lexer.token.start,`${st(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(e,{kind:ye.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(Ee.BRACE_L,this.parseInputValueDef,Ee.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===Ee.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const t=this.parseConstDirectives(),n=this.optionalMany(Ee.BRACE_L,this.parseOperationTypeDefinition,Ee.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:ye.SCHEMA_EXTENSION,directives:t,operationTypes:n})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const t=this.parseName(),n=this.parseConstDirectives();if(0===n.length)throw this.unexpected();return this.node(e,{kind:ye.SCALAR_TYPE_EXTENSION,name:t,directives:n})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:ye.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:ye.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:ye.UNION_TYPE_EXTENSION,name:t,directives:n,types:r})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:ye.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:ye.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r})}parseDirectiveDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Ee.AT);const n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(e,{kind:ye.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:o})}parseDirectiveLocations(){return this.delimitedMany(Ee.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(ve,t.value))return t;throw this.unexpected(e)}node(e,t){return!0!==this._options.noLocation&&(t.loc=new ce(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){const t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw le(this._lexer.source,t.start,`Expected ${lt(e)}, found ${st(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this.advanceLexer(),!0)}expectKeyword(e){const t=this._lexer.token;if(t.kind!==Ee.NAME||t.value!==e)throw le(this._lexer.source,t.start,`Expected "${e}", found ${st(t)}.`);this.advanceLexer()}expectOptionalKeyword(e){const t=this._lexer.token;return t.kind===Ee.NAME&&t.value===e&&(this.advanceLexer(),!0)}unexpected(e){const t=null!=e?e:this._lexer.token;return le(this._lexer.source,t.start,`Unexpected ${st(t)}.`)}any(e,t,n){this.expectToken(e);const r=[];for(;!this.expectOptionalToken(n);)r.push(t.call(this));return r}optionalMany(e,t,n){if(this.expectOptionalToken(e)){const e=[];do{e.push(t.call(this))}while(!this.expectOptionalToken(n));return e}return[]}many(e,t,n){this.expectToken(e);const r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}delimitedMany(e,t){this.expectOptionalToken(e);const n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n}advanceLexer(){const{maxTokens:e}=this._options,t=this._lexer.advance();if(void 0!==e&&t.kind!==Ee.EOF&&(++this._tokenCounter,this._tokenCounter>e))throw le(this._lexer.source,t.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function st(e){const t=e.value;return lt(e.kind)+(null!=t?` "${t}"`:"")}function lt(e){return Oe(e)?`"${e}"`:e}const ct=5;function ut(e,t){const[n,r]=t?[e,t]:[void 0,e];let i=" Did you mean ";n&&(i+=n+" ");const o=r.map((e=>`"${e}"`));switch(o.length){case 0:return"";case 1:return i+o[0]+"?";case 2:return i+o[0]+" or "+o[1]+"?"}const a=o.slice(0,ct),s=a.pop();return i+a.join(", ")+", or "+s+"?"}function dt(e){return e}function ft(e,t){const n=Object.create(null);for(const r of e)n[t(r)]=r;return n}function pt(e,t,n){const r=Object.create(null);for(const i of e)r[t(i)]=n(i);return r}function ht(e,t){const n=Object.create(null);for(const r of Object.keys(e))n[r]=t(e[r],r);return n}function mt(e,t){let n=0,r=0;for(;n<e.length&&r<t.length;){let i=e.charCodeAt(n),o=t.charCodeAt(r);if(yt(i)&&yt(o)){let a=0;do{++n,a=10*a+i-vt,i=e.charCodeAt(n)}while(yt(i)&&a>0);let s=0;do{++r,s=10*s+o-vt,o=t.charCodeAt(r)}while(yt(o)&&s>0);if(a<s)return-1;if(a>s)return 1}else{if(i<o)return-1;if(i>o)return 1;++n,++r}}return e.length-t.length}const vt=48,gt=57;function yt(e){return!isNaN(e)&&vt<=e&&e<=gt}function bt(e,t){const n=Object.create(null),r=new Et(e),i=Math.floor(.4*e.length)+1;for(const o of t){const e=r.measure(o,i);void 0!==e&&(n[o]=e)}return Object.keys(n).sort(((e,t)=>{const r=n[e]-n[t];return 0!==r?r:mt(e,t)}))}class Et{constructor(e){this._input=e,this._inputLowerCase=e.toLowerCase(),this._inputArray=xt(this._inputLowerCase),this._rows=[new Array(e.length+1).fill(0),new Array(e.length+1).fill(0),new Array(e.length+1).fill(0)]}measure(e,t){if(this._input===e)return 0;const n=e.toLowerCase();if(this._inputLowerCase===n)return 1;let r=xt(n),i=this._inputArray;if(r.length<i.length){const e=r;r=i,i=e}const o=r.length,a=i.length;if(o-a>t)return;const s=this._rows;for(let c=0;c<=a;c++)s[0][c]=c;for(let c=1;c<=o;c++){const e=s[(c-1)%3],n=s[c%3];let o=n[0]=c;for(let t=1;t<=a;t++){const a=r[c-1]===i[t-1]?0:1;let l=Math.min(e[t]+1,n[t-1]+1,e[t-1]+a);if(c>1&&t>1&&r[c-1]===i[t-2]&&r[c-2]===i[t-1]){const e=s[(c-2)%3][t-2];l=Math.min(l,e+1)}l<o&&(o=l),n[t]=l}if(o>t)return}const l=s[o%3][a];return l<=t?l:void 0}}function xt(e){const t=e.length,n=new Array(t);for(let r=0;r<t;++r)n[r]=e.charCodeAt(r);return n}function wt(e){if(null==e)return Object.create(null);if(null===Object.getPrototypeOf(e))return e;const t=Object.create(null);for(const[n,r]of Object.entries(e))t[n]=r;return t}const Tt=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function Ct(e){return kt[e.charCodeAt(0)]}const kt=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],St=Object.freeze({});function _t(e,t,n=de){const r=new Map;for(const g of Object.values(ye))r.set(g,At(t,g));let i,o,a,s=Array.isArray(e),l=[e],c=-1,u=[],d=e;const f=[],p=[];do{c++;const e=c===l.length,g=e&&0!==u.length;if(e){if(o=0===p.length?void 0:f[f.length-1],d=a,a=p.pop(),g)if(s){d=d.slice();let e=0;for(const[t,n]of u){const r=t-e;null===n?(d.splice(r,1),e++):d[r]=n}}else{d=Object.defineProperties({},Object.getOwnPropertyDescriptors(d));for(const[e,t]of u)d[e]=t}c=i.index,l=i.keys,u=i.edits,s=i.inArray,i=i.prev}else if(a){if(o=s?c:l[c],d=a[o],null==d)continue;f.push(o)}let y;if(!Array.isArray(d)){var h,m;pe(d)||X(!1,`Invalid AST Node: ${Ze(d)}.`);const n=e?null===(h=r.get(d.kind))||void 0===h?void 0:h.leave:null===(m=r.get(d.kind))||void 0===m?void 0:m.enter;if(y=null==n?void 0:n.call(t,d,o,a,f,p),y===St)break;if(!1===y){if(!e){f.pop();continue}}else if(void 0!==y&&(u.push([o,y]),!e)){if(!pe(y)){f.pop();continue}d=y}}var v;if(void 0===y&&g&&u.push([o,d]),e)f.pop();else i={inArray:s,index:c,keys:l,edits:u,prev:i},s=Array.isArray(d),l=s?d:null!==(v=n[d.kind])&&void 0!==v?v:[],c=-1,u=[],a&&p.push(a),a=d}while(void 0!==i);return 0!==u.length?u[u.length-1][1]:e}function Nt(e){const t=new Array(e.length).fill(null),n=Object.create(null);for(const r of Object.values(ye)){let i=!1;const o=new Array(e.length).fill(void 0),a=new Array(e.length).fill(void 0);for(let t=0;t<e.length;++t){const{enter:n,leave:s}=At(e[t],r);i||(i=null!=n||null!=s),o[t]=n,a[t]=s}if(!i)continue;const s={enter(...n){const r=n[0];for(let a=0;a<e.length;a++)if(null===t[a]){var i;const s=null===(i=o[a])||void 0===i?void 0:i.apply(e[a],n);if(!1===s)t[a]=r;else if(s===St)t[a]=St;else if(void 0!==s)return s}},leave(...n){const r=n[0];for(let o=0;o<e.length;o++)if(null===t[o]){var i;const r=null===(i=a[o])||void 0===i?void 0:i.apply(e[o],n);if(r===St)t[o]=St;else if(void 0!==r&&!1!==r)return r}else t[o]===r&&(t[o]=null)}};n[r]=s}return n}function At(e,t){const n=e[t];return"object"==typeof n?n:"function"==typeof n?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}function Dt(e){return _t(e,It)}const It={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>Ot(e.definitions,"\n\n")},OperationDefinition:{leave(e){const t=Ft("(",Ot(e.variableDefinitions,", "),")"),n=Ot([e.operation,Ot([e.name,t]),Ot(e.directives," ")]," ");return("query"===n?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+Ft(" = ",n)+Ft(" ",Ot(r," "))},SelectionSet:{leave:({selections:e})=>Lt(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){const o=Ft("",e,": ")+t;let a=o+Ft("(",Ot(n,", "),")");return a.length>80&&(a=o+Ft("(\n",Rt(Ot(n,"\n")),"\n)")),Ot([a,Ot(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+Ft(" ",Ot(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>Ot(["...",Ft("on ",e),Ot(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${Ft("(",Ot(n,", "),")")} on ${t} ${Ft("",Ot(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?De(e):`"${e.replace(Tt,Ct)}"`},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+Ot(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+Ot(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+Ft("(",Ot(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>Ft("",e,"\n")+Ot(["schema",Ot(t," "),Lt(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>Ft("",e,"\n")+Ot(["scalar",t,Ot(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>Ft("",e,"\n")+Ot(["type",t,Ft("implements ",Ot(n," & ")),Ot(r," "),Lt(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>Ft("",e,"\n")+t+(Mt(n)?Ft("(\n",Rt(Ot(n,"\n")),"\n)"):Ft("(",Ot(n,", "),")"))+": "+r+Ft(" ",Ot(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>Ft("",e,"\n")+Ot([t+": "+n,Ft("= ",r),Ot(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>Ft("",e,"\n")+Ot(["interface",t,Ft("implements ",Ot(n," & ")),Ot(r," "),Lt(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>Ft("",e,"\n")+Ot(["union",t,Ot(n," "),Ft("= ",Ot(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>Ft("",e,"\n")+Ot(["enum",t,Ot(n," "),Lt(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>Ft("",e,"\n")+Ot([t,Ot(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>Ft("",e,"\n")+Ot(["input",t,Ot(n," "),Lt(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>Ft("",e,"\n")+"directive @"+t+(Mt(n)?Ft("(\n",Rt(Ot(n,"\n")),"\n)"):Ft("(",Ot(n,", "),")"))+(r?" repeatable":"")+" on "+Ot(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>Ot(["extend schema",Ot(e," "),Lt(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>Ot(["extend scalar",e,Ot(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Ot(["extend type",e,Ft("implements ",Ot(t," & ")),Ot(n," "),Lt(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Ot(["extend interface",e,Ft("implements ",Ot(t," & ")),Ot(n," "),Lt(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>Ot(["extend union",e,Ot(t," "),Ft("= ",Ot(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>Ot(["extend enum",e,Ot(t," "),Lt(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>Ot(["extend input",e,Ot(t," "),Lt(n)]," ")}};function Ot(e,t=""){var n;return null!==(n=null==e?void 0:e.filter((e=>e)).join(t))&&void 0!==n?n:""}function Lt(e){return Ft("{\n",Rt(Ot(e,"\n")),"\n}")}function Ft(e,t,n=""){return null!=t&&""!==t?e+t+n:""}function Rt(e){return Ft(" ",e.replace(/\n/g,"\n "))}function Mt(e){var t;return null!==(t=null==e?void 0:e.some((e=>e.includes("\n"))))&&void 0!==t&&t}function Pt(e,t){switch(e.kind){case ye.NULL:return null;case ye.INT:return parseInt(e.value,10);case ye.FLOAT:return parseFloat(e.value);case ye.STRING:case ye.ENUM:case ye.BOOLEAN:return e.value;case ye.LIST:return e.values.map((e=>Pt(e,t)));case ye.OBJECT:return pt(e.fields,(e=>e.name.value),(e=>Pt(e.value,t)));case ye.VARIABLE:return null==t?void 0:t[e.name.value]}}function jt(e){if(null!=e||X(!1,"Must provide name."),"string"==typeof e||X(!1,"Expected name to be a string."),0===e.length)throw new ae("Expected name to be a non-empty string.");for(let t=1;t<e.length;++t)if(!Se(e.charCodeAt(t)))throw new ae(`Names must only contain [_a-zA-Z0-9] but "${e}" does not.`);if(!ke(e.charCodeAt(0)))throw new ae(`Names must start with [_a-zA-Z] but "${e}" does not.`);return e}function Vt(e){if("true"===e||"false"===e||"null"===e)throw new ae(`Enum values cannot be named: ${e}`);return jt(e)}function Bt(e){return $t(e)||Ut(e)||qt(e)||Wt(e)||Gt(e)||Yt(e)||Kt(e)||Qt(e)}function $t(e){return tt(e,hn)}function Ut(e){return tt(e,mn)}function Ht(e){if(!Ut(e))throw new Error(`Expected ${Ze(e)} to be a GraphQL Object type.`);return e}function qt(e){return tt(e,Tn)}function zt(e){if(!qt(e))throw new Error(`Expected ${Ze(e)} to be a GraphQL Interface type.`);return e}function Wt(e){return tt(e,Cn)}function Gt(e){return tt(e,Sn)}function Yt(e){return tt(e,An)}function Kt(e){return tt(e,rn)}function Qt(e){return tt(e,on)}function Xt(e){return $t(e)||Gt(e)||Yt(e)||an(e)&&Xt(e.ofType)}function Jt(e){return $t(e)||Ut(e)||qt(e)||Wt(e)||Gt(e)||an(e)&&Jt(e.ofType)}function Zt(e){return $t(e)||Gt(e)}function en(e){return Ut(e)||qt(e)||Wt(e)}function tn(e){return qt(e)||Wt(e)}function nn(e){if(!tn(e))throw new Error(`Expected ${Ze(e)} to be a GraphQL abstract type.`);return e}class rn{constructor(e){Bt(e)||X(!1,`Expected ${Ze(e)} to be a GraphQL type.`),this.ofType=e}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}}class on{constructor(e){sn(e)||X(!1,`Expected ${Ze(e)} to be a GraphQL nullable type.`),this.ofType=e}get[Symbol.toStringTag](){return"GraphQLNonNull"}toString(){return String(this.ofType)+"!"}toJSON(){return this.toString()}}function an(e){return Kt(e)||Qt(e)}function sn(e){return Bt(e)&&!Qt(e)}function ln(e){if(!sn(e))throw new Error(`Expected ${Ze(e)} to be a GraphQL nullable type.`);return e}function cn(e){if(e)return Qt(e)?e.ofType:e}function un(e){return $t(e)||Ut(e)||qt(e)||Wt(e)||Gt(e)||Yt(e)}function dn(e){if(e){let t=e;for(;an(t);)t=t.ofType;return t}}function fn(e){return"function"==typeof e?e():e}function pn(e){return"function"==typeof e?e():e}class hn{constructor(e){var t,n,r,i;const o=null!==(t=e.parseValue)&&void 0!==t?t:dt;this.name=jt(e.name),this.description=e.description,this.specifiedByURL=e.specifiedByURL,this.serialize=null!==(n=e.serialize)&&void 0!==n?n:dt,this.parseValue=o,this.parseLiteral=null!==(r=e.parseLiteral)&&void 0!==r?r:(e,t)=>o(Pt(e,t)),this.extensions=wt(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(i=e.extensionASTNodes)&&void 0!==i?i:[],null==e.specifiedByURL||"string"==typeof e.specifiedByURL||X(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${Ze(e.specifiedByURL)}.`),null==e.serialize||"function"==typeof e.serialize||X(!1,`${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`),e.parseLiteral&&("function"==typeof e.parseValue&&"function"==typeof e.parseLiteral||X(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`))}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class mn{constructor(e){var t;this.name=jt(e.name),this.description=e.description,this.isTypeOf=e.isTypeOf,this.extensions=wt(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this._fields=()=>gn(e),this._interfaces=()=>vn(e),null==e.isTypeOf||"function"==typeof e.isTypeOf||X(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${Ze(e.isTypeOf)}.`)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields}getInterfaces(){return"function"==typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:En(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function vn(e){var t;const n=fn(null!==(t=e.interfaces)&&void 0!==t?t:[]);return Array.isArray(n)||X(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),n}function gn(e){const t=pn(e.fields);return bn(t)||X(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),ht(t,((t,n)=>{var r;bn(t)||X(!1,`${e.name}.${n} field config must be an object.`),null==t.resolve||"function"==typeof t.resolve||X(!1,`${e.name}.${n} field resolver must be a function if provided, but got: ${Ze(t.resolve)}.`);const i=null!==(r=t.args)&&void 0!==r?r:{};return bn(i)||X(!1,`${e.name}.${n} args must be an object with argument names as keys.`),{name:jt(n),description:t.description,type:t.type,args:yn(i),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:wt(t.extensions),astNode:t.astNode}}))}function yn(e){return Object.entries(e).map((([e,t])=>({name:jt(e),description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:wt(t.extensions),astNode:t.astNode})))}function bn(e){return Z(e)&&!Array.isArray(e)}function En(e){return ht(e,(e=>({description:e.description,type:e.type,args:xn(e.args),resolve:e.resolve,subscribe:e.subscribe,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode})))}function xn(e){return pt(e,(e=>e.name),(e=>({description:e.description,type:e.type,defaultValue:e.defaultValue,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode})))}function wn(e){return Qt(e.type)&&void 0===e.defaultValue}class Tn{constructor(e){var t;this.name=jt(e.name),this.description=e.description,this.resolveType=e.resolveType,this.extensions=wt(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this._fields=gn.bind(void 0,e),this._interfaces=vn.bind(void 0,e),null==e.resolveType||"function"==typeof e.resolveType||X(!1,`${this.name} must provide "resolveType" as a function, but got: ${Ze(e.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields}getInterfaces(){return"function"==typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:En(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class Cn{constructor(e){var t;this.name=jt(e.name),this.description=e.description,this.resolveType=e.resolveType,this.extensions=wt(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this._types=kn.bind(void 0,e),null==e.resolveType||"function"==typeof e.resolveType||X(!1,`${this.name} must provide "resolveType" as a function, but got: ${Ze(e.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return"function"==typeof this._types&&(this._types=this._types()),this._types}toConfig(){return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function kn(e){const t=fn(e.types);return Array.isArray(t)||X(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}class Sn{constructor(e){var t;this.name=jt(e.name),this.description=e.description,this.extensions=wt(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this._values="function"==typeof e.values?e.values:Nn(this.name,e.values),this._valueLookup=null,this._nameLookup=null}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return"function"==typeof this._values&&(this._values=Nn(this.name,this._values())),this._values}getValue(e){return null===this._nameLookup&&(this._nameLookup=ft(this.getValues(),(e=>e.name))),this._nameLookup[e]}serialize(e){null===this._valueLookup&&(this._valueLookup=new Map(this.getValues().map((e=>[e.value,e]))));const t=this._valueLookup.get(e);if(void 0===t)throw new ae(`Enum "${this.name}" cannot represent value: ${Ze(e)}`);return t.name}parseValue(e){if("string"!=typeof e){const t=Ze(e);throw new ae(`Enum "${this.name}" cannot represent non-string value: ${t}.`+_n(this,t))}const t=this.getValue(e);if(null==t)throw new ae(`Value "${e}" does not exist in "${this.name}" enum.`+_n(this,e));return t.value}parseLiteral(e,t){if(e.kind!==ye.ENUM){const t=Dt(e);throw new ae(`Enum "${this.name}" cannot represent non-enum value: ${t}.`+_n(this,t),{nodes:e})}const n=this.getValue(e.value);if(null==n){const t=Dt(e);throw new ae(`Value "${t}" does not exist in "${this.name}" enum.`+_n(this,t),{nodes:e})}return n.value}toConfig(){const e=pt(this.getValues(),(e=>e.name),(e=>({description:e.description,value:e.value,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode})));return{name:this.name,description:this.description,values:e,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function _n(e,t){return ut("the enum value",bt(t,e.getValues().map((e=>e.name))))}function Nn(e,t){return bn(t)||X(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map((([t,n])=>(bn(n)||X(!1,`${e}.${t} must refer to an object with a "value" key representing an internal value but got: ${Ze(n)}.`),{name:Vt(t),description:n.description,value:void 0!==n.value?n.value:t,deprecationReason:n.deprecationReason,extensions:wt(n.extensions),astNode:n.astNode})))}class An{constructor(e){var t,n;this.name=jt(e.name),this.description=e.description,this.extensions=wt(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this.isOneOf=null!==(n=e.isOneOf)&&void 0!==n&&n,this._fields=Dn.bind(void 0,e)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields}toConfig(){const e=ht(this.getFields(),(e=>({description:e.description,type:e.type,defaultValue:e.defaultValue,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode})));return{name:this.name,description:this.description,fields:e,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,isOneOf:this.isOneOf}}toString(){return this.name}toJSON(){return this.toString()}}function Dn(e){const t=pn(e.fields);return bn(t)||X(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),ht(t,((t,n)=>(!("resolve"in t)||X(!1,`${e.name}.${n} field has a resolve property, but Input Types cannot define resolvers.`),{name:jt(n),description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:wt(t.extensions),astNode:t.astNode})))}function In(e){return Qt(e.type)&&void 0===e.defaultValue}function On(e,t){return e===t||(Qt(e)&&Qt(t)||!(!Kt(e)||!Kt(t)))&&On(e.ofType,t.ofType)}function Ln(e,t,n){return t===n||(Qt(n)?!!Qt(t)&&Ln(e,t.ofType,n.ofType):Qt(t)?Ln(e,t.ofType,n):Kt(n)?!!Kt(t)&&Ln(e,t.ofType,n.ofType):!Kt(t)&&(tn(n)&&(qt(t)||Ut(t))&&e.isSubType(n,t)))}function Fn(e,t,n){return t===n||(tn(t)?tn(n)?e.getPossibleTypes(t).some((t=>e.isSubType(n,t))):e.isSubType(t,n):!!tn(n)&&e.isSubType(n,t))}const Rn=2147483647,Mn=-2147483648,Pn=new hn({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize(e){const t=qn(e);if("boolean"==typeof t)return t?1:0;let n=t;if("string"==typeof t&&""!==t&&(n=Number(t)),"number"!=typeof n||!Number.isInteger(n))throw new ae(`Int cannot represent non-integer value: ${Ze(t)}`);if(n>Rn||n<Mn)throw new ae("Int cannot represent non 32-bit signed integer value: "+Ze(t));return n},parseValue(e){if("number"!=typeof e||!Number.isInteger(e))throw new ae(`Int cannot represent non-integer value: ${Ze(e)}`);if(e>Rn||e<Mn)throw new ae(`Int cannot represent non 32-bit signed integer value: ${e}`);return e},parseLiteral(e){if(e.kind!==ye.INT)throw new ae(`Int cannot represent non-integer value: ${Dt(e)}`,{nodes:e});const t=parseInt(e.value,10);if(t>Rn||t<Mn)throw new ae(`Int cannot represent non 32-bit signed integer value: ${e.value}`,{nodes:e});return t}}),jn=new hn({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",serialize(e){const t=qn(e);if("boolean"==typeof t)return t?1:0;let n=t;if("string"==typeof t&&""!==t&&(n=Number(t)),"number"!=typeof n||!Number.isFinite(n))throw new ae(`Float cannot represent non numeric value: ${Ze(t)}`);return n},parseValue(e){if("number"!=typeof e||!Number.isFinite(e))throw new ae(`Float cannot represent non numeric value: ${Ze(e)}`);return e},parseLiteral(e){if(e.kind!==ye.FLOAT&&e.kind!==ye.INT)throw new ae(`Float cannot represent non numeric value: ${Dt(e)}`,e);return parseFloat(e.value)}}),Vn=new hn({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",serialize(e){const t=qn(e);if("string"==typeof t)return t;if("boolean"==typeof t)return t?"true":"false";if("number"==typeof t&&Number.isFinite(t))return t.toString();throw new ae(`String cannot represent value: ${Ze(e)}`)},parseValue(e){if("string"!=typeof e)throw new ae(`String cannot represent a non string value: ${Ze(e)}`);return e},parseLiteral(e){if(e.kind!==ye.STRING)throw new ae(`String cannot represent a non string value: ${Dt(e)}`,{nodes:e});return e.value}}),Bn=new hn({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize(e){const t=qn(e);if("boolean"==typeof t)return t;if(Number.isFinite(t))return 0!==t;throw new ae(`Boolean cannot represent a non boolean value: ${Ze(t)}`)},parseValue(e){if("boolean"!=typeof e)throw new ae(`Boolean cannot represent a non boolean value: ${Ze(e)}`);return e},parseLiteral(e){if(e.kind!==ye.BOOLEAN)throw new ae(`Boolean cannot represent a non boolean value: ${Dt(e)}`,{nodes:e});return e.value}}),$n=new hn({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',serialize(e){const t=qn(e);if("string"==typeof t)return t;if(Number.isInteger(t))return String(t);throw new ae(`ID cannot represent value: ${Ze(e)}`)},parseValue(e){if("string"==typeof e)return e;if("number"==typeof e&&Number.isInteger(e))return e.toString();throw new ae(`ID cannot represent value: ${Ze(e)}`)},parseLiteral(e){if(e.kind!==ye.STRING&&e.kind!==ye.INT)throw new ae("ID cannot represent a non-string and non-integer value: "+Dt(e),{nodes:e});return e.value}}),Un=Object.freeze([Vn,Pn,jn,Bn,$n]);function Hn(e){return Un.some((({name:t})=>e.name===t))}function qn(e){if(Z(e)){if("function"==typeof e.valueOf){const t=e.valueOf();if(!Z(t))return t}if("function"==typeof e.toJSON)return e.toJSON()}return e}function zn(e){return tt(e,Wn)}class Wn{constructor(e){var t,n;this.name=jt(e.name),this.description=e.description,this.locations=e.locations,this.isRepeatable=null!==(t=e.isRepeatable)&&void 0!==t&&t,this.extensions=wt(e.extensions),this.astNode=e.astNode,Array.isArray(e.locations)||X(!1,`@${e.name} locations must be an Array.`);const r=null!==(n=e.args)&&void 0!==n?n:{};Z(r)&&!Array.isArray(r)||X(!1,`@${e.name} args must be an object with argument names as keys.`),this.args=yn(r)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:xn(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}}const Gn=new Wn({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[ve.FIELD,ve.FRAGMENT_SPREAD,ve.INLINE_FRAGMENT],args:{if:{type:new on(Bn),description:"Included when true."}}}),Yn=new Wn({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[ve.FIELD,ve.FRAGMENT_SPREAD,ve.INLINE_FRAGMENT],args:{if:{type:new on(Bn),description:"Skipped when true."}}}),Kn="No longer supported",Qn=new Wn({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[ve.FIELD_DEFINITION,ve.ARGUMENT_DEFINITION,ve.INPUT_FIELD_DEFINITION,ve.ENUM_VALUE],args:{reason:{type:Vn,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:Kn}}}),Xn=new Wn({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[ve.SCALAR],args:{url:{type:new on(Vn),description:"The URL that specifies the behavior of this scalar."}}}),Jn=new Wn({name:"oneOf",description:"Indicates exactly one field must be supplied and this field must not be `null`.",locations:[ve.INPUT_OBJECT],args:{}}),Zn=Object.freeze([Gn,Yn,Qn,Xn,Jn]);function er(e){return Zn.some((({name:t})=>t===e.name))}function tr(e){return"object"==typeof e&&"function"==typeof(null==e?void 0:e[Symbol.iterator])}function nr(e,t){if(Qt(t)){const n=nr(e,t.ofType);return(null==n?void 0:n.kind)===ye.NULL?null:n}if(null===e)return{kind:ye.NULL};if(void 0===e)return null;if(Kt(t)){const n=t.ofType;if(tr(e)){const t=[];for(const r of e){const e=nr(r,n);null!=e&&t.push(e)}return{kind:ye.LIST,values:t}}return nr(e,n)}if(Yt(t)){if(!Z(e))return null;const n=[];for(const r of Object.values(t.getFields())){const t=nr(e[r.name],r.type);t&&n.push({kind:ye.OBJECT_FIELD,name:{kind:ye.NAME,value:r.name},value:t})}return{kind:ye.OBJECT,fields:n}}if(Zt(t)){const n=t.serialize(e);if(null==n)return null;if("boolean"==typeof n)return{kind:ye.BOOLEAN,value:n};if("number"==typeof n&&Number.isFinite(n)){const e=String(n);return rr.test(e)?{kind:ye.INT,value:e}:{kind:ye.FLOAT,value:e}}if("string"==typeof n)return Gt(t)?{kind:ye.ENUM,value:n}:t===$n&&rr.test(n)?{kind:ye.INT,value:n}:{kind:ye.STRING,value:n};throw new TypeError(`Cannot convert value to AST: ${Ze(n)}.`)}ee(!1,"Unexpected input type: "+Ze(t))}const rr=/^-?(?:0|[1-9][0-9]*)$/,ir=new mn({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:()=>({description:{type:Vn,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new on(new rn(new on(sr))),resolve:e=>Object.values(e.getTypeMap())},queryType:{description:"The type that query operations will be rooted at.",type:new on(sr),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:sr,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:sr,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new on(new rn(new on(or))),resolve:e=>e.getDirectives()}})}),or=new mn({name:"__Directive",description:"A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.",fields:()=>({name:{type:new on(Vn),resolve:e=>e.name},description:{type:Vn,resolve:e=>e.description},isRepeatable:{type:new on(Bn),resolve:e=>e.isRepeatable},locations:{type:new on(new rn(new on(ar))),resolve:e=>e.locations},args:{type:new on(new rn(new on(cr))),args:{includeDeprecated:{type:Bn,defaultValue:!1}},resolve:(e,{includeDeprecated:t})=>t?e.args:e.args.filter((e=>null==e.deprecationReason))}})}),ar=new Sn({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:ve.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:ve.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:ve.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:ve.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:ve.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:ve.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:ve.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:ve.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:ve.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:ve.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:ve.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:ve.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:ve.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:ve.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:ve.UNION,description:"Location adjacent to a union definition."},ENUM:{value:ve.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:ve.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:ve.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:ve.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),sr=new mn({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:()=>({kind:{type:new on(pr),resolve:e=>$t(e)?dr.SCALAR:Ut(e)?dr.OBJECT:qt(e)?dr.INTERFACE:Wt(e)?dr.UNION:Gt(e)?dr.ENUM:Yt(e)?dr.INPUT_OBJECT:Kt(e)?dr.LIST:Qt(e)?dr.NON_NULL:void ee(!1,`Unexpected type: "${Ze(e)}".`)},name:{type:Vn,resolve:e=>"name"in e?e.name:void 0},description:{type:Vn,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:Vn,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new rn(new on(lr)),args:{includeDeprecated:{type:Bn,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(Ut(e)||qt(e)){const n=Object.values(e.getFields());return t?n:n.filter((e=>null==e.deprecationReason))}}},interfaces:{type:new rn(new on(sr)),resolve(e){if(Ut(e)||qt(e))return e.getInterfaces()}},possibleTypes:{type:new rn(new on(sr)),resolve(e,t,n,{schema:r}){if(tn(e))return r.getPossibleTypes(e)}},enumValues:{type:new rn(new on(ur)),args:{includeDeprecated:{type:Bn,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(Gt(e)){const n=e.getValues();return t?n:n.filter((e=>null==e.deprecationReason))}}},inputFields:{type:new rn(new on(cr)),args:{includeDeprecated:{type:Bn,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(Yt(e)){const n=Object.values(e.getFields());return t?n:n.filter((e=>null==e.deprecationReason))}}},ofType:{type:sr,resolve:e=>"ofType"in e?e.ofType:void 0},isOneOf:{type:Bn,resolve:e=>{if(Yt(e))return e.isOneOf}}})}),lr=new mn({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:()=>({name:{type:new on(Vn),resolve:e=>e.name},description:{type:Vn,resolve:e=>e.description},args:{type:new on(new rn(new on(cr))),args:{includeDeprecated:{type:Bn,defaultValue:!1}},resolve:(e,{includeDeprecated:t})=>t?e.args:e.args.filter((e=>null==e.deprecationReason))},type:{type:new on(sr),resolve:e=>e.type},isDeprecated:{type:new on(Bn),resolve:e=>null!=e.deprecationReason},deprecationReason:{type:Vn,resolve:e=>e.deprecationReason}})}),cr=new mn({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:()=>({name:{type:new on(Vn),resolve:e=>e.name},description:{type:Vn,resolve:e=>e.description},type:{type:new on(sr),resolve:e=>e.type},defaultValue:{type:Vn,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){const{type:t,defaultValue:n}=e,r=nr(n,t);return r?Dt(r):null}},isDeprecated:{type:new on(Bn),resolve:e=>null!=e.deprecationReason},deprecationReason:{type:Vn,resolve:e=>e.deprecationReason}})}),ur=new mn({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:()=>({name:{type:new on(Vn),resolve:e=>e.name},description:{type:Vn,resolve:e=>e.description},isDeprecated:{type:new on(Bn),resolve:e=>null!=e.deprecationReason},deprecationReason:{type:Vn,resolve:e=>e.deprecationReason}})});var dr,fr;(fr=dr||(dr={})).SCALAR="SCALAR",fr.OBJECT="OBJECT",fr.INTERFACE="INTERFACE",fr.UNION="UNION",fr.ENUM="ENUM",fr.INPUT_OBJECT="INPUT_OBJECT",fr.LIST="LIST",fr.NON_NULL="NON_NULL";const pr=new Sn({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:dr.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:dr.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:dr.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:dr.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:dr.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:dr.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:dr.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:dr.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),hr={name:"__schema",type:new on(ir),description:"Access the current type schema of this server.",args:[],resolve:(e,t,n,{schema:r})=>r,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},mr={name:"__type",type:sr,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new on(Vn),defaultValue:void 0,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0}],resolve:(e,{name:t},n,{schema:r})=>r.getType(t),deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},vr={name:"__typename",type:new on(Vn),description:"The name of the current Object type at runtime.",args:[],resolve:(e,t,n,{parentType:r})=>r.name,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},gr=Object.freeze([ir,or,ar,sr,lr,cr,ur,pr]);function yr(e){return gr.some((({name:t})=>e.name===t))}function br(e){return tt(e,xr)}function Er(e){if(!br(e))throw new Error(`Expected ${Ze(e)} to be a GraphQL schema.`);return e}class xr{constructor(e){var t,n;this.__validationErrors=!0===e.assumeValid?[]:void 0,Z(e)||X(!1,"Must provide configuration object."),!e.types||Array.isArray(e.types)||X(!1,`"types" must be Array if provided but got: ${Ze(e.types)}.`),!e.directives||Array.isArray(e.directives)||X(!1,`"directives" must be Array if provided but got: ${Ze(e.directives)}.`),this.description=e.description,this.extensions=wt(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this._queryType=e.query,this._mutationType=e.mutation,this._subscriptionType=e.subscription,this._directives=null!==(n=e.directives)&&void 0!==n?n:Zn;const r=new Set(e.types);if(null!=e.types)for(const i of e.types)r.delete(i),wr(i,r);null!=this._queryType&&wr(this._queryType,r),null!=this._mutationType&&wr(this._mutationType,r),null!=this._subscriptionType&&wr(this._subscriptionType,r);for(const i of this._directives)if(zn(i))for(const e of i.args)wr(e.type,r);wr(ir,r),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(const i of r){if(null==i)continue;const e=i.name;if(e||X(!1,"One of the provided types for building the Schema is missing a name."),void 0!==this._typeMap[e])throw new Error(`Schema must contain uniquely named types but contains multiple types named "${e}".`);if(this._typeMap[e]=i,qt(i)){for(const t of i.getInterfaces())if(qt(t)){let e=this._implementationsMap[t.name];void 0===e&&(e=this._implementationsMap[t.name]={objects:[],interfaces:[]}),e.interfaces.push(i)}}else if(Ut(i))for(const t of i.getInterfaces())if(qt(t)){let e=this._implementationsMap[t.name];void 0===e&&(e=this._implementationsMap[t.name]={objects:[],interfaces:[]}),e.objects.push(i)}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(e){switch(e){case he.QUERY:return this.getQueryType();case he.MUTATION:return this.getMutationType();case he.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(e){return this.getTypeMap()[e]}getPossibleTypes(e){return Wt(e)?e.getTypes():this.getImplementations(e).objects}getImplementations(e){const t=this._implementationsMap[e.name];return null!=t?t:{objects:[],interfaces:[]}}isSubType(e,t){let n=this._subTypeMap[e.name];if(void 0===n){if(n=Object.create(null),Wt(e))for(const t of e.getTypes())n[t.name]=!0;else{const t=this.getImplementations(e);for(const e of t.objects)n[e.name]=!0;for(const e of t.interfaces)n[e.name]=!0}this._subTypeMap[e.name]=n}return void 0!==n[t.name]}getDirectives(){return this._directives}getDirective(e){return this.getDirectives().find((t=>t.name===e))}toConfig(){return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:Object.values(this.getTypeMap()),directives:this.getDirectives(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,assumeValid:void 0!==this.__validationErrors}}}function wr(e,t){const n=dn(e);if(!t.has(n))if(t.add(n),Wt(n))for(const r of n.getTypes())wr(r,t);else if(Ut(n)||qt(n)){for(const e of n.getInterfaces())wr(e,t);for(const e of Object.values(n.getFields())){wr(e.type,t);for(const n of e.args)wr(n.type,t)}}else if(Yt(n))for(const r of Object.values(n.getFields()))wr(r.type,t);return t}function Tr(e){if(Er(e),e.__validationErrors)return e.__validationErrors;const t=new kr(e);!function(e){const t=e.schema,n=t.getQueryType();if(n){if(!Ut(n)){var r;e.reportError(`Query root type must be Object type, it cannot be ${Ze(n)}.`,null!==(r=Sr(t,he.QUERY))&&void 0!==r?r:n.astNode)}}else e.reportError("Query root type must be provided.",t.astNode);const i=t.getMutationType();var o;i&&!Ut(i)&&e.reportError(`Mutation root type must be Object type if provided, it cannot be ${Ze(i)}.`,null!==(o=Sr(t,he.MUTATION))&&void 0!==o?o:i.astNode);const a=t.getSubscriptionType();var s;a&&!Ut(a)&&e.reportError(`Subscription root type must be Object type if provided, it cannot be ${Ze(a)}.`,null!==(s=Sr(t,he.SUBSCRIPTION))&&void 0!==s?s:a.astNode)}(t),function(e){for(const n of e.schema.getDirectives())if(zn(n)){_r(e,n);for(const r of n.args){var t;if(_r(e,r),Xt(r.type)||e.reportError(`The type of @${n.name}(${r.name}:) must be Input Type but got: ${Ze(r.type)}.`,r.astNode),wn(r)&&null!=r.deprecationReason)e.reportError(`Required argument @${n.name}(${r.name}:) cannot be deprecated.`,[jr(r.astNode),null===(t=r.astNode)||void 0===t?void 0:t.type])}}else e.reportError(`Expected directive but got: ${Ze(n)}.`,null==n?void 0:n.astNode)}(t),function(e){const t=function(e){const t=Object.create(null),n=[],r=Object.create(null);return i;function i(o){if(t[o.name])return;t[o.name]=!0,r[o.name]=n.length;const a=Object.values(o.getFields());for(const t of a)if(Qt(t.type)&&Yt(t.type.ofType)){const o=t.type.ofType,a=r[o.name];if(n.push(t),void 0===a)i(o);else{const t=n.slice(a),r=t.map((e=>e.name)).join(".");e.reportError(`Cannot reference Input Object "${o.name}" within itself through a series of non-null fields: "${r}".`,t.map((e=>e.astNode)))}n.pop()}r[o.name]=void 0}}(e),n=e.schema.getTypeMap();for(const r of Object.values(n))un(r)?(yr(r)||_r(e,r),Ut(r)||qt(r)?(Nr(e,r),Ar(e,r)):Wt(r)?Or(e,r):Gt(r)?Lr(e,r):Yt(r)&&(Fr(e,r),t(r))):e.reportError(`Expected GraphQL named type but got: ${Ze(r)}.`,r.astNode)}(t);const n=t.getErrors();return e.__validationErrors=n,n}function Cr(e){const t=Tr(e);if(0!==t.length)throw new Error(t.map((e=>e.message)).join("\n\n"))}class kr{constructor(e){this._errors=[],this.schema=e}reportError(e,t){const n=Array.isArray(t)?t.filter(Boolean):t;this._errors.push(new ae(e,{nodes:n}))}getErrors(){return this._errors}}function Sr(e,t){var n;return null===(n=[e.astNode,...e.extensionASTNodes].flatMap((e=>{var t;return null!==(t=null==e?void 0:e.operationTypes)&&void 0!==t?t:[]})).find((e=>e.operation===t)))||void 0===n?void 0:n.type}function _r(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function Nr(e,t){const n=Object.values(t.getFields());0===n.length&&e.reportError(`Type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(const a of n){var r;if(_r(e,a),!Jt(a.type))e.reportError(`The type of ${t.name}.${a.name} must be Output Type but got: ${Ze(a.type)}.`,null===(r=a.astNode)||void 0===r?void 0:r.type);for(const n of a.args){const r=n.name;var i,o;if(_r(e,n),!Xt(n.type))e.reportError(`The type of ${t.name}.${a.name}(${r}:) must be Input Type but got: ${Ze(n.type)}.`,null===(i=n.astNode)||void 0===i?void 0:i.type);if(wn(n)&&null!=n.deprecationReason)e.reportError(`Required argument ${t.name}.${a.name}(${r}:) cannot be deprecated.`,[jr(n.astNode),null===(o=n.astNode)||void 0===o?void 0:o.type])}}}function Ar(e,t){const n=Object.create(null);for(const r of t.getInterfaces())qt(r)?t!==r?n[r.name]?e.reportError(`Type ${t.name} can only implement ${r.name} once.`,Mr(t,r)):(n[r.name]=!0,Ir(e,t,r),Dr(e,t,r)):e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,Mr(t,r)):e.reportError(`Type ${Ze(t)} must only implement Interface types, it cannot implement ${Ze(r)}.`,Mr(t,r))}function Dr(e,t,n){const r=t.getFields();for(const l of Object.values(n.getFields())){const c=l.name,u=r[c];if(u){var i,o;if(!Ln(e.schema,u.type,l.type))e.reportError(`Interface field ${n.name}.${c} expects type ${Ze(l.type)} but ${t.name}.${c} is type ${Ze(u.type)}.`,[null===(i=l.astNode)||void 0===i?void 0:i.type,null===(o=u.astNode)||void 0===o?void 0:o.type]);for(const r of l.args){const i=r.name,o=u.args.find((e=>e.name===i));var a,s;if(o){if(!On(r.type,o.type))e.reportError(`Interface field argument ${n.name}.${c}(${i}:) expects type ${Ze(r.type)} but ${t.name}.${c}(${i}:) is type ${Ze(o.type)}.`,[null===(a=r.astNode)||void 0===a?void 0:a.type,null===(s=o.astNode)||void 0===s?void 0:s.type])}else e.reportError(`Interface field argument ${n.name}.${c}(${i}:) expected but ${t.name}.${c} does not provide it.`,[r.astNode,u.astNode])}for(const r of u.args){const i=r.name;!l.args.find((e=>e.name===i))&&wn(r)&&e.reportError(`Object field ${t.name}.${c} includes required argument ${i} that is missing from the Interface field ${n.name}.${c}.`,[r.astNode,l.astNode])}}else e.reportError(`Interface field ${n.name}.${c} expected but ${t.name} does not provide it.`,[l.astNode,t.astNode,...t.extensionASTNodes])}}function Ir(e,t,n){const r=t.getInterfaces();for(const i of n.getInterfaces())r.includes(i)||e.reportError(i===t?`Type ${t.name} cannot implement ${n.name} because it would create a circular reference.`:`Type ${t.name} must implement ${i.name} because it is implemented by ${n.name}.`,[...Mr(n,i),...Mr(t,n)])}function Or(e,t){const n=t.getTypes();0===n.length&&e.reportError(`Union type ${t.name} must define one or more member types.`,[t.astNode,...t.extensionASTNodes]);const r=Object.create(null);for(const i of n)r[i.name]?e.reportError(`Union type ${t.name} can only include type ${i.name} once.`,Pr(t,i.name)):(r[i.name]=!0,Ut(i)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${Ze(i)}.`,Pr(t,String(i))))}function Lr(e,t){const n=t.getValues();0===n.length&&e.reportError(`Enum type ${t.name} must define one or more values.`,[t.astNode,...t.extensionASTNodes]);for(const r of n)_r(e,r)}function Fr(e,t){const n=Object.values(t.getFields());0===n.length&&e.reportError(`Input Object type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(const o of n){var r,i;if(_r(e,o),!Xt(o.type))e.reportError(`The type of ${t.name}.${o.name} must be Input Type but got: ${Ze(o.type)}.`,null===(r=o.astNode)||void 0===r?void 0:r.type);if(In(o)&&null!=o.deprecationReason)e.reportError(`Required input field ${t.name}.${o.name} cannot be deprecated.`,[jr(o.astNode),null===(i=o.astNode)||void 0===i?void 0:i.type]);t.isOneOf&&Rr(t,o,e)}}function Rr(e,t,n){var r;Qt(t.type)&&n.reportError(`OneOf input field ${e.name}.${t.name} must be nullable.`,null===(r=t.astNode)||void 0===r?void 0:r.type);void 0!==t.defaultValue&&n.reportError(`OneOf input field ${e.name}.${t.name} cannot have a default value.`,t.astNode)}function Mr(e,t){const{astNode:n,extensionASTNodes:r}=e;return(null!=n?[n,...r]:r).flatMap((e=>{var t;return null!==(t=e.interfaces)&&void 0!==t?t:[]})).filter((e=>e.name.value===t.name))}function Pr(e,t){const{astNode:n,extensionASTNodes:r}=e;return(null!=n?[n,...r]:r).flatMap((e=>{var t;return null!==(t=e.types)&&void 0!==t?t:[]})).filter((e=>e.name.value===t))}function jr(e){var t;return null==e||null===(t=e.directives)||void 0===t?void 0:t.find((e=>e.name.value===Qn.name))}function Vr(e,t){switch(t.kind){case ye.LIST_TYPE:{const n=Vr(e,t.type);return n&&new rn(n)}case ye.NON_NULL_TYPE:{const n=Vr(e,t.type);return n&&new on(n)}case ye.NAMED_TYPE:return e.getType(t.name.value)}}class Br{constructor(e,t,n){this._schema=e,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=null!=n?n:$r,t&&(Xt(t)&&this._inputTypeStack.push(t),en(t)&&this._parentTypeStack.push(t),Jt(t)&&this._typeStack.push(t))}get[Symbol.toStringTag](){return"TypeInfo"}getType(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]}getParentType(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]}getInputType(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]}getParentInputType(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]}getFieldDef(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]}getDefaultValue(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]}getDirective(){return this._directive}getArgument(){return this._argument}getEnumValue(){return this._enumValue}enter(e){const t=this._schema;switch(e.kind){case ye.SELECTION_SET:{const e=dn(this.getType());this._parentTypeStack.push(en(e)?e:void 0);break}case ye.FIELD:{const n=this.getParentType();let r,i;n&&(r=this._getFieldDef(t,n,e),r&&(i=r.type)),this._fieldDefStack.push(r),this._typeStack.push(Jt(i)?i:void 0);break}case ye.DIRECTIVE:this._directive=t.getDirective(e.name.value);break;case ye.OPERATION_DEFINITION:{const n=t.getRootType(e.operation);this._typeStack.push(Ut(n)?n:void 0);break}case ye.INLINE_FRAGMENT:case ye.FRAGMENT_DEFINITION:{const n=e.typeCondition,r=n?Vr(t,n):dn(this.getType());this._typeStack.push(Jt(r)?r:void 0);break}case ye.VARIABLE_DEFINITION:{const n=Vr(t,e.type);this._inputTypeStack.push(Xt(n)?n:void 0);break}case ye.ARGUMENT:{var n;let t,r;const i=null!==(n=this.getDirective())&&void 0!==n?n:this.getFieldDef();i&&(t=i.args.find((t=>t.name===e.name.value)),t&&(r=t.type)),this._argument=t,this._defaultValueStack.push(t?t.defaultValue:void 0),this._inputTypeStack.push(Xt(r)?r:void 0);break}case ye.LIST:{const e=cn(this.getInputType()),t=Kt(e)?e.ofType:e;this._defaultValueStack.push(void 0),this._inputTypeStack.push(Xt(t)?t:void 0);break}case ye.OBJECT_FIELD:{const t=dn(this.getInputType());let n,r;Yt(t)&&(r=t.getFields()[e.name.value],r&&(n=r.type)),this._defaultValueStack.push(r?r.defaultValue:void 0),this._inputTypeStack.push(Xt(n)?n:void 0);break}case ye.ENUM:{const t=dn(this.getInputType());let n;Gt(t)&&(n=t.getValue(e.value)),this._enumValue=n;break}}}leave(e){switch(e.kind){case ye.SELECTION_SET:this._parentTypeStack.pop();break;case ye.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case ye.DIRECTIVE:this._directive=null;break;case ye.OPERATION_DEFINITION:case ye.INLINE_FRAGMENT:case ye.FRAGMENT_DEFINITION:this._typeStack.pop();break;case ye.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case ye.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case ye.LIST:case ye.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case ye.ENUM:this._enumValue=null}}}function $r(e,t,n){const r=n.name.value;return r===hr.name&&e.getQueryType()===t?hr:r===mr.name&&e.getQueryType()===t?mr:r===vr.name&&en(t)?vr:Ut(t)||qt(t)?t.getFields()[r]:void 0}function Ur(e,t){return{enter(...n){const r=n[0];e.enter(r);const i=At(t,r.kind).enter;if(i){const o=i.apply(t,n);return void 0!==o&&(e.leave(r),pe(o)&&e.enter(o)),o}},leave(...n){const r=n[0],i=At(t,r.kind).leave;let o;return i&&(o=i.apply(t,n)),e.leave(r),o}}}function Hr(e){return e.kind===ye.OPERATION_DEFINITION||e.kind===ye.FRAGMENT_DEFINITION}function qr(e){return e.kind===ye.VARIABLE||e.kind===ye.INT||e.kind===ye.FLOAT||e.kind===ye.STRING||e.kind===ye.BOOLEAN||e.kind===ye.NULL||e.kind===ye.ENUM||e.kind===ye.LIST||e.kind===ye.OBJECT}function zr(e){return e.kind===ye.SCHEMA_DEFINITION||Wr(e)||e.kind===ye.DIRECTIVE_DEFINITION}function Wr(e){return e.kind===ye.SCALAR_TYPE_DEFINITION||e.kind===ye.OBJECT_TYPE_DEFINITION||e.kind===ye.INTERFACE_TYPE_DEFINITION||e.kind===ye.UNION_TYPE_DEFINITION||e.kind===ye.ENUM_TYPE_DEFINITION||e.kind===ye.INPUT_OBJECT_TYPE_DEFINITION}function Gr(e){return e.kind===ye.SCHEMA_EXTENSION||Yr(e)}function Yr(e){return e.kind===ye.SCALAR_TYPE_EXTENSION||e.kind===ye.OBJECT_TYPE_EXTENSION||e.kind===ye.INTERFACE_TYPE_EXTENSION||e.kind===ye.UNION_TYPE_EXTENSION||e.kind===ye.ENUM_TYPE_EXTENSION||e.kind===ye.INPUT_OBJECT_TYPE_EXTENSION}function Kr(e){return{Document(t){for(const n of t.definitions)if(!Hr(n)){const t=n.kind===ye.SCHEMA_DEFINITION||n.kind===ye.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new ae(`The ${t} definition is not executable.`,{nodes:n}))}return!1}}}function Qr(e){return{Field(t){const n=e.getParentType();if(n){if(!e.getFieldDef()){const r=e.getSchema(),i=t.name.value;let o=ut("to use an inline fragment on",function(e,t,n){if(!tn(t))return[];const r=new Set,i=Object.create(null);for(const a of e.getPossibleTypes(t))if(a.getFields()[n]){r.add(a),i[a.name]=1;for(const e of a.getInterfaces()){var o;e.getFields()[n]&&(r.add(e),i[e.name]=(null!==(o=i[e.name])&&void 0!==o?o:0)+1)}}return[...r].sort(((t,n)=>{const r=i[n.name]-i[t.name];return 0!==r?r:qt(t)&&e.isSubType(t,n)?-1:qt(n)&&e.isSubType(n,t)?1:mt(t.name,n.name)})).map((e=>e.name))}(r,n,i));""===o&&(o=ut(function(e,t){if(Ut(e)||qt(e)){return bt(t,Object.keys(e.getFields()))}return[]}(n,i))),e.reportError(new ae(`Cannot query field "${i}" on type "${n.name}".`+o,{nodes:t}))}}}}}function Xr(e){return{InlineFragment(t){const n=t.typeCondition;if(n){const t=Vr(e.getSchema(),n);if(t&&!en(t)){const t=Dt(n);e.reportError(new ae(`Fragment cannot condition on non composite type "${t}".`,{nodes:n}))}}},FragmentDefinition(t){const n=Vr(e.getSchema(),t.typeCondition);if(n&&!en(n)){const n=Dt(t.typeCondition);e.reportError(new ae(`Fragment "${t.name.value}" cannot condition on non composite type "${n}".`,{nodes:t.typeCondition}))}}}}function Jr(e){return{...Zr(e),Argument(t){const n=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!n&&r&&i){const n=t.name.value,o=bt(n,r.args.map((e=>e.name)));e.reportError(new ae(`Unknown argument "${n}" on field "${i.name}.${r.name}".`+ut(o),{nodes:t}))}}}}function Zr(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Zn;for(const a of r)t[a.name]=a.args.map((e=>e.name));const i=e.getDocument().definitions;for(const a of i)if(a.kind===ye.DIRECTIVE_DEFINITION){var o;const e=null!==(o=a.arguments)&&void 0!==o?o:[];t[a.name.value]=e.map((e=>e.name.value))}return{Directive(n){const r=n.name.value,i=t[r];if(n.arguments&&i)for(const t of n.arguments){const n=t.name.value;if(!i.includes(n)){const o=bt(n,i);e.reportError(new ae(`Unknown argument "${n}" on directive "@${r}".`+ut(o),{nodes:t}))}}return!1}}}function ei(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Zn;for(const o of r)t[o.name]=o.locations;const i=e.getDocument().definitions;for(const o of i)o.kind===ye.DIRECTIVE_DEFINITION&&(t[o.name.value]=o.locations.map((e=>e.value)));return{Directive(n,r,i,o,a){const s=n.name.value,l=t[s];if(!l)return void e.reportError(new ae(`Unknown directive "@${s}".`,{nodes:n}));const c=function(e){const t=e[e.length-1];switch("kind"in t||ee(!1),t.kind){case ye.OPERATION_DEFINITION:return function(e){switch(e){case he.QUERY:return ve.QUERY;case he.MUTATION:return ve.MUTATION;case he.SUBSCRIPTION:return ve.SUBSCRIPTION}}(t.operation);case ye.FIELD:return ve.FIELD;case ye.FRAGMENT_SPREAD:return ve.FRAGMENT_SPREAD;case ye.INLINE_FRAGMENT:return ve.INLINE_FRAGMENT;case ye.FRAGMENT_DEFINITION:return ve.FRAGMENT_DEFINITION;case ye.VARIABLE_DEFINITION:return ve.VARIABLE_DEFINITION;case ye.SCHEMA_DEFINITION:case ye.SCHEMA_EXTENSION:return ve.SCHEMA;case ye.SCALAR_TYPE_DEFINITION:case ye.SCALAR_TYPE_EXTENSION:return ve.SCALAR;case ye.OBJECT_TYPE_DEFINITION:case ye.OBJECT_TYPE_EXTENSION:return ve.OBJECT;case ye.FIELD_DEFINITION:return ve.FIELD_DEFINITION;case ye.INTERFACE_TYPE_DEFINITION:case ye.INTERFACE_TYPE_EXTENSION:return ve.INTERFACE;case ye.UNION_TYPE_DEFINITION:case ye.UNION_TYPE_EXTENSION:return ve.UNION;case ye.ENUM_TYPE_DEFINITION:case ye.ENUM_TYPE_EXTENSION:return ve.ENUM;case ye.ENUM_VALUE_DEFINITION:return ve.ENUM_VALUE;case ye.INPUT_OBJECT_TYPE_DEFINITION:case ye.INPUT_OBJECT_TYPE_EXTENSION:return ve.INPUT_OBJECT;case ye.INPUT_VALUE_DEFINITION:{const t=e[e.length-3];return"kind"in t||ee(!1),t.kind===ye.INPUT_OBJECT_TYPE_DEFINITION?ve.INPUT_FIELD_DEFINITION:ve.ARGUMENT_DEFINITION}default:ee(!1,"Unexpected kind: "+Ze(t.kind))}}(a);c&&!l.includes(c)&&e.reportError(new ae(`Directive "@${s}" may not be used on ${c}.`,{nodes:n}))}}}function ti(e){return{FragmentSpread(t){const n=t.name.value;e.getFragment(n)||e.reportError(new ae(`Unknown fragment "${n}".`,{nodes:t.name}))}}}function ni(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(const o of e.getDocument().definitions)Wr(o)&&(r[o.name.value]=!0);const i=[...Object.keys(n),...Object.keys(r)];return{NamedType(t,o,a,s,l){const c=t.name.value;if(!n[c]&&!r[c]){var u;const n=null!==(u=l[2])&&void 0!==u?u:a,r=null!=n&&("kind"in(d=n)&&(zr(d)||Gr(d)));if(r&&ri.includes(c))return;const o=bt(c,r?ri.concat(i):i);e.reportError(new ae(`Unknown type "${c}".`+ut(o),{nodes:t}))}var d}}}const ri=[...Un,...gr].map((e=>e.name));function ii(e){let t=0;return{Document(e){t=e.definitions.filter((e=>e.kind===ye.OPERATION_DEFINITION)).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new ae("This anonymous operation must be the only defined operation.",{nodes:n}))}}}function oi(e){var t,n,r;const i=e.getSchema(),o=null!==(t=null!==(n=null!==(r=null==i?void 0:i.astNode)&&void 0!==r?r:null==i?void 0:i.getQueryType())&&void 0!==n?n:null==i?void 0:i.getMutationType())&&void 0!==t?t:null==i?void 0:i.getSubscriptionType();let a=0;return{SchemaDefinition(t){o?e.reportError(new ae("Cannot define a new schema within a schema extension.",{nodes:t})):(a>0&&e.reportError(new ae("Must provide only one schema definition.",{nodes:t})),++a)}}}function ai(e){function t(n,r=Object.create(null),i=0){if(n.kind===ye.FRAGMENT_SPREAD){const o=n.name.value;if(!0===r[o])return!1;const a=e.getFragment(o);if(!a)return!1;try{return r[o]=!0,t(a,r,i)}finally{r[o]=void 0}}if(n.kind===ye.FIELD&&("fields"===n.name.value||"interfaces"===n.name.value||"possibleTypes"===n.name.value||"inputFields"===n.name.value)&&++i>=3)return!0;if("selectionSet"in n&&n.selectionSet)for(const e of n.selectionSet.selections)if(t(e,r,i))return!0;return!1}return{Field(n){if(("__schema"===n.name.value||"__type"===n.name.value)&&t(n))return e.reportError(new ae("Maximum introspection depth exceeded",{nodes:[n]})),!1}}}function si(e){const t=Object.create(null),n=[],r=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition:e=>(i(e),!1)};function i(o){if(t[o.name.value])return;const a=o.name.value;t[a]=!0;const s=e.getFragmentSpreads(o.selectionSet);if(0!==s.length){r[a]=n.length;for(const t of s){const o=t.name.value,a=r[o];if(n.push(t),void 0===a){const t=e.getFragment(o);t&&i(t)}else{const t=n.slice(a),r=t.slice(0,-1).map((e=>'"'+e.name.value+'"')).join(", ");e.reportError(new ae(`Cannot spread fragment "${o}" within itself`+(""!==r?` via ${r}.`:"."),{nodes:t}))}n.pop()}r[a]=void 0}}}function li(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const r=e.getRecursiveVariableUsages(n);for(const{node:i}of r){const r=i.name.value;!0!==t[r]&&e.reportError(new ae(n.name?`Variable "$${r}" is not defined by operation "${n.name.value}".`:`Variable "$${r}" is not defined.`,{nodes:[i,n]}))}}},VariableDefinition(e){t[e.variable.name.value]=!0}}}function ci(e){const t=[],n=[];return{OperationDefinition:e=>(t.push(e),!1),FragmentDefinition:e=>(n.push(e),!1),Document:{leave(){const r=Object.create(null);for(const n of t)for(const t of e.getRecursivelyReferencedFragments(n))r[t.name.value]=!0;for(const t of n){const n=t.name.value;!0!==r[n]&&e.reportError(new ae(`Fragment "${n}" is never used.`,{nodes:t}))}}}}}function ui(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(n){const r=Object.create(null),i=e.getRecursiveVariableUsages(n);for(const{node:e}of i)r[e.name.value]=!0;for(const o of t){const t=o.variable.name.value;!0!==r[t]&&e.reportError(new ae(n.name?`Variable "$${t}" is never used in operation "${n.name.value}".`:`Variable "$${t}" is never used.`,{nodes:o}))}}},VariableDefinition(e){t.push(e)}}}function di(e){switch(e.kind){case ye.OBJECT:return{...e,fields:(t=e.fields,t.map((e=>({...e,value:di(e.value)}))).sort(((e,t)=>mt(e.name.value,t.name.value))))};case ye.LIST:return{...e,values:e.values.map(di)};case ye.INT:case ye.FLOAT:case ye.STRING:case ye.BOOLEAN:case ye.NULL:case ye.ENUM:case ye.VARIABLE:return e}var t}function fi(e){return Array.isArray(e)?e.map((([e,t])=>`subfields "${e}" conflict because `+fi(t))).join(" and "):e}function pi(e){const t=new Ti,n=new Map;return{SelectionSet(r){const i=function(e,t,n,r,i){const o=[],[a,s]=Ei(e,t,r,i);if(function(e,t,n,r,i){for(const[o,a]of Object.entries(i))if(a.length>1)for(let i=0;i<a.length;i++)for(let s=i+1;s<a.length;s++){const l=gi(e,n,r,!1,o,a[i],a[s]);l&&t.push(l)}}(e,o,t,n,a),0!==s.length)for(let l=0;l<s.length;l++){hi(e,o,t,n,!1,a,s[l]);for(let r=l+1;r<s.length;r++)mi(e,o,t,n,!1,s[l],s[r])}return o}(e,n,t,e.getParentType(),r);for(const[[t,n],o,a]of i){const r=fi(n);e.reportError(new ae(`Fields "${t}" conflict because ${r}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:o.concat(a)}))}}}}function hi(e,t,n,r,i,o,a){const s=e.getFragment(a);if(!s)return;const[l,c]=xi(e,n,s);if(o!==l){vi(e,t,n,r,i,o,l);for(const s of c)r.has(s,a,i)||(r.add(s,a,i),hi(e,t,n,r,i,o,s))}}function mi(e,t,n,r,i,o,a){if(o===a)return;if(r.has(o,a,i))return;r.add(o,a,i);const s=e.getFragment(o),l=e.getFragment(a);if(!s||!l)return;const[c,u]=xi(e,n,s),[d,f]=xi(e,n,l);vi(e,t,n,r,i,c,d);for(const p of f)mi(e,t,n,r,i,o,p);for(const p of u)mi(e,t,n,r,i,p,a)}function vi(e,t,n,r,i,o,a){for(const[s,l]of Object.entries(o)){const o=a[s];if(o)for(const a of l)for(const l of o){const o=gi(e,n,r,i,s,a,l);o&&t.push(o)}}}function gi(e,t,n,r,i,o,a){const[s,l,c]=o,[u,d,f]=a,p=r||s!==u&&Ut(s)&&Ut(u);if(!p){const e=l.name.value,t=d.name.value;if(e!==t)return[[i,`"${e}" and "${t}" are different fields`],[l],[d]];if(!function(e,t){const n=e.arguments,r=t.arguments;if(void 0===n||0===n.length)return void 0===r||0===r.length;if(void 0===r||0===r.length)return!1;if(n.length!==r.length)return!1;const i=new Map(r.map((({name:e,value:t})=>[e.value,t])));return n.every((e=>{const t=e.value,n=i.get(e.name.value);return void 0!==n&&yi(t)===yi(n)}))}(l,d))return[[i,"they have differing arguments"],[l],[d]]}const h=null==c?void 0:c.type,m=null==f?void 0:f.type;if(h&&m&&bi(h,m))return[[i,`they return conflicting types "${Ze(h)}" and "${Ze(m)}"`],[l],[d]];const v=l.selectionSet,g=d.selectionSet;if(v&&g){const r=function(e,t,n,r,i,o,a,s){const l=[],[c,u]=Ei(e,t,i,o),[d,f]=Ei(e,t,a,s);vi(e,l,t,n,r,c,d);for(const p of f)hi(e,l,t,n,r,c,p);for(const p of u)hi(e,l,t,n,r,d,p);for(const p of u)for(const i of f)mi(e,l,t,n,r,p,i);return l}(e,t,n,p,dn(h),v,dn(m),g);return function(e,t,n,r){if(e.length>0)return[[t,e.map((([e])=>e))],[n,...e.map((([,e])=>e)).flat()],[r,...e.map((([,,e])=>e)).flat()]]}(r,i,l,d)}}function yi(e){return Dt(di(e))}function bi(e,t){return Kt(e)?!Kt(t)||bi(e.ofType,t.ofType):!!Kt(t)||(Qt(e)?!Qt(t)||bi(e.ofType,t.ofType):!!Qt(t)||!(!Zt(e)&&!Zt(t))&&e!==t)}function Ei(e,t,n,r){const i=t.get(r);if(i)return i;const o=Object.create(null),a=Object.create(null);wi(e,n,r,o,a);const s=[o,Object.keys(a)];return t.set(r,s),s}function xi(e,t,n){const r=t.get(n.selectionSet);if(r)return r;const i=Vr(e.getSchema(),n.typeCondition);return Ei(e,t,i,n.selectionSet)}function wi(e,t,n,r,i){for(const o of n.selections)switch(o.kind){case ye.FIELD:{const e=o.name.value;let n;(Ut(t)||qt(t))&&(n=t.getFields()[e]);const i=o.alias?o.alias.value:e;r[i]||(r[i]=[]),r[i].push([t,o,n]);break}case ye.FRAGMENT_SPREAD:i[o.name.value]=!0;break;case ye.INLINE_FRAGMENT:{const n=o.typeCondition,a=n?Vr(e.getSchema(),n):t;wi(e,a,o.selectionSet,r,i);break}}}class Ti{constructor(){this._data=new Map}has(e,t,n){var r;const[i,o]=e<t?[e,t]:[t,e],a=null===(r=this._data.get(i))||void 0===r?void 0:r.get(o);return void 0!==a&&(!!n||n===a)}add(e,t,n){const[r,i]=e<t?[e,t]:[t,e],o=this._data.get(r);void 0===o?this._data.set(r,new Map([[i,n]])):o.set(i,n)}}function Ci(e){return{InlineFragment(t){const n=e.getType(),r=e.getParentType();if(en(n)&&en(r)&&!Fn(e.getSchema(),n,r)){const i=Ze(r),o=Ze(n);e.reportError(new ae(`Fragment cannot be spread here as objects of type "${i}" can never be of type "${o}".`,{nodes:t}))}},FragmentSpread(t){const n=t.name.value,r=function(e,t){const n=e.getFragment(t);if(n){const t=Vr(e.getSchema(),n.typeCondition);if(en(t))return t}}(e,n),i=e.getParentType();if(r&&i&&!Fn(e.getSchema(),r,i)){const o=Ze(i),a=Ze(r);e.reportError(new ae(`Fragment "${n}" cannot be spread here as objects of type "${o}" can never be of type "${a}".`,{nodes:t}))}}}}function ki(e){const t=e.getSchema(),n=Object.create(null);for(const i of e.getDocument().definitions)Wr(i)&&(n[i.name.value]=i);return{ScalarTypeExtension:r,ObjectTypeExtension:r,InterfaceTypeExtension:r,UnionTypeExtension:r,EnumTypeExtension:r,InputObjectTypeExtension:r};function r(r){const i=r.name.value,o=n[i],a=null==t?void 0:t.getType(i);let s;if(o?s=Si[o.kind]:a&&(s=function(e){if($t(e))return ye.SCALAR_TYPE_EXTENSION;if(Ut(e))return ye.OBJECT_TYPE_EXTENSION;if(qt(e))return ye.INTERFACE_TYPE_EXTENSION;if(Wt(e))return ye.UNION_TYPE_EXTENSION;if(Gt(e))return ye.ENUM_TYPE_EXTENSION;if(Yt(e))return ye.INPUT_OBJECT_TYPE_EXTENSION;ee(!1,"Unexpected type: "+Ze(e))}(a)),s){if(s!==r.kind){const t=function(e){switch(e){case ye.SCALAR_TYPE_EXTENSION:return"scalar";case ye.OBJECT_TYPE_EXTENSION:return"object";case ye.INTERFACE_TYPE_EXTENSION:return"interface";case ye.UNION_TYPE_EXTENSION:return"union";case ye.ENUM_TYPE_EXTENSION:return"enum";case ye.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:ee(!1,"Unexpected kind: "+Ze(e))}}(r.kind);e.reportError(new ae(`Cannot extend non-${t} type "${i}".`,{nodes:o?[o,r]:r}))}}else{const o=bt(i,Object.keys({...n,...null==t?void 0:t.getTypeMap()}));e.reportError(new ae(`Cannot extend type "${i}" because it is not defined.`+ut(o),{nodes:r.name}))}}}const Si={[ye.SCALAR_TYPE_DEFINITION]:ye.SCALAR_TYPE_EXTENSION,[ye.OBJECT_TYPE_DEFINITION]:ye.OBJECT_TYPE_EXTENSION,[ye.INTERFACE_TYPE_DEFINITION]:ye.INTERFACE_TYPE_EXTENSION,[ye.UNION_TYPE_DEFINITION]:ye.UNION_TYPE_EXTENSION,[ye.ENUM_TYPE_DEFINITION]:ye.ENUM_TYPE_EXTENSION,[ye.INPUT_OBJECT_TYPE_DEFINITION]:ye.INPUT_OBJECT_TYPE_EXTENSION};function _i(e){return{...Ni(e),Field:{leave(t){var n;const r=e.getFieldDef();if(!r)return!1;const i=new Set(null===(n=t.arguments)||void 0===n?void 0:n.map((e=>e.name.value)));for(const o of r.args)if(!i.has(o.name)&&wn(o)){const n=Ze(o.type);e.reportError(new ae(`Field "${r.name}" argument "${o.name}" of type "${n}" is required, but it was not provided.`,{nodes:t}))}}}}}function Ni(e){var t;const n=Object.create(null),r=e.getSchema(),i=null!==(t=null==r?void 0:r.getDirectives())&&void 0!==t?t:Zn;for(const s of i)n[s.name]=ft(s.args.filter(wn),(e=>e.name));const o=e.getDocument().definitions;for(const s of o)if(s.kind===ye.DIRECTIVE_DEFINITION){var a;const e=null!==(a=s.arguments)&&void 0!==a?a:[];n[s.name.value]=ft(e.filter(Ai),(e=>e.name.value))}return{Directive:{leave(t){const r=t.name.value,i=n[r];if(i){var o;const n=null!==(o=t.arguments)&&void 0!==o?o:[],a=new Set(n.map((e=>e.name.value)));for(const[o,s]of Object.entries(i))if(!a.has(o)){const n=Bt(s.type)?Ze(s.type):Dt(s.type);e.reportError(new ae(`Directive "@${r}" argument "${o}" of type "${n}" is required, but it was not provided.`,{nodes:t}))}}}}}}function Ai(e){return e.type.kind===ye.NON_NULL_TYPE&&null==e.defaultValue}function Di(e){return{Field(t){const n=e.getType(),r=t.selectionSet;if(n)if(Zt(dn(n))){if(r){const i=t.name.value,o=Ze(n);e.reportError(new ae(`Field "${i}" must not have a selection since type "${o}" has no subfields.`,{nodes:r}))}}else if(!r){const r=t.name.value,i=Ze(n);e.reportError(new ae(`Field "${r}" of type "${i}" must have a selection of subfields. Did you mean "${r} { ... }"?`,{nodes:t}))}}}}function Ii(e){return e.map((e=>"number"==typeof e?"["+e.toString()+"]":"."+e)).join("")}function Oi(e,t,n){return{prev:e,key:t,typename:n}}function Li(e){const t=[];let n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}function Fi(e,t,n=Ri){return Mi(e,t,n,void 0)}function Ri(e,t,n){let r="Invalid value "+Ze(t);throw e.length>0&&(r+=` at "value${Ii(e)}"`),n.message=r+": "+n.message,n}function Mi(e,t,n,r){if(Qt(t))return null!=e?Mi(e,t.ofType,n,r):void n(Li(r),e,new ae(`Expected non-nullable type "${Ze(t)}" not to be null.`));if(null==e)return null;if(Kt(t)){const i=t.ofType;return tr(e)?Array.from(e,((e,t)=>{const o=Oi(r,t,void 0);return Mi(e,i,n,o)})):[Mi(e,i,n,r)]}if(Yt(t)){if(!Z(e))return void n(Li(r),e,new ae(`Expected type "${t.name}" to be an object.`));const i={},o=t.getFields();for(const a of Object.values(o)){const o=e[a.name];if(void 0!==o)i[a.name]=Mi(o,a.type,n,Oi(r,a.name,t.name));else if(void 0!==a.defaultValue)i[a.name]=a.defaultValue;else if(Qt(a.type)){const t=Ze(a.type);n(Li(r),e,new ae(`Field "${a.name}" of required type "${t}" was not provided.`))}}for(const a of Object.keys(e))if(!o[a]){const i=bt(a,Object.keys(t.getFields()));n(Li(r),e,new ae(`Field "${a}" is not defined by type "${t.name}".`+ut(i)))}if(t.isOneOf){const o=Object.keys(i);1!==o.length&&n(Li(r),e,new ae(`Exactly one key must be specified for OneOf type "${t.name}".`));const a=o[0],s=i[a];null===s&&n(Li(r).concat(a),s,new ae(`Field "${a}" must be non-null.`))}return i}if(Zt(t)){let o;try{o=t.parseValue(e)}catch(i){return void n(Li(r),e,i instanceof ae?i:new ae(`Expected type "${t.name}". `+i.message,{originalError:i}))}return void 0===o&&n(Li(r),e,new ae(`Expected type "${t.name}".`)),o}ee(!1,"Unexpected input type: "+Ze(t))}function Pi(e,t,n){if(e){if(e.kind===ye.VARIABLE){const r=e.name.value;if(null==n||void 0===n[r])return;const i=n[r];if(null===i&&Qt(t))return;return i}if(Qt(t)){if(e.kind===ye.NULL)return;return Pi(e,t.ofType,n)}if(e.kind===ye.NULL)return null;if(Kt(t)){const r=t.ofType;if(e.kind===ye.LIST){const t=[];for(const i of e.values)if(ji(i,n)){if(Qt(r))return;t.push(null)}else{const e=Pi(i,r,n);if(void 0===e)return;t.push(e)}return t}const i=Pi(e,r,n);if(void 0===i)return;return[i]}if(Yt(t)){if(e.kind!==ye.OBJECT)return;const r=Object.create(null),i=ft(e.fields,(e=>e.name.value));for(const e of Object.values(t.getFields())){const t=i[e.name];if(!t||ji(t.value,n)){if(void 0!==e.defaultValue)r[e.name]=e.defaultValue;else if(Qt(e.type))return;continue}const o=Pi(t.value,e.type,n);if(void 0===o)return;r[e.name]=o}if(t.isOneOf){const e=Object.keys(r);if(1!==e.length)return;if(null===r[e[0]])return}return r}if(Zt(t)){let i;try{i=t.parseLiteral(e,n)}catch(r){return}if(void 0===i)return;return i}ee(!1,"Unexpected input type: "+Ze(t))}}function ji(e,t){return e.kind===ye.VARIABLE&&(null==t||void 0===t[e.name.value])}function Vi(e,t,n,r){const i=[],o=null==r?void 0:r.maxErrors;try{const r=function(e,t,n,r){const i={};for(const o of t){const t=o.variable.name.value,a=Vr(e,o.type);if(!Xt(a)){const e=Dt(o.type);r(new ae(`Variable "$${t}" expected value of type "${e}" which cannot be used as an input type.`,{nodes:o.type}));continue}if(!Ui(n,t)){if(o.defaultValue)i[t]=Pi(o.defaultValue,a);else if(Qt(a)){const e=Ze(a);r(new ae(`Variable "$${t}" of required type "${e}" was not provided.`,{nodes:o}))}continue}const s=n[t];if(null===s&&Qt(a)){const e=Ze(a);r(new ae(`Variable "$${t}" of non-null type "${e}" must not be null.`,{nodes:o}))}else i[t]=Fi(s,a,((e,n,i)=>{let a=`Variable "$${t}" got invalid value `+Ze(n);e.length>0&&(a+=` at "${t}${Ii(e)}"`),r(new ae(a+"; "+i.message,{nodes:o,originalError:i}))}))}return i}(e,t,n,(e=>{if(null!=o&&i.length>=o)throw new ae("Too many errors processing variables, error limit reached. Execution aborted.");i.push(e)}));if(0===i.length)return{coerced:r}}catch(a){i.push(a)}return{errors:i}}function Bi(e,t,n){var r;const i={},o=ft(null!==(r=t.arguments)&&void 0!==r?r:[],(e=>e.name.value));for(const a of e.args){const e=a.name,r=a.type,s=o[e];if(!s){if(void 0!==a.defaultValue)i[e]=a.defaultValue;else if(Qt(r))throw new ae(`Argument "${e}" of required type "${Ze(r)}" was not provided.`,{nodes:t});continue}const l=s.value;let c=l.kind===ye.NULL;if(l.kind===ye.VARIABLE){const t=l.name.value;if(null==n||!Ui(n,t)){if(void 0!==a.defaultValue)i[e]=a.defaultValue;else if(Qt(r))throw new ae(`Argument "${e}" of required type "${Ze(r)}" was provided the variable "$${t}" which was not provided a runtime value.`,{nodes:l});continue}c=null==n[t]}if(c&&Qt(r))throw new ae(`Argument "${e}" of non-null type "${Ze(r)}" must not be null.`,{nodes:l});const u=Pi(l,r,n);if(void 0===u)throw new ae(`Argument "${e}" has invalid value ${Dt(l)}.`,{nodes:l});i[e]=u}return i}function $i(e,t,n){var r;const i=null===(r=t.directives)||void 0===r?void 0:r.find((t=>t.name.value===e.name));if(i)return Bi(e,i,n)}function Ui(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Hi(e,t,n,r,i){const o=new Map;return qi(e,t,n,r,i,o,new Set),o}function qi(e,t,n,r,i,o,a){for(const l of i.selections)switch(l.kind){case ye.FIELD:{if(!zi(n,l))continue;const e=(s=l).alias?s.alias.value:s.name.value,t=o.get(e);void 0!==t?t.push(l):o.set(e,[l]);break}case ye.INLINE_FRAGMENT:if(!zi(n,l)||!Wi(e,l,r))continue;qi(e,t,n,r,l.selectionSet,o,a);break;case ye.FRAGMENT_SPREAD:{const i=l.name.value;if(a.has(i)||!zi(n,l))continue;a.add(i);const s=t[i];if(!s||!Wi(e,s,r))continue;qi(e,t,n,r,s.selectionSet,o,a);break}}var s}function zi(e,t){const n=$i(Yn,t,e);if(!0===(null==n?void 0:n.if))return!1;const r=$i(Gn,t,e);return!1!==(null==r?void 0:r.if)}function Wi(e,t,n){const r=t.typeCondition;if(!r)return!0;const i=Vr(e,r);return i===n||!!tn(i)&&e.isSubType(i,n)}function Gi(e){return{OperationDefinition(t){if("subscription"===t.operation){const n=e.getSchema(),r=n.getSubscriptionType();if(r){const i=t.name?t.name.value:null,o=Object.create(null),a=e.getDocument(),s=Object.create(null);for(const e of a.definitions)e.kind===ye.FRAGMENT_DEFINITION&&(s[e.name.value]=e);const l=Hi(n,s,o,r,t.selectionSet);if(l.size>1){const t=[...l.values()].slice(1).flat();e.reportError(new ae(null!=i?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:t}))}for(const t of l.values()){t[0].name.value.startsWith("__")&&e.reportError(new ae(null!=i?`Subscription "${i}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:t}))}}}}}}function Yi(e,t){const n=new Map;for(const r of e){const e=t(r),i=n.get(e);void 0===i?n.set(e,[r]):i.push(r)}return n}function Ki(e){return{DirectiveDefinition(e){var t;const r=null!==(t=e.arguments)&&void 0!==t?t:[];return n(`@${e.name.value}`,r)},InterfaceTypeDefinition:t,InterfaceTypeExtension:t,ObjectTypeDefinition:t,ObjectTypeExtension:t};function t(e){var t;const r=e.name.value,i=null!==(t=e.fields)&&void 0!==t?t:[];for(const a of i){var o;n(`${r}.${a.name.value}`,null!==(o=a.arguments)&&void 0!==o?o:[])}return!1}function n(t,n){const r=Yi(n,(e=>e.name.value));for(const[i,o]of r)o.length>1&&e.reportError(new ae(`Argument "${t}(${i}:)" can only be defined once.`,{nodes:o.map((e=>e.name))}));return!1}}function Qi(e){return{Field:t,Directive:t};function t(t){var n;const r=Yi(null!==(n=t.arguments)&&void 0!==n?n:[],(e=>e.name.value));for(const[i,o]of r)o.length>1&&e.reportError(new ae(`There can be only one argument named "${i}".`,{nodes:o.map((e=>e.name))}))}}function Xi(e){const t=Object.create(null),n=e.getSchema();return{DirectiveDefinition(r){const i=r.name.value;if(null==n||!n.getDirective(i))return t[i]?e.reportError(new ae(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1;e.reportError(new ae(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}))}}}function Ji(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Zn;for(const s of r)t[s.name]=!s.isRepeatable;const i=e.getDocument().definitions;for(const s of i)s.kind===ye.DIRECTIVE_DEFINITION&&(t[s.name.value]=!s.repeatable);const o=Object.create(null),a=Object.create(null);return{enter(n){if(!("directives"in n)||!n.directives)return;let r;if(n.kind===ye.SCHEMA_DEFINITION||n.kind===ye.SCHEMA_EXTENSION)r=o;else if(Wr(n)||Yr(n)){const e=n.name.value;r=a[e],void 0===r&&(a[e]=r=Object.create(null))}else r=Object.create(null);for(const i of n.directives){const n=i.name.value;t[n]&&(r[n]?e.reportError(new ae(`The directive "@${n}" can only be used once at this location.`,{nodes:[r[n],i]})):r[n]=i)}}}}function Zi(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(t){var i;const o=t.name.value;r[o]||(r[o]=Object.create(null));const a=null!==(i=t.values)&&void 0!==i?i:[],s=r[o];for(const r of a){const t=r.name.value,i=n[o];Gt(i)&&i.getValue(t)?e.reportError(new ae(`Enum value "${o}.${t}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:r.name})):s[t]?e.reportError(new ae(`Enum value "${o}.${t}" can only be defined once.`,{nodes:[s[t],r.name]})):s[t]=r.name}return!1}}function eo(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{InputObjectTypeDefinition:i,InputObjectTypeExtension:i,InterfaceTypeDefinition:i,InterfaceTypeExtension:i,ObjectTypeDefinition:i,ObjectTypeExtension:i};function i(t){var i;const o=t.name.value;r[o]||(r[o]=Object.create(null));const a=null!==(i=t.fields)&&void 0!==i?i:[],s=r[o];for(const r of a){const t=r.name.value;to(n[o],t)?e.reportError(new ae(`Field "${o}.${t}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:r.name})):s[t]?e.reportError(new ae(`Field "${o}.${t}" can only be defined once.`,{nodes:[s[t],r.name]})):s[t]=r.name}return!1}}function to(e,t){return!!(Ut(e)||qt(e)||Yt(e))&&null!=e.getFields()[t]}function no(e){const t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){const r=n.name.value;return t[r]?e.reportError(new ae(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,!1}}}function ro(e){const t=[];let n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){const e=t.pop();e||ee(!1),n=e}},ObjectField(t){const r=t.name.value;n[r]?e.reportError(new ae(`There can be only one input field named "${r}".`,{nodes:[n[r],t.name]})):n[r]=t.name}}}function io(e){const t=Object.create(null);return{OperationDefinition(n){const r=n.name;return r&&(t[r.value]?e.reportError(new ae(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}function oo(e){const t=e.getSchema(),n=Object.create(null),r=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:i,SchemaExtension:i};function i(t){var i;const o=null!==(i=t.operationTypes)&&void 0!==i?i:[];for(const a of o){const t=a.operation,i=n[t];r[t]?e.reportError(new ae(`Type for ${t} already defined in the schema. It cannot be redefined.`,{nodes:a})):i?e.reportError(new ae(`There can be only one ${t} type in schema.`,{nodes:[i,a]})):n[t]=a}return!1}}function ao(e){const t=Object.create(null),n=e.getSchema();return{ScalarTypeDefinition:r,ObjectTypeDefinition:r,InterfaceTypeDefinition:r,UnionTypeDefinition:r,EnumTypeDefinition:r,InputObjectTypeDefinition:r};function r(r){const i=r.name.value;if(null==n||!n.getType(i))return t[i]?e.reportError(new ae(`There can be only one type named "${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1;e.reportError(new ae(`Type "${i}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:r.name}))}}function so(e){return{OperationDefinition(t){var n;const r=Yi(null!==(n=t.variableDefinitions)&&void 0!==n?n:[],(e=>e.variable.name.value));for(const[i,o]of r)o.length>1&&e.reportError(new ae(`There can be only one variable named "$${i}".`,{nodes:o.map((e=>e.variable.name))}))}}}function lo(e){let t={};return{OperationDefinition:{enter(){t={}}},VariableDefinition(e){t[e.variable.name.value]=e},ListValue(t){if(!Kt(cn(e.getParentInputType())))return co(e,t),!1},ObjectValue(n){const r=dn(e.getInputType());if(!Yt(r))return co(e,n),!1;const i=ft(n.fields,(e=>e.name.value));for(const t of Object.values(r.getFields())){if(!i[t.name]&&In(t)){const i=Ze(t.type);e.reportError(new ae(`Field "${r.name}.${t.name}" of required type "${i}" was not provided.`,{nodes:n}))}}r.isOneOf&&function(e,t,n,r,i){var o;const a=Object.keys(r);if(1!==a.length)return void e.reportError(new ae(`OneOf Input Object "${n.name}" must specify exactly one key.`,{nodes:[t]}));const s=null===(o=r[a[0]])||void 0===o?void 0:o.value,l=!s||s.kind===ye.NULL,c=(null==s?void 0:s.kind)===ye.VARIABLE;if(l)return void e.reportError(new ae(`Field "${n.name}.${a[0]}" must be non-null.`,{nodes:[t]}));if(c){const r=s.name.value;i[r].type.kind!==ye.NON_NULL_TYPE&&e.reportError(new ae(`Variable "${r}" must be non-nullable to be used for OneOf Input Object "${n.name}".`,{nodes:[t]}))}}(e,n,r,i,t)},ObjectField(t){const n=dn(e.getParentInputType());if(!e.getInputType()&&Yt(n)){const r=bt(t.name.value,Object.keys(n.getFields()));e.reportError(new ae(`Field "${t.name.value}" is not defined by type "${n.name}".`+ut(r),{nodes:t}))}},NullValue(t){const n=e.getInputType();Qt(n)&&e.reportError(new ae(`Expected value of type "${Ze(n)}", found ${Dt(t)}.`,{nodes:t}))},EnumValue:t=>co(e,t),IntValue:t=>co(e,t),FloatValue:t=>co(e,t),StringValue:t=>co(e,t),BooleanValue:t=>co(e,t)}}function co(e,t){const n=e.getInputType();if(!n)return;const r=dn(n);if(Zt(r))try{if(void 0===r.parseLiteral(t,void 0)){const r=Ze(n);e.reportError(new ae(`Expected value of type "${r}", found ${Dt(t)}.`,{nodes:t}))}}catch(i){const r=Ze(n);i instanceof ae?e.reportError(i):e.reportError(new ae(`Expected value of type "${r}", found ${Dt(t)}; `+i.message,{nodes:t,originalError:i}))}else{const r=Ze(n);e.reportError(new ae(`Expected value of type "${r}", found ${Dt(t)}.`,{nodes:t}))}}function uo(e){return{VariableDefinition(t){const n=Vr(e.getSchema(),t.type);if(void 0!==n&&!Xt(n)){const n=t.variable.name.value,r=Dt(t.type);e.reportError(new ae(`Variable "$${n}" cannot be non-input type "${r}".`,{nodes:t.type}))}}}}function fo(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const r=e.getRecursiveVariableUsages(n);for(const{node:i,type:o,defaultValue:a}of r){const n=i.name.value,r=t[n];if(r&&o){const t=e.getSchema(),s=Vr(t,r.type);if(s&&!po(t,s,r.defaultValue,o,a)){const t=Ze(s),a=Ze(o);e.reportError(new ae(`Variable "$${n}" of type "${t}" used in position expecting type "${a}".`,{nodes:[r,i]}))}}}}},VariableDefinition(e){t[e.variable.name.value]=e}}}function po(e,t,n,r,i){if(Qt(r)&&!Qt(t)){if(!(null!=n&&n.kind!==ye.NULL)&&!(void 0!==i))return!1;return Ln(e,t,r.ofType)}return Ln(e,t,r)}const ho=Object.freeze([ai]),mo=Object.freeze([Kr,io,ii,Gi,ni,Xr,uo,Di,Qr,no,ti,ci,Ci,si,so,li,ui,ei,Ji,Jr,Qi,lo,_i,fo,pi,ro,...ho]),vo=Object.freeze([oi,oo,ao,Zi,eo,Ki,Xi,ni,ei,Ji,ki,Zr,Qi,ro,Ni]);class go{constructor(e,t){this._ast=e,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=t}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(e){this._onError(e)}getDocument(){return this._ast}getFragment(e){let t;if(this._fragments)t=this._fragments;else{t=Object.create(null);for(const e of this.getDocument().definitions)e.kind===ye.FRAGMENT_DEFINITION&&(t[e.name.value]=e);this._fragments=t}return t[e]}getFragmentSpreads(e){let t=this._fragmentSpreads.get(e);if(!t){t=[];const n=[e];let r;for(;r=n.pop();)for(const e of r.selections)e.kind===ye.FRAGMENT_SPREAD?t.push(e):e.selectionSet&&n.push(e.selectionSet);this._fragmentSpreads.set(e,t)}return t}getRecursivelyReferencedFragments(e){let t=this._recursivelyReferencedFragments.get(e);if(!t){t=[];const n=Object.create(null),r=[e.selectionSet];let i;for(;i=r.pop();)for(const e of this.getFragmentSpreads(i)){const i=e.name.value;if(!0!==n[i]){n[i]=!0;const e=this.getFragment(i);e&&(t.push(e),r.push(e.selectionSet))}}this._recursivelyReferencedFragments.set(e,t)}return t}}class yo extends go{constructor(e,t,n){super(e,n),this._schema=t}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}}class bo extends go{constructor(e,t,n,r){super(t,r),this._schema=e,this._typeInfo=n,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(e){let t=this._variableUsages.get(e);if(!t){const n=[],r=new Br(this._schema);_t(e,Ur(r,{VariableDefinition:()=>!1,Variable(e){n.push({node:e,type:r.getInputType(),defaultValue:r.getDefaultValue()})}})),t=n,this._variableUsages.set(e,t)}return t}getRecursiveVariableUsages(e){let t=this._recursiveVariableUsages.get(e);if(!t){t=this.getVariableUsages(e);for(const n of this.getRecursivelyReferencedFragments(e))t=t.concat(this.getVariableUsages(n));this._recursiveVariableUsages.set(e,t)}return t}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getEnumValue(){return this._typeInfo.getEnumValue()}}function Eo(e,t,n=mo,r,i=new Br(e)){var o;const a=null!==(o=null==r?void 0:r.maxErrors)&&void 0!==o?o:100;t||X(!1,"Must provide document."),Cr(e);const s=Object.freeze({}),l=[],c=new bo(e,t,i,(e=>{if(l.length>=a)throw l.push(new ae("Too many validation errors, error limit reached. Validation aborted.")),s;l.push(e)})),u=Nt(n.map((e=>e(c))));try{_t(t,Ur(i,u))}catch(aN){if(aN!==s)throw aN}return l}function xo(e,t,n=vo){const r=[],i=new yo(e,t,(e=>{r.push(e)}));return _t(e,Nt(n.map((e=>e(i))))),r}function wo(e){return Promise.all(Object.values(e)).then((t=>{const n=Object.create(null);for(const[r,i]of Object.keys(e).entries())n[i]=t[r];return n}))}class To extends Error{constructor(e){super("Unexpected error value: "+Ze(e)),this.name="NonErrorThrown",this.thrownValue=e}}function Co(e,t,n){var r;const i=(o=e)instanceof Error?o:new To(o);var o,a;return a=i,Array.isArray(a.path)?i:new ae(i.message,{nodes:null!==(r=i.nodes)&&void 0!==r?r:t,source:i.source,positions:i.positions,path:n,originalError:i})}const ko=function(e){let t;return function(n,r,i){void 0===t&&(t=new WeakMap);let o=t.get(n);void 0===o&&(o=new WeakMap,t.set(n,o));let a=o.get(r);void 0===a&&(a=new WeakMap,o.set(r,a));let s=a.get(i);return void 0===s&&(s=e(n,r,i),a.set(i,s)),s}}(((e,t,n)=>function(e,t,n,r,i){const o=new Map,a=new Set;for(const s of i)s.selectionSet&&qi(e,t,n,r,s.selectionSet,o,a);return o}(e.schema,e.fragments,e.variableValues,t,n)));function So(e){arguments.length<2||X(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const{schema:t,document:n,variableValues:r,rootValue:i}=e;Ao(t,n,r);const o=Do(e);if(!("schema"in o))return{errors:o};try{const{operation:e}=o,t=function(e,t,n){const r=e.schema.getRootType(t.operation);if(null==r)throw new ae(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});const i=Hi(e.schema,e.fragments,e.variableValues,r,t.selectionSet),o=void 0;switch(t.operation){case he.QUERY:return Io(e,r,n,o,i);case he.MUTATION:return function(e,t,n,r,i){return function(e,t,n){let r=n;for(const i of e)r=J(r)?r.then((e=>t(e,i))):t(r,i);return r}(i.entries(),((i,[o,a])=>{const s=Oi(r,o,t.name),l=Oo(e,t,n,a,s);return void 0===l?i:J(l)?l.then((e=>(i[o]=e,i))):(i[o]=l,i)}),Object.create(null))}(e,r,n,o,i);case he.SUBSCRIPTION:return Io(e,r,n,o,i)}}(o,e,i);return J(t)?t.then((e=>No(e,o.errors)),(e=>(o.errors.push(e),No(null,o.errors)))):No(t,o.errors)}catch(a){return o.errors.push(a),No(null,o.errors)}}function _o(e){const t=So(e);if(J(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function No(e,t){return 0===t.length?{data:e}:{errors:t,data:e}}function Ao(e,t,n){t||X(!1,"Must provide document."),Cr(e),null==n||Z(n)||X(!1,"Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.")}function Do(e){var t,n;const{schema:r,document:i,rootValue:o,contextValue:a,variableValues:s,operationName:l,fieldResolver:c,typeResolver:u,subscribeFieldResolver:d}=e;let f;const p=Object.create(null);for(const m of i.definitions)switch(m.kind){case ye.OPERATION_DEFINITION:if(null==l){if(void 0!==f)return[new ae("Must provide operation name if query contains multiple operations.")];f=m}else(null===(t=m.name)||void 0===t?void 0:t.value)===l&&(f=m);break;case ye.FRAGMENT_DEFINITION:p[m.name.value]=m}if(!f)return null!=l?[new ae(`Unknown operation named "${l}".`)]:[new ae("Must provide an operation.")];const h=Vi(r,null!==(n=f.variableDefinitions)&&void 0!==n?n:[],null!=s?s:{},{maxErrors:50});return h.errors?h.errors:{schema:r,fragments:p,rootValue:o,contextValue:a,operation:f,variableValues:h.coerced,fieldResolver:null!=c?c:Bo,typeResolver:null!=u?u:Vo,subscribeFieldResolver:null!=d?d:Bo,errors:[]}}function Io(e,t,n,r,i){const o=Object.create(null);let a=!1;try{for(const[s,l]of i.entries()){const i=Oo(e,t,n,l,Oi(r,s,t.name));void 0!==i&&(o[s]=i,J(i)&&(a=!0))}}catch(s){if(a)return wo(o).finally((()=>{throw s}));throw s}return a?wo(o):o}function Oo(e,t,n,r,i){var o;const a=$o(e.schema,t,r[0]);if(!a)return;const s=a.type,l=null!==(o=a.resolve)&&void 0!==o?o:e.fieldResolver,c=Lo(e,a,r,t,i);try{const t=Bi(a,r[0],e.variableValues),o=l(n,t,e.contextValue,c);let u;return u=J(o)?o.then((t=>Ro(e,s,r,c,i,t))):Ro(e,s,r,c,i,o),J(u)?u.then(void 0,(t=>Fo(Co(t,r,Li(i)),s,e))):u}catch(u){return Fo(Co(u,r,Li(i)),s,e)}}function Lo(e,t,n,r,i){return{fieldName:t.name,fieldNodes:n,returnType:t.type,parentType:r,path:i,schema:e.schema,fragments:e.fragments,rootValue:e.rootValue,operation:e.operation,variableValues:e.variableValues}}function Fo(e,t,n){if(Qt(t))throw e;return n.errors.push(e),null}function Ro(e,t,n,r,i,o){if(o instanceof Error)throw o;if(Qt(t)){const a=Ro(e,t.ofType,n,r,i,o);if(null===a)throw new Error(`Cannot return null for non-nullable field ${r.parentType.name}.${r.fieldName}.`);return a}return null==o?null:Kt(t)?function(e,t,n,r,i,o){if(!tr(o))throw new ae(`Expected Iterable, but did not find one for field "${r.parentType.name}.${r.fieldName}".`);const a=t.ofType;let s=!1;const l=Array.from(o,((t,o)=>{const l=Oi(i,o,void 0);try{let i;return i=J(t)?t.then((t=>Ro(e,a,n,r,l,t))):Ro(e,a,n,r,l,t),J(i)?(s=!0,i.then(void 0,(t=>Fo(Co(t,n,Li(l)),a,e)))):i}catch(c){return Fo(Co(c,n,Li(l)),a,e)}}));return s?Promise.all(l):l}(e,t,n,r,i,o):Zt(t)?function(e,t){const n=e.serialize(t);if(null==n)throw new Error(`Expected \`${Ze(e)}.serialize(${Ze(t)})\` to return non-nullable value, returned: ${Ze(n)}`);return n}(t,o):tn(t)?function(e,t,n,r,i,o){var a;const s=null!==(a=t.resolveType)&&void 0!==a?a:e.typeResolver,l=e.contextValue,c=s(o,l,r,t);if(J(c))return c.then((a=>Po(e,Mo(a,e,t,n,r,o),n,r,i,o)));return Po(e,Mo(c,e,t,n,r,o),n,r,i,o)}(e,t,n,r,i,o):Ut(t)?Po(e,t,n,r,i,o):void ee(!1,"Cannot complete value of unexpected output type: "+Ze(t))}function Mo(e,t,n,r,i,o){if(null==e)throw new ae(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}". Either the "${n.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`,r);if(Ut(e))throw new ae("Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.");if("string"!=typeof e)throw new ae(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}" with value ${Ze(o)}, received "${Ze(e)}".`);const a=t.schema.getType(e);if(null==a)throw new ae(`Abstract type "${n.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:r});if(!Ut(a))throw new ae(`Abstract type "${n.name}" was resolved to a non-object type "${e}".`,{nodes:r});if(!t.schema.isSubType(n,a))throw new ae(`Runtime Object type "${a.name}" is not a possible type for "${n.name}".`,{nodes:r});return a}function Po(e,t,n,r,i,o){const a=ko(e,t,n);if(t.isTypeOf){const s=t.isTypeOf(o,e.contextValue,r);if(J(s))return s.then((r=>{if(!r)throw jo(t,o,n);return Io(e,t,o,i,a)}));if(!s)throw jo(t,o,n)}return Io(e,t,o,i,a)}function jo(e,t,n){return new ae(`Expected value of type "${e.name}" but got: ${Ze(t)}.`,{nodes:n})}const Vo=function(e,t,n,r){if(Z(e)&&"string"==typeof e.__typename)return e.__typename;const i=n.schema.getPossibleTypes(r),o=[];for(let a=0;a<i.length;a++){const r=i[a];if(r.isTypeOf){const i=r.isTypeOf(e,t,n);if(J(i))o[a]=i;else if(i)return r.name}}return o.length?Promise.all(o).then((e=>{for(let t=0;t<e.length;t++)if(e[t])return i[t].name})):void 0},Bo=function(e,t,n,r){if(Z(e)||"function"==typeof e){const i=e[r.fieldName];return"function"==typeof i?e[r.fieldName](t,n,r):i}};function $o(e,t,n){const r=n.name.value;return r===hr.name&&e.getQueryType()===t?hr:r===mr.name&&e.getQueryType()===t?mr:r===vr.name?vr:t.getFields()[r]}function Uo(e){arguments.length<2||X(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const{schema:t,source:n,rootValue:r,contextValue:i,variableValues:o,operationName:a,fieldResolver:s,typeResolver:l}=e,c=Tr(t);if(c.length>0)return{errors:c};let u;try{u=it(n)}catch(f){return{errors:[f]}}const d=Eo(t,u);return d.length>0?{errors:d}:So({schema:t,document:u,rootValue:r,contextValue:i,variableValues:o,operationName:a,fieldResolver:s,typeResolver:l})}function Ho(e){return"function"==typeof(null==e?void 0:e[Symbol.asyncIterator])}async function qo(...e){const t=function(e){const t=e[0];return t&&"document"in t?t:{schema:t,document:e[1],rootValue:e[2],contextValue:e[3],variableValues:e[4],operationName:e[5],subscribeFieldResolver:e[6]}}(e),{schema:n,document:r,variableValues:i}=t;Ao(n,r,i);const o=Do(t);if(!("schema"in o))return{errors:o};try{const e=await async function(e){const{schema:t,fragments:n,operation:r,variableValues:i,rootValue:o}=e,a=t.getSubscriptionType();if(null==a)throw new ae("Schema is not configured to execute subscription operation.",{nodes:r});const s=Hi(t,n,i,a,r.selectionSet),[l,c]=[...s.entries()][0],u=$o(t,a,c[0]);if(!u){const e=c[0].name.value;throw new ae(`The subscription field "${e}" is not defined.`,{nodes:c})}const d=Oi(void 0,l,a.name),f=Lo(e,u,c,a,d);try{var p;const t=Bi(u,c[0],i),n=e.contextValue,r=null!==(p=u.subscribe)&&void 0!==p?p:e.subscribeFieldResolver,a=await r(o,t,n,f);if(a instanceof Error)throw a;return a}catch(h){throw Co(h,c,Li(d))}}(o);if(!Ho(e))throw new Error(`Subscription field must return Async Iterable. Received: ${Ze(e)}.`);return e}catch(a){if(a instanceof ae)return{errors:[a]};throw a}}function zo(e){return{Field(t){const n=e.getFieldDef(),r=null==n?void 0:n.deprecationReason;if(n&&null!=r){const i=e.getParentType();null!=i||ee(!1),e.reportError(new ae(`The field ${i.name}.${n.name} is deprecated. ${r}`,{nodes:t}))}},Argument(t){const n=e.getArgument(),r=null==n?void 0:n.deprecationReason;if(n&&null!=r){const i=e.getDirective();if(null!=i)e.reportError(new ae(`Directive "@${i.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}));else{const i=e.getParentType(),o=e.getFieldDef();null!=i&&null!=o||ee(!1),e.reportError(new ae(`Field "${i.name}.${o.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){const n=dn(e.getParentInputType());if(Yt(n)){const r=n.getFields()[t.name.value],i=null==r?void 0:r.deprecationReason;null!=i&&e.reportError(new ae(`The input field ${n.name}.${r.name} is deprecated. ${i}`,{nodes:t}))}},EnumValue(t){const n=e.getEnumValue(),r=null==n?void 0:n.deprecationReason;if(n&&null!=r){const i=dn(e.getInputType());null!=i||ee(!1),e.reportError(new ae(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}function Wo(e){const t={descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1,oneOf:!1,...e},n=t.descriptions?"description":"",r=t.specifiedByUrl?"specifiedByURL":"",i=t.directiveIsRepeatable?"isRepeatable":"",o=t.schemaDescription?n:"";function a(e){return t.inputValueDeprecation?e:""}const s=t.oneOf?"isOneOf":"";return`\n query IntrospectionQuery {\n __schema {\n ${o}\n queryType { name }\n mutationType { name }\n subscriptionType { name }\n types {\n ...FullType\n }\n directives {\n name\n ${n}\n ${i}\n locations\n args${a("(includeDeprecated: true)")} {\n ...InputValue\n }\n }\n }\n }\n\n fragment FullType on __Type {\n kind\n name\n ${n}\n ${r}\n ${s}\n fields(includeDeprecated: true) {\n name\n ${n}\n args${a("(includeDeprecated: true)")} {\n ...InputValue\n }\n type {\n ...TypeRef\n }\n isDeprecated\n deprecationReason\n }\n inputFields${a("(includeDeprecated: true)")} {\n ...InputValue\n }\n interfaces {\n ...TypeRef\n }\n enumValues(includeDeprecated: true) {\n name\n ${n}\n isDeprecated\n deprecationReason\n }\n possibleTypes {\n ...TypeRef\n }\n }\n\n fragment InputValue on __InputValue {\n name\n ${n}\n type { ...TypeRef }\n defaultValue\n ${a("isDeprecated")}\n ${a("deprecationReason")}\n }\n\n fragment TypeRef on __Type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n `}function Go(e,t){Z(e)&&Z(e.__schema)||X(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${Ze(e)}.`);const n=e.__schema,r=pt(n.types,(e=>e.name),(e=>function(e){if(null!=e&&null!=e.name&&null!=e.kind)switch(e.kind){case dr.SCALAR:return new hn({name:(r=e).name,description:r.description,specifiedByURL:r.specifiedByURL});case dr.OBJECT:return new mn({name:(n=e).name,description:n.description,interfaces:()=>f(n),fields:()=>p(n)});case dr.INTERFACE:return new Tn({name:(t=e).name,description:t.description,interfaces:()=>f(t),fields:()=>p(t)});case dr.UNION:return function(e){if(!e.possibleTypes){const t=Ze(e);throw new Error(`Introspection result missing possibleTypes: ${t}.`)}return new Cn({name:e.name,description:e.description,types:()=>e.possibleTypes.map(u)})}(e);case dr.ENUM:return function(e){if(!e.enumValues){const t=Ze(e);throw new Error(`Introspection result missing enumValues: ${t}.`)}return new Sn({name:e.name,description:e.description,values:pt(e.enumValues,(e=>e.name),(e=>({description:e.description,deprecationReason:e.deprecationReason})))})}(e);case dr.INPUT_OBJECT:return function(e){if(!e.inputFields){const t=Ze(e);throw new Error(`Introspection result missing inputFields: ${t}.`)}return new An({name:e.name,description:e.description,fields:()=>m(e.inputFields),isOneOf:e.isOneOf})}(e)}var t;var n;var r;const i=Ze(e);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${i}.`)}(e)));for(const g of[...Un,...gr])r[g.name]&&(r[g.name]=g);const i=n.queryType?u(n.queryType):null,o=n.mutationType?u(n.mutationType):null,a=n.subscriptionType?u(n.subscriptionType):null,s=n.directives?n.directives.map((function(e){if(!e.args){const t=Ze(e);throw new Error(`Introspection result missing directive args: ${t}.`)}if(!e.locations){const t=Ze(e);throw new Error(`Introspection result missing directive locations: ${t}.`)}return new Wn({name:e.name,description:e.description,isRepeatable:e.isRepeatable,locations:e.locations.slice(),args:m(e.args)})})):[];return new xr({description:n.description,query:i,mutation:o,subscription:a,types:Object.values(r),directives:s,assumeValid:null==t?void 0:t.assumeValid});function l(e){if(e.kind===dr.LIST){const t=e.ofType;if(!t)throw new Error("Decorated type deeper than introspection query.");return new rn(l(t))}if(e.kind===dr.NON_NULL){const t=e.ofType;if(!t)throw new Error("Decorated type deeper than introspection query.");const n=l(t);return new on(ln(n))}return c(e)}function c(e){const t=e.name;if(!t)throw new Error(`Unknown type reference: ${Ze(e)}.`);const n=r[t];if(!n)throw new Error(`Invalid or incomplete schema, unknown type: ${t}. Ensure that a full introspection query is used in order to build a client schema.`);return n}function u(e){return Ht(c(e))}function d(e){return zt(c(e))}function f(e){if(null===e.interfaces&&e.kind===dr.INTERFACE)return[];if(!e.interfaces){const t=Ze(e);throw new Error(`Introspection result missing interfaces: ${t}.`)}return e.interfaces.map(d)}function p(e){if(!e.fields)throw new Error(`Introspection result missing fields: ${Ze(e)}.`);return pt(e.fields,(e=>e.name),h)}function h(e){const t=l(e.type);if(!Jt(t)){const e=Ze(t);throw new Error(`Introspection must provide output type for fields, but received: ${e}.`)}if(!e.args){const t=Ze(e);throw new Error(`Introspection result missing field args: ${t}.`)}return{description:e.description,deprecationReason:e.deprecationReason,type:t,args:m(e.args)}}function m(e){return pt(e,(e=>e.name),v)}function v(e){const t=l(e.type);if(!Xt(t)){const e=Ze(t);throw new Error(`Introspection must provide input type for arguments, but received: ${e}.`)}const n=null!=e.defaultValue?Pi(ot(e.defaultValue),t):void 0;return{description:e.description,type:t,defaultValue:n,deprecationReason:e.deprecationReason}}}function Yo(e,t,n){var r,i,o,a;const s=[],l=Object.create(null),c=[];let u;const d=[];for(const D of t.definitions)if(D.kind===ye.SCHEMA_DEFINITION)u=D;else if(D.kind===ye.SCHEMA_EXTENSION)d.push(D);else if(Wr(D))s.push(D);else if(Yr(D)){const e=D.name.value,t=l[e];l[e]=t?t.concat([D]):[D]}else D.kind===ye.DIRECTIVE_DEFINITION&&c.push(D);if(0===Object.keys(l).length&&0===s.length&&0===c.length&&0===d.length&&null==u)return e;const f=Object.create(null);for(const D of e.types)f[D.name]=g(D);for(const D of s){var p;const e=D.name.value;f[e]=null!==(p=Ko[e])&&void 0!==p?p:A(D)}const h={query:e.query&&v(e.query),mutation:e.mutation&&v(e.mutation),subscription:e.subscription&&v(e.subscription),...u&&E([u]),...E(d)};return{description:null===(r=u)||void 0===r||null===(i=r.description)||void 0===i?void 0:i.value,...h,types:Object.values(f),directives:[...e.directives.map((function(e){const t=e.toConfig();return new Wn({...t,args:ht(t.args,b)})})),...c.map((function(e){var t;return new Wn({name:e.name.value,description:null===(t=e.description)||void 0===t?void 0:t.value,locations:e.locations.map((({value:e})=>e)),isRepeatable:e.repeatable,args:C(e.arguments),astNode:e})}))],extensions:Object.create(null),astNode:null!==(o=u)&&void 0!==o?o:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(d),assumeValid:null!==(a=null==n?void 0:n.assumeValid)&&void 0!==a&&a};function m(e){return Kt(e)?new rn(m(e.ofType)):Qt(e)?new on(m(e.ofType)):v(e)}function v(e){return f[e.name]}function g(e){return yr(e)||Hn(e)?e:$t(e)?function(e){var t;const n=e.toConfig(),r=null!==(t=l[n.name])&&void 0!==t?t:[];let i=n.specifiedByURL;for(const a of r){var o;i=null!==(o=Xo(a))&&void 0!==o?o:i}return new hn({...n,specifiedByURL:i,extensionASTNodes:n.extensionASTNodes.concat(r)})}(e):Ut(e)?function(e){var t;const n=e.toConfig(),r=null!==(t=l[n.name])&&void 0!==t?t:[];return new mn({...n,interfaces:()=>[...e.getInterfaces().map(v),..._(r)],fields:()=>({...ht(n.fields,y),...T(r)}),extensionASTNodes:n.extensionASTNodes.concat(r)})}(e):qt(e)?function(e){var t;const n=e.toConfig(),r=null!==(t=l[n.name])&&void 0!==t?t:[];return new Tn({...n,interfaces:()=>[...e.getInterfaces().map(v),..._(r)],fields:()=>({...ht(n.fields,y),...T(r)}),extensionASTNodes:n.extensionASTNodes.concat(r)})}(e):Wt(e)?function(e){var t;const n=e.toConfig(),r=null!==(t=l[n.name])&&void 0!==t?t:[];return new Cn({...n,types:()=>[...e.getTypes().map(v),...N(r)],extensionASTNodes:n.extensionASTNodes.concat(r)})}(e):Gt(e)?function(e){var t;const n=e.toConfig(),r=null!==(t=l[e.name])&&void 0!==t?t:[];return new Sn({...n,values:{...n.values,...S(r)},extensionASTNodes:n.extensionASTNodes.concat(r)})}(e):Yt(e)?function(e){var t;const n=e.toConfig(),r=null!==(t=l[n.name])&&void 0!==t?t:[];return new An({...n,fields:()=>({...ht(n.fields,(e=>({...e,type:m(e.type)}))),...k(r)}),extensionASTNodes:n.extensionASTNodes.concat(r)})}(e):void ee(!1,"Unexpected type: "+Ze(e))}function y(e){return{...e,type:m(e.type),args:e.args&&ht(e.args,b)}}function b(e){return{...e,type:m(e.type)}}function E(e){const t={};for(const r of e){var n;const e=null!==(n=r.operationTypes)&&void 0!==n?n:[];for(const n of e)t[n.operation]=x(n.type)}return t}function x(e){var t;const n=e.name.value,r=null!==(t=Ko[n])&&void 0!==t?t:f[n];if(void 0===r)throw new Error(`Unknown type: "${n}".`);return r}function w(e){return e.kind===ye.LIST_TYPE?new rn(w(e.type)):e.kind===ye.NON_NULL_TYPE?new on(w(e.type)):x(e)}function T(e){const t=Object.create(null);for(const i of e){var n;const e=null!==(n=i.fields)&&void 0!==n?n:[];for(const n of e){var r;t[n.name.value]={type:w(n.type),description:null===(r=n.description)||void 0===r?void 0:r.value,args:C(n.arguments),deprecationReason:Qo(n),astNode:n}}}return t}function C(e){const t=null!=e?e:[],n=Object.create(null);for(const i of t){var r;const e=w(i.type);n[i.name.value]={type:e,description:null===(r=i.description)||void 0===r?void 0:r.value,defaultValue:Pi(i.defaultValue,e),deprecationReason:Qo(i),astNode:i}}return n}function k(e){const t=Object.create(null);for(const i of e){var n;const e=null!==(n=i.fields)&&void 0!==n?n:[];for(const n of e){var r;const e=w(n.type);t[n.name.value]={type:e,description:null===(r=n.description)||void 0===r?void 0:r.value,defaultValue:Pi(n.defaultValue,e),deprecationReason:Qo(n),astNode:n}}}return t}function S(e){const t=Object.create(null);for(const i of e){var n;const e=null!==(n=i.values)&&void 0!==n?n:[];for(const n of e){var r;t[n.name.value]={description:null===(r=n.description)||void 0===r?void 0:r.value,deprecationReason:Qo(n),astNode:n}}}return t}function _(e){return e.flatMap((e=>{var t,n;return null!==(t=null===(n=e.interfaces)||void 0===n?void 0:n.map(x))&&void 0!==t?t:[]}))}function N(e){return e.flatMap((e=>{var t,n;return null!==(t=null===(n=e.types)||void 0===n?void 0:n.map(x))&&void 0!==t?t:[]}))}function A(e){var t;const n=e.name.value,r=null!==(t=l[n])&&void 0!==t?t:[];switch(e.kind){case ye.OBJECT_TYPE_DEFINITION:{var i;const t=[e,...r];return new mn({name:n,description:null===(i=e.description)||void 0===i?void 0:i.value,interfaces:()=>_(t),fields:()=>T(t),astNode:e,extensionASTNodes:r})}case ye.INTERFACE_TYPE_DEFINITION:{var o;const t=[e,...r];return new Tn({name:n,description:null===(o=e.description)||void 0===o?void 0:o.value,interfaces:()=>_(t),fields:()=>T(t),astNode:e,extensionASTNodes:r})}case ye.ENUM_TYPE_DEFINITION:{var a;const t=[e,...r];return new Sn({name:n,description:null===(a=e.description)||void 0===a?void 0:a.value,values:S(t),astNode:e,extensionASTNodes:r})}case ye.UNION_TYPE_DEFINITION:{var s;const t=[e,...r];return new Cn({name:n,description:null===(s=e.description)||void 0===s?void 0:s.value,types:()=>N(t),astNode:e,extensionASTNodes:r})}case ye.SCALAR_TYPE_DEFINITION:var c;return new hn({name:n,description:null===(c=e.description)||void 0===c?void 0:c.value,specifiedByURL:Xo(e),astNode:e,extensionASTNodes:r});case ye.INPUT_OBJECT_TYPE_DEFINITION:{var u;const t=[e,...r];return new An({name:n,description:null===(u=e.description)||void 0===u?void 0:u.value,fields:()=>k(t),astNode:e,extensionASTNodes:r,isOneOf:(d=e,Boolean($i(Jn,d)))})}}var d}}const Ko=ft([...Un,...gr],(e=>e.name));function Qo(e){const t=$i(Qn,e);return null==t?void 0:t.reason}function Xo(e){const t=$i(Xn,e);return null==t?void 0:t.url}function Jo(e,t){null!=e&&e.kind===ye.DOCUMENT||X(!1,"Must provide valid Document AST."),!0!==(null==t?void 0:t.assumeValid)&&!0!==(null==t?void 0:t.assumeValidSDL)&&function(e){const t=xo(e);if(0!==t.length)throw new Error(t.map((e=>e.message)).join("\n\n"))}(e);const n=Yo({description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},e,t);if(null==n.astNode)for(const i of n.types)switch(i.name){case"Query":n.query=i;break;case"Mutation":n.mutation=i;break;case"Subscription":n.subscription=i}const r=[...n.directives,...Zn.filter((e=>n.directives.every((t=>t.name!==e.name))))];return new xr({...n,directives:r})}function Zo(e,t){const n=Object.create(null);for(const r of Object.keys(e).sort(mt))n[r]=t(e[r]);return n}function ea(e){return ta(e,(e=>e.name))}function ta(e,t){return e.slice().sort(((e,n)=>mt(t(e),t(n))))}function na(e){return!Hn(e)&&!yr(e)}function ra(e,t,n){const r=e.getDirectives().filter(t),i=Object.values(e.getTypeMap()).filter(n);return[ia(e),...r.map((e=>function(e){return fa(e)+"directive @"+e.name+ca(e.args)+(e.isRepeatable?" repeatable":"")+" on "+e.locations.join(" | ")}(e))),...i.map((e=>oa(e)))].filter(Boolean).join("\n\n")}function ia(e){if(null==e.description&&function(e){const t=e.getQueryType();if(t&&"Query"!==t.name)return!1;const n=e.getMutationType();if(n&&"Mutation"!==n.name)return!1;const r=e.getSubscriptionType();if(r&&"Subscription"!==r.name)return!1;return!0}(e))return;const t=[],n=e.getQueryType();n&&t.push(` query: ${n.name}`);const r=e.getMutationType();r&&t.push(` mutation: ${r.name}`);const i=e.getSubscriptionType();return i&&t.push(` subscription: ${i.name}`),fa(e)+`schema {\n${t.join("\n")}\n}`}function oa(e){return $t(e)?function(e){return fa(e)+`scalar ${e.name}`+function(e){if(null==e.specifiedByURL)return"";return` @specifiedBy(url: ${Dt({kind:ye.STRING,value:e.specifiedByURL})})`}(e)}(e):Ut(e)?function(e){return fa(e)+`type ${e.name}`+aa(e)+sa(e)}(e):qt(e)?function(e){return fa(e)+`interface ${e.name}`+aa(e)+sa(e)}(e):Wt(e)?function(e){const t=e.getTypes(),n=t.length?" = "+t.join(" | "):"";return fa(e)+"union "+e.name+n}(e):Gt(e)?function(e){const t=e.getValues().map(((e,t)=>fa(e," ",!t)+" "+e.name+da(e.deprecationReason)));return fa(e)+`enum ${e.name}`+la(t)}(e):Yt(e)?function(e){const t=Object.values(e.getFields()).map(((e,t)=>fa(e," ",!t)+" "+ua(e)));return fa(e)+`input ${e.name}`+(e.isOneOf?" @oneOf":"")+la(t)}(e):void ee(!1,"Unexpected type: "+Ze(e))}function aa(e){const t=e.getInterfaces();return t.length?" implements "+t.map((e=>e.name)).join(" & "):""}function sa(e){return la(Object.values(e.getFields()).map(((e,t)=>fa(e," ",!t)+" "+e.name+ca(e.args," ")+": "+String(e.type)+da(e.deprecationReason))))}function la(e){return 0!==e.length?" {\n"+e.join("\n")+"\n}":""}function ca(e,t=""){return 0===e.length?"":e.every((e=>!e.description))?"("+e.map(ua).join(", ")+")":"(\n"+e.map(((e,n)=>fa(e," "+t,!n)+" "+t+ua(e))).join("\n")+"\n"+t+")"}function ua(e){const t=nr(e.defaultValue,e.type);let n=e.name+": "+String(e.type);return t&&(n+=` = ${Dt(t)}`),n+da(e.deprecationReason)}function da(e){if(null==e)return"";if(e!==Kn){return` @deprecated(reason: ${Dt({kind:ye.STRING,value:e})})`}return" @deprecated"}function fa(e,t="",n=!0){const{description:r}=e;if(null==r)return"";return(t&&!n?"\n"+t:t)+Dt({kind:ye.STRING,value:r,block:Ae(r)}).replace(/\n/g,"\n"+t)+"\n"}function pa(e,t,n){if(!e.has(n)){e.add(n);const r=t[n];if(void 0!==r)for(const n of r)pa(e,t,n)}}function ha(e){const t=[];return _t(e,{FragmentSpread(e){t.push(e.name.value)}}),t}function ma(e){if("string"==typeof e||X(!1,"Expected name to be a string."),e.startsWith("__"))return new ae(`Name "${e}" must not begin with "__", which is reserved by GraphQL introspection.`);try{jt(e)}catch(t){return t}}var va,ga,ya,ba;function Ea(e,t){return[...wa(e,t),...xa(e,t)]}function xa(e,t){const n=[],r=La(e.getDirectives(),t.getDirectives());for(const i of r.removed)n.push({type:va.DIRECTIVE_REMOVED,description:`${i.name} was removed.`});for(const[i,o]of r.persisted){const e=La(i.args,o.args);for(const t of e.added)wn(t)&&n.push({type:va.REQUIRED_DIRECTIVE_ARG_ADDED,description:`A required arg ${t.name} on directive ${i.name} was added.`});for(const t of e.removed)n.push({type:va.DIRECTIVE_ARG_REMOVED,description:`${t.name} was removed from ${i.name}.`});i.isRepeatable&&!o.isRepeatable&&n.push({type:va.DIRECTIVE_REPEATABLE_REMOVED,description:`Repeatable flag was removed from ${i.name}.`});for(const t of i.locations)o.locations.includes(t)||n.push({type:va.DIRECTIVE_LOCATION_REMOVED,description:`${t} was removed from ${i.name}.`})}return n}function wa(e,t){const n=[],r=La(Object.values(e.getTypeMap()),Object.values(t.getTypeMap()));for(const i of r.removed)n.push({type:va.TYPE_REMOVED,description:Hn(i)?`Standard scalar ${i.name} was removed because it is not referenced anymore.`:`${i.name} was removed.`});for(const[i,o]of r.persisted)Gt(i)&&Gt(o)?n.push(...ka(i,o)):Wt(i)&&Wt(o)?n.push(...Ca(i,o)):Yt(i)&&Yt(o)?n.push(...Ta(i,o)):Ut(i)&&Ut(o)||qt(i)&&qt(o)?n.push(..._a(i,o),...Sa(i,o)):i.constructor!==o.constructor&&n.push({type:va.TYPE_CHANGED_KIND,description:`${i.name} changed from ${Ia(i)} to ${Ia(o)}.`});return n}function Ta(e,t){const n=[],r=La(Object.values(e.getFields()),Object.values(t.getFields()));for(const i of r.added)In(i)?n.push({type:va.REQUIRED_INPUT_FIELD_ADDED,description:`A required field ${i.name} on input type ${e.name} was added.`}):n.push({type:ya.OPTIONAL_INPUT_FIELD_ADDED,description:`An optional field ${i.name} on input type ${e.name} was added.`});for(const i of r.removed)n.push({type:va.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(const[i,o]of r.persisted){Da(i.type,o.type)||n.push({type:va.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(o.type)}.`})}return n}function Ca(e,t){const n=[],r=La(e.getTypes(),t.getTypes());for(const i of r.added)n.push({type:ya.TYPE_ADDED_TO_UNION,description:`${i.name} was added to union type ${e.name}.`});for(const i of r.removed)n.push({type:va.TYPE_REMOVED_FROM_UNION,description:`${i.name} was removed from union type ${e.name}.`});return n}function ka(e,t){const n=[],r=La(e.getValues(),t.getValues());for(const i of r.added)n.push({type:ya.VALUE_ADDED_TO_ENUM,description:`${i.name} was added to enum type ${e.name}.`});for(const i of r.removed)n.push({type:va.VALUE_REMOVED_FROM_ENUM,description:`${i.name} was removed from enum type ${e.name}.`});return n}function Sa(e,t){const n=[],r=La(e.getInterfaces(),t.getInterfaces());for(const i of r.added)n.push({type:ya.IMPLEMENTED_INTERFACE_ADDED,description:`${i.name} added to interfaces implemented by ${e.name}.`});for(const i of r.removed)n.push({type:va.IMPLEMENTED_INTERFACE_REMOVED,description:`${e.name} no longer implements interface ${i.name}.`});return n}function _a(e,t){const n=[],r=La(Object.values(e.getFields()),Object.values(t.getFields()));for(const i of r.removed)n.push({type:va.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(const[i,o]of r.persisted){n.push(...Na(e,i,o));Aa(i.type,o.type)||n.push({type:va.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(o.type)}.`})}return n}function Na(e,t,n){const r=[],i=La(t.args,n.args);for(const o of i.removed)r.push({type:va.ARG_REMOVED,description:`${e.name}.${t.name} arg ${o.name} was removed.`});for(const[o,a]of i.persisted){if(Da(o.type,a.type)){if(void 0!==o.defaultValue)if(void 0===a.defaultValue)r.push({type:ya.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${o.name} defaultValue was removed.`});else{const n=Oa(o.defaultValue,o.type),i=Oa(a.defaultValue,a.type);n!==i&&r.push({type:ya.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${o.name} has changed defaultValue from ${n} to ${i}.`})}}else r.push({type:va.ARG_CHANGED_KIND,description:`${e.name}.${t.name} arg ${o.name} has changed type from ${String(o.type)} to ${String(a.type)}.`})}for(const o of i.added)wn(o)?r.push({type:va.REQUIRED_ARG_ADDED,description:`A required arg ${o.name} on ${e.name}.${t.name} was added.`}):r.push({type:ya.OPTIONAL_ARG_ADDED,description:`An optional arg ${o.name} on ${e.name}.${t.name} was added.`});return r}function Aa(e,t){return Kt(e)?Kt(t)&&Aa(e.ofType,t.ofType)||Qt(t)&&Aa(e,t.ofType):Qt(e)?Qt(t)&&Aa(e.ofType,t.ofType):un(t)&&e.name===t.name||Qt(t)&&Aa(e,t.ofType)}function Da(e,t){return Kt(e)?Kt(t)&&Da(e.ofType,t.ofType):Qt(e)?Qt(t)&&Da(e.ofType,t.ofType)||!Qt(t)&&Da(e.ofType,t):un(t)&&e.name===t.name}function Ia(e){return $t(e)?"a Scalar type":Ut(e)?"an Object type":qt(e)?"an Interface type":Wt(e)?"a Union type":Gt(e)?"an Enum type":Yt(e)?"an Input type":void ee(!1,"Unexpected type: "+Ze(e))}function Oa(e,t){const n=nr(e,t);return null!=n||ee(!1),Dt(di(n))}function La(e,t){const n=[],r=[],i=[],o=ft(e,(({name:e})=>e)),a=ft(t,(({name:e})=>e));for(const s of e){const e=a[s.name];void 0===e?r.push(s):i.push([s,e])}for(const s of t)void 0===o[s.name]&&n.push(s);return{added:n,persisted:i,removed:r}}(ga=va||(va={})).TYPE_REMOVED="TYPE_REMOVED",ga.TYPE_CHANGED_KIND="TYPE_CHANGED_KIND",ga.TYPE_REMOVED_FROM_UNION="TYPE_REMOVED_FROM_UNION",ga.VALUE_REMOVED_FROM_ENUM="VALUE_REMOVED_FROM_ENUM",ga.REQUIRED_INPUT_FIELD_ADDED="REQUIRED_INPUT_FIELD_ADDED",ga.IMPLEMENTED_INTERFACE_REMOVED="IMPLEMENTED_INTERFACE_REMOVED",ga.FIELD_REMOVED="FIELD_REMOVED",ga.FIELD_CHANGED_KIND="FIELD_CHANGED_KIND",ga.REQUIRED_ARG_ADDED="REQUIRED_ARG_ADDED",ga.ARG_REMOVED="ARG_REMOVED",ga.ARG_CHANGED_KIND="ARG_CHANGED_KIND",ga.DIRECTIVE_REMOVED="DIRECTIVE_REMOVED",ga.DIRECTIVE_ARG_REMOVED="DIRECTIVE_ARG_REMOVED",ga.REQUIRED_DIRECTIVE_ARG_ADDED="REQUIRED_DIRECTIVE_ARG_ADDED",ga.DIRECTIVE_REPEATABLE_REMOVED="DIRECTIVE_REPEATABLE_REMOVED",ga.DIRECTIVE_LOCATION_REMOVED="DIRECTIVE_LOCATION_REMOVED",(ba=ya||(ya={})).VALUE_ADDED_TO_ENUM="VALUE_ADDED_TO_ENUM",ba.TYPE_ADDED_TO_UNION="TYPE_ADDED_TO_UNION",ba.OPTIONAL_INPUT_FIELD_ADDED="OPTIONAL_INPUT_FIELD_ADDED",ba.OPTIONAL_ARG_ADDED="OPTIONAL_ARG_ADDED",ba.IMPLEMENTED_INTERFACE_ADDED="IMPLEMENTED_INTERFACE_ADDED",ba.ARG_DEFAULT_VALUE_CHANGE="ARG_DEFAULT_VALUE_CHANGE";const Fa=Object.freeze(Object.defineProperty({__proto__:null,BREAK:St,get BreakingChangeType(){return va},DEFAULT_DEPRECATION_REASON:Kn,get DangerousChangeType(){return ya},get DirectiveLocation(){return ve},ExecutableDefinitionsRule:Kr,FieldsOnCorrectTypeRule:Qr,FragmentsOnCompositeTypesRule:Xr,GRAPHQL_MAX_INT:Rn,GRAPHQL_MIN_INT:Mn,GraphQLBoolean:Bn,GraphQLDeprecatedDirective:Qn,GraphQLDirective:Wn,GraphQLEnumType:Sn,GraphQLError:ae,GraphQLFloat:jn,GraphQLID:$n,GraphQLIncludeDirective:Gn,GraphQLInputObjectType:An,GraphQLInt:Pn,GraphQLInterfaceType:Tn,GraphQLList:rn,GraphQLNonNull:on,GraphQLObjectType:mn,GraphQLOneOfDirective:Jn,GraphQLScalarType:hn,GraphQLSchema:xr,GraphQLSkipDirective:Yn,GraphQLSpecifiedByDirective:Xn,GraphQLString:Vn,GraphQLUnionType:Cn,get Kind(){return ye},KnownArgumentNamesRule:Jr,KnownDirectivesRule:ei,KnownFragmentNamesRule:ti,KnownTypeNamesRule:ni,Lexer:Ie,Location:ce,LoneAnonymousOperationRule:ii,LoneSchemaDefinitionRule:oi,MaxIntrospectionDepthRule:ai,NoDeprecatedCustomRule:zo,NoFragmentCyclesRule:si,NoSchemaIntrospectionCustomRule:function(e){return{Field(t){const n=dn(e.getType());n&&yr(n)&&e.reportError(new ae(`GraphQL introspection has been disabled, but the requested query contained the field "${t.name.value}".`,{nodes:t}))}}},NoUndefinedVariablesRule:li,NoUnusedFragmentsRule:ci,NoUnusedVariablesRule:ui,get OperationTypeNode(){return he},OverlappingFieldsCanBeMergedRule:pi,PossibleFragmentSpreadsRule:Ci,PossibleTypeExtensionsRule:ki,ProvidedRequiredArgumentsRule:_i,ScalarLeafsRule:Di,SchemaMetaFieldDef:hr,SingleFieldSubscriptionsRule:Gi,Source:nt,Token:ue,get TokenKind(){return Ee},TypeInfo:Br,get TypeKind(){return dr},TypeMetaFieldDef:mr,TypeNameMetaFieldDef:vr,UniqueArgumentDefinitionNamesRule:Ki,UniqueArgumentNamesRule:Qi,UniqueDirectiveNamesRule:Xi,UniqueDirectivesPerLocationRule:Ji,UniqueEnumValueNamesRule:Zi,UniqueFieldDefinitionNamesRule:eo,UniqueFragmentNamesRule:no,UniqueInputFieldNamesRule:ro,UniqueOperationNamesRule:io,UniqueOperationTypesRule:oo,UniqueTypeNamesRule:ao,UniqueVariableNamesRule:so,ValidationContext:bo,ValuesOfCorrectTypeRule:lo,VariablesAreInputTypesRule:uo,VariablesInAllowedPositionRule:fo,__Directive:or,__DirectiveLocation:ar,__EnumValue:ur,__Field:lr,__InputValue:cr,__Schema:ir,__Type:sr,__TypeKind:pr,assertAbstractType:nn,assertCompositeType:function(e){if(!en(e))throw new Error(`Expected ${Ze(e)} to be a GraphQL composite type.`);return e},assertDirective:function(e){if(!zn(e))throw new Error(`Expected ${Ze(e)} to be a GraphQL directive.`);return e},assertEnumType:function(e){if(!Gt(e))throw new Error(`Expected ${Ze(e)} to be a GraphQL Enum type.`);return e},assertEnumValueName:Vt,assertInputObjectType:function(e){if(!Yt(e))throw new Error(`Expected ${Ze(e)} to be a GraphQL Input Object type.`);return e},assertInputType:function(e){if(!Xt(e))throw new Error(`Expected ${Ze(e)} to be a GraphQL input type.`);return e},assertInterfaceType:zt,assertLeafType:function(e){if(!Zt(e))throw new Error(`Expected ${Ze(e)} to be a GraphQL leaf type.`);return e},assertListType:function(e){if(!Kt(e))throw new Error(`Expected ${Ze(e)} to be a GraphQL List type.`);return e},assertName:jt,assertNamedType:function(e){if(!un(e))throw new Error(`Expected ${Ze(e)} to be a GraphQL named type.`);return e},assertNonNullType:function(e){if(!Qt(e))throw new Error(`Expected ${Ze(e)} to be a GraphQL Non-Null type.`);return e},assertNullableType:ln,assertObjectType:Ht,assertOutputType:function(e){if(!Jt(e))throw new Error(`Expected ${Ze(e)} to be a GraphQL output type.`);return e},assertScalarType:function(e){if(!$t(e))throw new Error(`Expected ${Ze(e)} to be a GraphQL Scalar type.`);return e},assertSchema:Er,assertType:function(e){if(!Bt(e))throw new Error(`Expected ${Ze(e)} to be a GraphQL type.`);return e},assertUnionType:function(e){if(!Wt(e))throw new Error(`Expected ${Ze(e)} to be a GraphQL Union type.`);return e},assertValidName:function(e){const t=ma(e);if(t)throw t;return e},assertValidSchema:Cr,assertWrappingType:function(e){if(!an(e))throw new Error(`Expected ${Ze(e)} to be a GraphQL wrapping type.`);return e},astFromValue:nr,buildASTSchema:Jo,buildClientSchema:Go,buildSchema:function(e,t){return Jo(it(e,{noLocation:null==t?void 0:t.noLocation,allowLegacyFragmentVariables:null==t?void 0:t.allowLegacyFragmentVariables}),{assumeValidSDL:null==t?void 0:t.assumeValidSDL,assumeValid:null==t?void 0:t.assumeValid})},coerceInputValue:Fi,concatAST:function(e){const t=[];for(const n of e)t.push(...n.definitions);return{kind:ye.DOCUMENT,definitions:t}},createSourceEventStream:qo,defaultFieldResolver:Bo,defaultTypeResolver:Vo,doTypesOverlap:Fn,execute:So,executeSync:_o,extendSchema:function(e,t,n){Er(e),null!=t&&t.kind===ye.DOCUMENT||X(!1,"Must provide valid Document AST."),!0!==(null==n?void 0:n.assumeValid)&&!0!==(null==n?void 0:n.assumeValidSDL)&&function(e,t){const n=xo(e,t);if(0!==n.length)throw new Error(n.map((e=>e.message)).join("\n\n"))}(t,e);const r=e.toConfig(),i=Yo(r,t,n);return r===i?e:new xr(i)},findBreakingChanges:function(e,t){return Ea(e,t).filter((e=>e.type in va))},findDangerousChanges:function(e,t){return Ea(e,t).filter((e=>e.type in ya))},formatError:function(e){return e.toJSON()},getArgumentValues:Bi,getDirectiveValues:$i,getEnterLeaveForKind:At,getIntrospectionQuery:Wo,getLocation:ne,getNamedType:dn,getNullableType:cn,getOperationAST:function(e,t){let n=null;for(const i of e.definitions){var r;if(i.kind===ye.OPERATION_DEFINITION)if(null==t){if(n)return null;n=i}else if((null===(r=i.name)||void 0===r?void 0:r.value)===t)return i}return n},getOperationRootType:function(e,t){if("query"===t.operation){const n=e.getQueryType();if(!n)throw new ae("Schema does not define the required query root type.",{nodes:t});return n}if("mutation"===t.operation){const n=e.getMutationType();if(!n)throw new ae("Schema is not configured for mutations.",{nodes:t});return n}if("subscription"===t.operation){const n=e.getSubscriptionType();if(!n)throw new ae("Schema is not configured for subscriptions.",{nodes:t});return n}throw new ae("Can only have query, mutation and subscription operations.",{nodes:t})},getVariableValues:Vi,getVisitFn:function(e,t,n){const{enter:r,leave:i}=At(e,t);return n?i:r},graphql:function(e){return new Promise((t=>t(Uo(e))))},graphqlSync:function(e){const t=Uo(e);if(J(t))throw new Error("GraphQL execution failed to complete synchronously.");return t},introspectionFromSchema:function(e,t){const n=_o({schema:e,document:it(Wo({specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,oneOf:!0,...t}))});return!n.errors&&n.data||ee(!1),n.data},introspectionTypes:gr,isAbstractType:tn,isCompositeType:en,isConstValueNode:function e(t){return qr(t)&&(t.kind===ye.LIST?t.values.some(e):t.kind===ye.OBJECT?t.fields.some((t=>e(t.value))):t.kind!==ye.VARIABLE)},isDefinitionNode:function(e){return Hr(e)||zr(e)||Gr(e)},isDirective:zn,isEnumType:Gt,isEqualType:On,isExecutableDefinitionNode:Hr,isInputObjectType:Yt,isInputType:Xt,isInterfaceType:qt,isIntrospectionType:yr,isLeafType:Zt,isListType:Kt,isNamedType:un,isNonNullType:Qt,isNullableType:sn,isObjectType:Ut,isOutputType:Jt,isRequiredArgument:wn,isRequiredInputField:In,isScalarType:$t,isSchema:br,isSelectionNode:function(e){return e.kind===ye.FIELD||e.kind===ye.FRAGMENT_SPREAD||e.kind===ye.INLINE_FRAGMENT},isSpecifiedDirective:er,isSpecifiedScalarType:Hn,isType:Bt,isTypeDefinitionNode:Wr,isTypeExtensionNode:Yr,isTypeNode:function(e){return e.kind===ye.NAMED_TYPE||e.kind===ye.LIST_TYPE||e.kind===ye.NON_NULL_TYPE},isTypeSubTypeOf:Ln,isTypeSystemDefinitionNode:zr,isTypeSystemExtensionNode:Gr,isUnionType:Wt,isValidNameError:ma,isValueNode:qr,isWrappingType:an,lexicographicSortSchema:function(e){const t=e.toConfig(),n=pt(ea(t.types),(e=>e.name),(function(e){if($t(e)||yr(e))return e;if(Ut(e)){const t=e.toConfig();return new mn({...t,interfaces:()=>l(t.interfaces),fields:()=>s(t.fields)})}if(qt(e)){const t=e.toConfig();return new Tn({...t,interfaces:()=>l(t.interfaces),fields:()=>s(t.fields)})}if(Wt(e)){const t=e.toConfig();return new Cn({...t,types:()=>l(t.types)})}if(Gt(e)){const t=e.toConfig();return new Sn({...t,values:Zo(t.values,(e=>e))})}if(Yt(e)){const t=e.toConfig();return new An({...t,fields:()=>Zo(t.fields,(e=>({...e,type:r(e.type)})))})}ee(!1,"Unexpected type: "+Ze(e))}));return new xr({...t,types:Object.values(n),directives:ea(t.directives).map((function(e){const t=e.toConfig();return new Wn({...t,locations:ta(t.locations,(e=>e)),args:a(t.args)})})),query:o(t.query),mutation:o(t.mutation),subscription:o(t.subscription)});function r(e){return Kt(e)?new rn(r(e.ofType)):Qt(e)?new on(r(e.ofType)):i(e)}function i(e){return n[e.name]}function o(e){return e&&i(e)}function a(e){return Zo(e,(e=>({...e,type:r(e.type)})))}function s(e){return Zo(e,(e=>({...e,type:r(e.type),args:e.args&&a(e.args)})))}function l(e){return ea(e).map(i)}},locatedError:Co,parse:it,parseConstValue:function(e,t){const n=new at(e,t);n.expectToken(Ee.SOF);const r=n.parseConstValueLiteral();return n.expectToken(Ee.EOF),r},parseType:function(e,t){const n=new at(e,t);n.expectToken(Ee.SOF);const r=n.parseTypeReference();return n.expectToken(Ee.EOF),r},parseValue:ot,print:Dt,printError:function(e){return e.toString()},printIntrospectionSchema:function(e){return ra(e,er,yr)},printLocation:re,printSchema:function(e){return ra(e,(e=>!er(e)),na)},printSourceLocation:ie,printType:oa,recommendedRules:ho,resolveObjMapThunk:pn,resolveReadonlyArrayThunk:fn,responsePathAsArray:Li,separateOperations:function(e){const t=[],n=Object.create(null);for(const i of e.definitions)switch(i.kind){case ye.OPERATION_DEFINITION:t.push(i);break;case ye.FRAGMENT_DEFINITION:n[i.name.value]=ha(i.selectionSet)}const r=Object.create(null);for(const i of t){const t=new Set;for(const e of ha(i.selectionSet))pa(t,n,e);r[i.name?i.name.value:""]={kind:ye.DOCUMENT,definitions:e.definitions.filter((e=>e===i||e.kind===ye.FRAGMENT_DEFINITION&&t.has(e.name.value)))}}return r},specifiedDirectives:Zn,specifiedRules:mo,specifiedScalarTypes:Un,stripIgnoredCharacters:function(e){const t=rt(e)?e:new nt(e),n=t.body,r=new Ie(t);let i="",o=!1;for(;r.advance().kind!==Ee.EOF;){const e=r.token,t=e.kind,a=!Oe(e.kind);o&&(a||e.kind===Ee.SPREAD)&&(i+=" ");const s=n.slice(e.start,e.end);t===Ee.BLOCK_STRING?i+=De(e.value,{minimize:!0}):i+=s,o=a}return i},subscribe:async function(e){arguments.length<2||X(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const t=await qo(e);return Ho(t)?function(e,t){const n=e[Symbol.asyncIterator]();async function r(e){if(e.done)return e;try{return{value:await t(e.value),done:!1}}catch(r){if("function"==typeof n.return)try{await n.return()}catch(i){}throw r}}return{next:async()=>r(await n.next()),return:async()=>"function"==typeof n.return?r(await n.return()):{value:void 0,done:!0},async throw(e){if("function"==typeof n.throw)return r(await n.throw(e));throw e},[Symbol.asyncIterator](){return this}}}(t,(t=>So({...e,rootValue:t}))):t},syntaxError:le,typeFromAST:Vr,validate:Eo,validateSchema:Tr,valueFromAST:Pi,valueFromASTUntyped:Pt,version:"16.9.0",versionInfo:Q,visit:_t,visitInParallel:Nt,visitWithTypeInfo:Ur},Symbol.toStringTag,{value:"Module"}));var Ra=Object.defineProperty,Ma=Object.defineProperties,Pa=Object.getOwnPropertyDescriptors,ja=Object.getOwnPropertySymbols,Va=Object.prototype.hasOwnProperty,Ba=Object.prototype.propertyIsEnumerable,$a=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Ua=(e,t,n)=>t in e?Ra(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ha=(e,t)=>{for(var n in t||(t={}))Va.call(t,n)&&Ua(e,n,t[n]);if(ja)for(var n of ja(t))Ba.call(t,n)&&Ua(e,n,t[n]);return e},qa=(e,t)=>Ma(e,Pa(t)),za=function(e,t){this[0]=e,this[1]=t};function Wa(e){return"object"==typeof e&&null!==e&&"function"==typeof e.then}function Ga(e){return"object"==typeof e&&null!==e&&"subscribe"in e&&"function"==typeof e.subscribe}function Ya(e){return"object"==typeof e&&null!==e&&("AsyncGenerator"===e[Symbol.toStringTag]||Symbol.asyncIterator in e)}async function Ka(e){const t=await e;return Ya(t)?async function(e){var t;const n=null==(t=("return"in e?e:e[Symbol.asyncIterator]()).return)?void 0:t.bind(e),r=await("next"in e?e:e[Symbol.asyncIterator]()).next.bind(e)();return null==n||n(),r.value}(t):Ga(t)?(n=t,new Promise(((e,t)=>{const r=n.subscribe({next(t){e(t),r.unsubscribe()},error:t,complete(){t(new Error("no value resolved"))}})}))):t;var n}var Qa=new TextDecoder;function Xa(){const e={};return e.promise=new Promise(((t,n)=>{e.resolve=t,e.reject=n})),e}const Ja=Symbol(),Za=Symbol();const es=e=>{const{pushValue:t,asyncIterableIterator:n}=function(){let e=!0;const t=[];let n=Xa();const r=Xa(),i=async function*(){for(;;)if(t.length>0)yield t.shift();else{const e=await Promise.race([n.promise,r.promise]);if(e===Ja)break;if(e!==Za)throw e}}(),o=i.return.bind(i);i.return=(...t)=>(e=!1,r.resolve(Ja),o(...t));const a=i.throw.bind(i);return i.throw=t=>(e=!1,r.resolve(t),a(t)),{pushValue:function(r){!1!==e&&(t.push(r),n.resolve(Za),n=Xa())},asyncIterableIterator:i}}(),r=e({next:e=>{t(e)},complete:()=>{n.return()},error:e=>{n.throw(e)}}),i=n.return;let o;return n.return=()=>(void 0===o&&(r(),o=i()),o),n};const ts=e=>"object"==typeof e&&null!==e&&"code"in e;const ns=e=>t=>es((n=>e.subscribe(t,qa(Ha({},n),{error(e){e instanceof CloseEvent?n.error(new Error(`Socket closed with event ${e.code} ${e.reason||""}`.trim())):n.error(e)}})))),rs=e=>t=>{const n=e.request(t);return es((e=>n.subscribe(e).unsubscribe))},is=(e,t)=>function(n,r){return i=this,o=null,a=function*(){const i=yield new za(t(e.url,{method:"POST",body:JSON.stringify(n),headers:Ha(Ha({"content-type":"application/json",accept:"application/json, multipart/mixed"},e.headers),null==r?void 0:r.headers)}).then((e=>async function(e,t){if(!e.ok||!e.body||e.bodyUsed)return e;let n=e.headers.get("content-type");if(!n||!~n.indexOf("multipart/"))return e;let r=n.indexOf("boundary="),i="-";if(~r){let e=r+9,t=n.indexOf(";",e);i=n.slice(e,t>-1?t:void 0).trim().replace(/"/g,"")}return async function*(e,t,n){let r,i,o,a=e.getReader(),s=!n||!1,l=t.length,c="",u=[];try{let e;e:for(;!(e=await a.read()).done;){let n=Qa.decode(e.value);r=c.length,c+=n;let a=n.indexOf(t);for(~a?r+=a:r=c.indexOf(t),u=[];~r;){let e=c.slice(0,r),n=c.slice(r+l);if(i){let t=e.indexOf("\r\n\r\n")+4,r=e.lastIndexOf("\r\n",t),i=!1,a=e.slice(t,r>-1?void 0:r),l=String(e.slice(0,t)).trim().split("\r\n"),c={},f=l.length;for(;o=l[--f];o=o.split(": "),c[o.shift().toLowerCase()]=o.join(": "));if(o=c["content-type"],o&&~o.indexOf("application/json"))try{a=JSON.parse(a),i=!0}catch(d){}if(o={headers:c,body:a,json:i},s?yield o:u.push(o),"--"===n.slice(0,2))break e}else t="\r\n"+t,i=l+=2;c=n,r=c.indexOf(t)}u.length&&(yield u)}}finally{u.length&&(yield u),await a.cancel()}}(e.body,`--${i}`,t)}(e,{}))));if("object"!=typeof(o=i)||null===o||!("AsyncGenerator"===o[Symbol.toStringTag]||Symbol.asyncIterator&&Symbol.asyncIterator in o))return yield i.json();var o;try{for(var a,s,l,c=((e,t,n)=>(t=e[$a("asyncIterator")])?t.call(e):(e=e[$a("iterator")](),t={},(n=(n,r)=>(r=e[n])&&(t[n]=t=>new Promise(((n,i,o)=>(t=r.call(e,t),o=t.done,Promise.resolve(t.value).then((e=>n({value:e,done:o})),i))))))("next"),n("return"),t))(i);a=!(s=yield new za(c.next())).done;a=!1){const e=s.value;if(e.some((e=>!e.json))){const t=e.map((e=>`Headers::\n${e.headers}\n\nBody::\n${e.body}`));throw new Error(`Expected multipart chunks to be of json type. got:\n${t}`)}yield e.map((e=>e.body))}}catch(u){l=[u]}finally{try{a&&(s=c.return)&&(yield new za(s.call(c)))}finally{if(l)throw l[0]}}},s=(e,t,n,r)=>{try{var i=a[e](t),o=(t=i.value)instanceof za,l=i.done;Promise.resolve(o?t[0]:t).then((i=>o?s("return"===e?e:"next",t[1]?{done:i.done,value:i.value}:i,n,r):n({value:i,done:l}))).catch((e=>s("throw",e,n,r)))}catch(aN){r(aN)}},l=e=>c[e]=t=>new Promise(((n,r)=>s(e,t,n,r))),c={},a=a.apply(i,o),c[$a("asyncIterator")]=()=>c,l("next"),l("throw"),l("return"),c;var i,o,a,s,l,c};async function os(e,t){if(e.wsClient)return ns(e.wsClient);if(e.subscriptionUrl)return async function(e,t){let n;try{const{createClient:r}=await Promise.resolve().then((()=>xL));return n=r({url:e,connectionParams:t}),ns(n)}catch(r){if(ts(r)&&"MODULE_NOT_FOUND"===r.code)throw new Error("You need to install the 'graphql-ws' package to use websockets when passing a 'subscriptionUrl'");console.error(`Error creating websocket client for ${e}`,r)}}(e.subscriptionUrl,Ha(Ha({},e.wsConnectionParams),null==t?void 0:t.headers));const n=e.legacyClient||e.legacyWsClient;return n?rs(n):void 0}function as(e){return JSON.stringify(e,null,2)}function ss(e){return e instanceof Error?function(e){return qa(Ha({},e),{message:e.message,stack:e.stack})}(e):e}function ls(e){return Array.isArray(e)?as({errors:e.map((e=>ss(e)))}):as({errors:[ss(e)]})}function cs(e){return as(e)}function us(e,t,n){const r=[];if(!e||!t)return{insertions:r,result:t};let i;try{i=it(t)}catch(aN){return{insertions:r,result:t}}const o=n||ds,a=new Br(e);return _t(i,{leave(e){a.leave(e)},enter(e){if(a.enter(e),"Field"===e.kind&&!e.selectionSet){const n=fs(function(e){if(e)return e}(a.getType()),o);if(n&&e.loc){const i=function(e,t){let n=t,r=t;for(;n;){const t=e.charCodeAt(n-1);if(10===t||13===t||8232===t||8233===t)break;n--,9!==t&&11!==t&&12!==t&&32!==t&&160!==t&&(r=n)}return e.slice(n,r)}(t,e.loc.start);r.push({index:e.loc.end,string:" "+Dt(n).replaceAll("\n","\n"+i)})}}}}),{insertions:r,result:ps(t,r)}}function ds(e){if(!("getFields"in e))return[];const t=e.getFields();if(t.id)return["id"];if(t.edges)return["edges"];if(t.node)return["node"];const n=[];for(const r of Object.keys(t))Zt(t[r].type)&&n.push(r);return n}function fs(e,t){const n=dn(e);if(!e||Zt(e))return;const r=t(n);return Array.isArray(r)&&0!==r.length&&"getFields"in n?{kind:ye.SELECTION_SET,selections:r.map((e=>{const r=n.getFields()[e],i=r?r.type:null;return{kind:ye.FIELD,name:{kind:ye.NAME,value:e},selectionSet:fs(i,t)}}))}:void 0}function ps(e,t){if(0===t.length)return e;let n="",r=0;for(const{index:i,string:o}of t)n+=e.slice(r,i)+o,r=i;return n+=e.slice(r),n}function hs(e,t,n){var r;const i=n?dn(n).name:null,o=[],a=[];for(let s of t){if("FragmentSpread"===s.kind){const t=s.name.value;if(!s.directives||0===s.directives.length){if(a.includes(t))continue;a.push(t)}const n=e[s.name.value];if(n){const{typeCondition:e,directives:t,selectionSet:r}=n;s={kind:ye.INLINE_FRAGMENT,typeCondition:e,directives:t,selectionSet:r}}}if(s.kind===ye.INLINE_FRAGMENT&&(!s.directives||0===(null==(r=s.directives)?void 0:r.length))){const t=s.typeCondition?s.typeCondition.name.value:null;if(!t||t===i){o.push(...hs(e,s.selectionSet.selections,n));continue}}o.push(s)}return o}function ms(e,t){const n=t?new Br(t):null,r=Object.create(null);for(const a of e.definitions)a.kind===ye.FRAGMENT_DEFINITION&&(r[a.name.value]=a);const i={SelectionSet(e){const t=n?n.getParentType():null;let{selections:i}=e;return i=hs(r,i,t),qa(Ha({},e),{selections:i})},FragmentDefinition:()=>null},o=_t(e,n?Ur(n,i):i);return _t(o,{SelectionSet(e){let{selections:t}=e;return t=function(e,t){var n;const r=new Map,i=[];for(const o of e)if("Field"===o.kind){const e=t(o),a=r.get(e);if(null!=(n=o.directives)&&n.length){const e=Ha({},o);i.push(e)}else if(null!=a&&a.selectionSet&&o.selectionSet)a.selectionSet.selections=[...a.selectionSet.selections,...o.selectionSet.selections];else if(!a){const t=Ha({},o);r.set(e,t),i.push(t)}}else i.push(o);return i}(t,(e=>e.alias?e.alias.value:e.name.value)),qa(Ha({},e),{selections:t})},FragmentDefinition:()=>null})}class vs{constructor(e){e?this.storage=e:null===e||"undefined"==typeof window?this.storage=null:this.storage={getItem:localStorage.getItem.bind(localStorage),setItem:localStorage.setItem.bind(localStorage),removeItem:localStorage.removeItem.bind(localStorage),get length(){let e=0;for(const t in localStorage)0===t.indexOf(`${gs}:`)&&(e+=1);return e},clear(){for(const e in localStorage)0===e.indexOf(`${gs}:`)&&localStorage.removeItem(e)}}}get(e){if(!this.storage)return null;const t=`${gs}:${e}`,n=this.storage.getItem(t);return"null"===n||"undefined"===n?(this.storage.removeItem(t),null):n||null}set(e,t){let n=!1,r=null;if(this.storage){const i=`${gs}:${e}`;if(t)try{this.storage.setItem(i,t)}catch(aN){r=aN instanceof Error?aN:new Error(`${aN}`),n=function(e,t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==e.length}(this.storage,aN)}else this.storage.removeItem(i)}return{isQuotaError:n,error:r}}clear(){this.storage&&this.storage.clear()}}const gs="graphiql";class ys{constructor(e,t,n=null){this.key=e,this.storage=t,this.maxSize=n,this.items=this.fetchAll()}get length(){return this.items.length}contains(e){return this.items.some((t=>t.query===e.query&&t.variables===e.variables&&t.headers===e.headers&&t.operationName===e.operationName))}edit(e,t){if("number"==typeof t&&this.items[t]){const n=this.items[t];if(n.query===e.query&&n.variables===e.variables&&n.headers===e.headers&&n.operationName===e.operationName)return this.items.splice(t,1,e),void this.save()}const n=this.items.findIndex((t=>t.query===e.query&&t.variables===e.variables&&t.headers===e.headers&&t.operationName===e.operationName));-1!==n&&(this.items.splice(n,1,e),this.save())}delete(e){const t=this.items.findIndex((t=>t.query===e.query&&t.variables===e.variables&&t.headers===e.headers&&t.operationName===e.operationName));-1!==t&&(this.items.splice(t,1),this.save())}fetchRecent(){return this.items.at(-1)}fetchAll(){const e=this.storage.get(this.key);return e?JSON.parse(e)[this.key]:[]}push(e){const t=[...this.items,e];this.maxSize&&t.length>this.maxSize&&t.shift();for(let n=0;n<5;n++){const e=this.storage.set(this.key,JSON.stringify({[this.key]:t}));if(null!=e&&e.error){if(!e.isQuotaError||!this.maxSize)return;t.shift()}else this.items=t}}save(){this.storage.set(this.key,JSON.stringify({[this.key]:this.items}))}}class bs{constructor(e,t){this.storage=e,this.maxHistoryLength=t,this.updateHistory=({query:e,variables:t,headers:n,operationName:r})=>{if(!this.shouldSaveQuery(e,t,n,this.history.fetchRecent()))return;this.history.push({query:e,variables:t,headers:n,operationName:r});const i=this.history.items,o=this.favorite.items;this.queries=i.concat(o)},this.deleteHistory=({query:e,variables:t,headers:n,operationName:r,favorite:i},o=!1)=>{function a(i){const o=i.items.find((i=>i.query===e&&i.variables===t&&i.headers===n&&i.operationName===r));o&&i.delete(o)}(i||o)&&a(this.favorite),(!i||o)&&a(this.history),this.queries=[...this.history.items,...this.favorite.items]},this.history=new ys("queries",this.storage,this.maxHistoryLength),this.favorite=new ys("favorites",this.storage,null),this.queries=[...this.history.fetchAll(),...this.favorite.fetchAll()]}shouldSaveQuery(e,t,n,r){if(!e)return!1;try{it(e)}catch(aN){return!1}return!(e.length>1e5)&&(!r||!(JSON.stringify(e)===JSON.stringify(r.query)&&(JSON.stringify(t)===JSON.stringify(r.variables)&&(JSON.stringify(n)===JSON.stringify(r.headers)||n&&!r.headers)||t&&!r.variables)))}toggleFavorite({query:e,variables:t,headers:n,operationName:r,label:i,favorite:o}){const a={query:e,variables:t,headers:n,operationName:r,label:i};o?(a.favorite=!1,this.favorite.delete(a),this.history.push(a)):(a.favorite=!0,this.favorite.push(a),this.history.delete(a)),this.queries=[...this.history.items,...this.favorite.items]}editLabel({query:e,variables:t,headers:n,operationName:r,label:i,favorite:o},a){const s={query:e,variables:t,headers:n,operationName:r,label:i};o?this.favorite.edit(qa(Ha({},s),{favorite:o}),a):this.history.edit(s,a),this.queries=[...this.history.items,...this.favorite.items]}}function Es(e){const t=Object.keys(e),n=t.length,r=new Array(n);for(let i=0;i<n;++i)r[i]=e[t[i]];return r}function xs(e,t){return function(e,t){if(!t||""===t.trim()||":"===t.trim()||"{"===t.trim())return ws(e,(e=>!e.isDeprecated));const n=e.map((e=>({proximity:Cs(Ts(e.label),t),entry:e})));return ws(ws(n,(e=>e.proximity<=2)),(e=>!e.entry.isDeprecated)).sort(((e,t)=>(e.entry.isDeprecated?1:0)-(t.entry.isDeprecated?1:0)||e.proximity-t.proximity||e.entry.label.length-t.entry.label.length)).map((e=>e.entry))}(t,Ts(e.string))}function ws(e,t){const n=e.filter(t);return 0===n.length?e:n}function Ts(e){return e.toLowerCase().replaceAll(/\W/g,"")}function Cs(e,t){let n=function(e,t){let n,r;const i=[],o=e.length,a=t.length;for(n=0;n<=o;n++)i[n]=[n];for(r=1;r<=a;r++)i[0][r]=r;for(n=1;n<=o;n++)for(r=1;r<=a;r++){const o=e[n-1]===t[r-1]?0:1;i[n][r]=Math.min(i[n-1][r]+1,i[n][r-1]+1,i[n-1][r-1]+o),n>1&&r>1&&e[n-1]===t[r-2]&&e[n-2]===t[r-1]&&(i[n][r]=Math.min(i[n][r],i[n-2][r-2]+o))}return i[o][a]}(t,e);return e.length>t.length&&(n-=e.length-t.length-1,n+=0===e.indexOf(t)?0:.5),n}const ks=(e,t,n)=>{if(!t)return null!=n?n:e;const r=dn(t);return Ut(r)||Yt(r)||Kt(r)||tn(r)?e+" {\n $1\n}":null!=n?n:e},Ss=(e,t,n)=>{if(Kt(t)){const n=dn(t.ofType);return e+`[${ks("",n,"$1")}]`}return ks(e,t,n)},_s=e=>{const t=e.args.filter((e=>e.type.toString().endsWith("!")));if(t.length)return e.name+`(${t.map(((e,t)=>`${e.name}: $${t+1}`))}) ${ks("",e.type,"\n")}`};var Ns,As,Ds,Is,Os,Ls,Fs,Rs,Ms,Ps,js,Vs,Bs,$s,Us,Hs,qs,zs,Ws,Gs,Ys,Ks,Qs,Xs,Js,Zs,el,tl,nl,rl,il,ol,al,sl,ll,cl,ul,dl,fl,pl,hl,ml,vl,gl,yl,bl,El,xl,wl,Tl,Cl;(Ns||(Ns={})).is=function(e){return"string"==typeof e},(As||(As={})).is=function(e){return"string"==typeof e},(Is=Ds||(Ds={})).MIN_VALUE=-2147483648,Is.MAX_VALUE=2147483647,Is.is=function(e){return"number"==typeof e&&Is.MIN_VALUE<=e&&e<=Is.MAX_VALUE},(Ls=Os||(Os={})).MIN_VALUE=0,Ls.MAX_VALUE=2147483647,Ls.is=function(e){return"number"==typeof e&&Ls.MIN_VALUE<=e&&e<=Ls.MAX_VALUE},(Rs=Fs||(Fs={})).create=function(e,t){return e===Number.MAX_VALUE&&(e=Os.MAX_VALUE),t===Number.MAX_VALUE&&(t=Os.MAX_VALUE),{line:e,character:t}},Rs.is=function(e){var t=e;return Yc.objectLiteral(t)&&Yc.uinteger(t.line)&&Yc.uinteger(t.character)},(Ps=Ms||(Ms={})).create=function(e,t,n,r){if(Yc.uinteger(e)&&Yc.uinteger(t)&&Yc.uinteger(n)&&Yc.uinteger(r))return{start:Fs.create(e,t),end:Fs.create(n,r)};if(Fs.is(e)&&Fs.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments[".concat(e,", ").concat(t,", ").concat(n,", ").concat(r,"]"))},Ps.is=function(e){var t=e;return Yc.objectLiteral(t)&&Fs.is(t.start)&&Fs.is(t.end)},(Vs=js||(js={})).create=function(e,t){return{uri:e,range:t}},Vs.is=function(e){var t=e;return Yc.objectLiteral(t)&&Ms.is(t.range)&&(Yc.string(t.uri)||Yc.undefined(t.uri))},($s=Bs||(Bs={})).create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},$s.is=function(e){var t=e;return Yc.objectLiteral(t)&&Ms.is(t.targetRange)&&Yc.string(t.targetUri)&&Ms.is(t.targetSelectionRange)&&(Ms.is(t.originSelectionRange)||Yc.undefined(t.originSelectionRange))},(Hs=Us||(Us={})).create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},Hs.is=function(e){var t=e;return Yc.objectLiteral(t)&&Yc.numberRange(t.red,0,1)&&Yc.numberRange(t.green,0,1)&&Yc.numberRange(t.blue,0,1)&&Yc.numberRange(t.alpha,0,1)},(zs=qs||(qs={})).create=function(e,t){return{range:e,color:t}},zs.is=function(e){var t=e;return Yc.objectLiteral(t)&&Ms.is(t.range)&&Us.is(t.color)},(Gs=Ws||(Ws={})).create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},Gs.is=function(e){var t=e;return Yc.objectLiteral(t)&&Yc.string(t.label)&&(Yc.undefined(t.textEdit)||cl.is(t))&&(Yc.undefined(t.additionalTextEdits)||Yc.typedArray(t.additionalTextEdits,cl.is))},(Ks=Ys||(Ys={})).Comment="comment",Ks.Imports="imports",Ks.Region="region",(Xs=Qs||(Qs={})).create=function(e,t,n,r,i,o){var a={startLine:e,endLine:t};return Yc.defined(n)&&(a.startCharacter=n),Yc.defined(r)&&(a.endCharacter=r),Yc.defined(i)&&(a.kind=i),Yc.defined(o)&&(a.collapsedText=o),a},Xs.is=function(e){var t=e;return Yc.objectLiteral(t)&&Yc.uinteger(t.startLine)&&Yc.uinteger(t.startLine)&&(Yc.undefined(t.startCharacter)||Yc.uinteger(t.startCharacter))&&(Yc.undefined(t.endCharacter)||Yc.uinteger(t.endCharacter))&&(Yc.undefined(t.kind)||Yc.string(t.kind))},(Zs=Js||(Js={})).create=function(e,t){return{location:e,message:t}},Zs.is=function(e){var t=e;return Yc.defined(t)&&js.is(t.location)&&Yc.string(t.message)},(tl=el||(el={})).Error=1,tl.Warning=2,tl.Information=3,tl.Hint=4,(rl=nl||(nl={})).Unnecessary=1,rl.Deprecated=2,(il||(il={})).is=function(e){var t=e;return Yc.objectLiteral(t)&&Yc.string(t.href)},(al=ol||(ol={})).create=function(e,t,n,r,i,o){var a={range:e,message:t};return Yc.defined(n)&&(a.severity=n),Yc.defined(r)&&(a.code=r),Yc.defined(i)&&(a.source=i),Yc.defined(o)&&(a.relatedInformation=o),a},al.is=function(e){var t,n=e;return Yc.defined(n)&&Ms.is(n.range)&&Yc.string(n.message)&&(Yc.number(n.severity)||Yc.undefined(n.severity))&&(Yc.integer(n.code)||Yc.string(n.code)||Yc.undefined(n.code))&&(Yc.undefined(n.codeDescription)||Yc.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(Yc.string(n.source)||Yc.undefined(n.source))&&(Yc.undefined(n.relatedInformation)||Yc.typedArray(n.relatedInformation,Js.is))},(ll=sl||(sl={})).create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i={title:e,command:t};return Yc.defined(n)&&n.length>0&&(i.arguments=n),i},ll.is=function(e){var t=e;return Yc.defined(t)&&Yc.string(t.title)&&Yc.string(t.command)},(ul=cl||(cl={})).replace=function(e,t){return{range:e,newText:t}},ul.insert=function(e,t){return{range:{start:e,end:e},newText:t}},ul.del=function(e){return{range:e,newText:""}},ul.is=function(e){var t=e;return Yc.objectLiteral(t)&&Yc.string(t.newText)&&Ms.is(t.range)},(fl=dl||(dl={})).create=function(e,t,n){var r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},fl.is=function(e){var t=e;return Yc.objectLiteral(t)&&Yc.string(t.label)&&(Yc.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Yc.string(t.description)||void 0===t.description)},(pl||(pl={})).is=function(e){var t=e;return Yc.string(t)},(ml=hl||(hl={})).replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},ml.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},ml.del=function(e,t){return{range:e,newText:"",annotationId:t}},ml.is=function(e){var t=e;return cl.is(t)&&(dl.is(t.annotationId)||pl.is(t.annotationId))},(gl=vl||(vl={})).create=function(e,t){return{textDocument:e,edits:t}},gl.is=function(e){var t=e;return Yc.defined(t)&&Al.is(t.textDocument)&&Array.isArray(t.edits)},(bl=yl||(yl={})).create=function(e,t,n){var r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},bl.is=function(e){var t=e;return t&&"create"===t.kind&&Yc.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Yc.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Yc.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||pl.is(t.annotationId))},(xl=El||(El={})).create=function(e,t,n,r){var i={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),void 0!==r&&(i.annotationId=r),i},xl.is=function(e){var t=e;return t&&"rename"===t.kind&&Yc.string(t.oldUri)&&Yc.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Yc.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Yc.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||pl.is(t.annotationId))},(Tl=wl||(wl={})).create=function(e,t,n){var r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},Tl.is=function(e){var t=e;return t&&"delete"===t.kind&&Yc.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Yc.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Yc.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||pl.is(t.annotationId))},(Cl||(Cl={})).is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return Yc.string(e.kind)?yl.is(e)||El.is(e)||wl.is(e):vl.is(e)})))};var kl,Sl,_l,Nl,Al,Dl,Il,Ol,Ll,Fl,Rl,Ml,Pl,jl,Vl,Bl,$l,Ul,Hl,ql,zl,Wl,Gl,Yl,Kl,Ql,Xl,Jl,Zl,ec,tc,nc,rc,ic,oc,ac,sc,lc,cc,uc,dc,fc,pc,hc,mc,vc,gc,yc,bc,Ec,xc,wc,Tc,Cc,kc,Sc,_c,Nc,Ac,Dc,Ic,Oc,Lc,Fc,Rc,Mc,Pc,jc,Vc,Bc,$c,Uc,Hc,qc,zc,Wc=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return e.prototype.insert=function(e,t,n){var r,i;if(void 0===n?r=cl.insert(e,t):pl.is(n)?(i=n,r=hl.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=hl.insert(e,t,i)),this.edits.push(r),void 0!==i)return i},e.prototype.replace=function(e,t,n){var r,i;if(void 0===n?r=cl.replace(e,t):pl.is(n)?(i=n,r=hl.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=hl.replace(e,t,i)),this.edits.push(r),void 0!==i)return i},e.prototype.delete=function(e,t){var n,r;if(void 0===t?n=cl.del(e):pl.is(t)?(r=t,n=hl.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=hl.del(e,r)),this.edits.push(n),void 0!==r)return r},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),Gc=function(){function e(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(e,t){var n;if(pl.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error("Id ".concat(n," is already in use."));if(void 0===t)throw new Error("No annotation provided for id ".concat(n));return this._annotations[n]=t,this._size++,n},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}();!function(){function e(e){var t=this;this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Gc(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(vl.is(e)){var n=new Wc(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=n}}))):e.changes&&Object.keys(e.changes).forEach((function(n){var r=new Wc(e.changes[n]);t._textEditChanges[n]=r}))):this._workspaceEdit={}}Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(e){if(Al.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version};if(!(r=this._textEditChanges[t.uri])){var n={textDocument:t,edits:i=[]};this._workspaceEdit.documentChanges.push(n),r=new Wc(i,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var r;if(!(r=this._textEditChanges[e])){var i=[];this._workspaceEdit.changes[e]=i,r=new Wc(i),this._textEditChanges[e]=r}return r},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new Gc,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r,i,o;if(dl.is(t)||pl.is(t)?r=t:n=t,void 0===r?i=yl.create(e,n):(o=pl.is(r)?r:this._changeAnnotations.manage(r),i=yl.create(e,n,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o},e.prototype.renameFile=function(e,t,n,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,o,a;if(dl.is(n)||pl.is(n)?i=n:r=n,void 0===i?o=El.create(e,t,r):(a=pl.is(i)?i:this._changeAnnotations.manage(i),o=El.create(e,t,r,a)),this._workspaceEdit.documentChanges.push(o),void 0!==a)return a},e.prototype.deleteFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r,i,o;if(dl.is(t)||pl.is(t)?r=t:n=t,void 0===r?i=wl.create(e,n):(o=pl.is(r)?r:this._changeAnnotations.manage(r),i=wl.create(e,n,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o}}(),(Sl=kl||(kl={})).create=function(e){return{uri:e}},Sl.is=function(e){var t=e;return Yc.defined(t)&&Yc.string(t.uri)},(Nl=_l||(_l={})).create=function(e,t){return{uri:e,version:t}},Nl.is=function(e){var t=e;return Yc.defined(t)&&Yc.string(t.uri)&&Yc.integer(t.version)},(Dl=Al||(Al={})).create=function(e,t){return{uri:e,version:t}},Dl.is=function(e){var t=e;return Yc.defined(t)&&Yc.string(t.uri)&&(null===t.version||Yc.integer(t.version))},(Ol=Il||(Il={})).create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},Ol.is=function(e){var t=e;return Yc.defined(t)&&Yc.string(t.uri)&&Yc.string(t.languageId)&&Yc.integer(t.version)&&Yc.string(t.text)},(Fl=Ll||(Ll={})).PlainText="plaintext",Fl.Markdown="markdown",Fl.is=function(e){var t=e;return t===Fl.PlainText||t===Fl.Markdown},(Rl||(Rl={})).is=function(e){var t=e;return Yc.objectLiteral(e)&&Ll.is(t.kind)&&Yc.string(t.value)},(Pl=Ml||(Ml={})).Text=1,Pl.Method=2,Pl.Function=3,Pl.Constructor=4,Pl.Field=5,Pl.Variable=6,Pl.Class=7,Pl.Interface=8,Pl.Module=9,Pl.Property=10,Pl.Unit=11,Pl.Value=12,Pl.Enum=13,Pl.Keyword=14,Pl.Snippet=15,Pl.Color=16,Pl.File=17,Pl.Reference=18,Pl.Folder=19,Pl.EnumMember=20,Pl.Constant=21,Pl.Struct=22,Pl.Event=23,Pl.Operator=24,Pl.TypeParameter=25,(Vl=jl||(jl={})).PlainText=1,Vl.Snippet=2,(Bl||(Bl={})).Deprecated=1,(Ul=$l||($l={})).create=function(e,t,n){return{newText:e,insert:t,replace:n}},Ul.is=function(e){var t=e;return t&&Yc.string(t.newText)&&Ms.is(t.insert)&&Ms.is(t.replace)},(ql=Hl||(Hl={})).asIs=1,ql.adjustIndentation=2,(zl||(zl={})).is=function(e){var t=e;return t&&(Yc.string(t.detail)||void 0===t.detail)&&(Yc.string(t.description)||void 0===t.description)},(Wl||(Wl={})).create=function(e){return{label:e}},(Gl||(Gl={})).create=function(e,t){return{items:e||[],isIncomplete:!!t}},(Kl=Yl||(Yl={})).fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},Kl.is=function(e){var t=e;return Yc.string(t)||Yc.objectLiteral(t)&&Yc.string(t.language)&&Yc.string(t.value)},(Ql||(Ql={})).is=function(e){var t=e;return!!t&&Yc.objectLiteral(t)&&(Rl.is(t.contents)||Yl.is(t.contents)||Yc.typedArray(t.contents,Yl.is))&&(void 0===e.range||Ms.is(e.range))},(Xl||(Xl={})).create=function(e,t){return t?{label:e,documentation:t}:{label:e}},(Jl||(Jl={})).create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i={label:e};return Yc.defined(t)&&(i.documentation=t),Yc.defined(n)?i.parameters=n:i.parameters=[],i},(ec=Zl||(Zl={})).Text=1,ec.Read=2,ec.Write=3,(tc||(tc={})).create=function(e,t){var n={range:e};return Yc.number(t)&&(n.kind=t),n},(rc=nc||(nc={})).File=1,rc.Module=2,rc.Namespace=3,rc.Package=4,rc.Class=5,rc.Method=6,rc.Property=7,rc.Field=8,rc.Constructor=9,rc.Enum=10,rc.Interface=11,rc.Function=12,rc.Variable=13,rc.Constant=14,rc.String=15,rc.Number=16,rc.Boolean=17,rc.Array=18,rc.Object=19,rc.Key=20,rc.Null=21,rc.EnumMember=22,rc.Struct=23,rc.Event=24,rc.Operator=25,rc.TypeParameter=26,(ic||(ic={})).Deprecated=1,(oc||(oc={})).create=function(e,t,n,r,i){var o={name:e,kind:t,location:{uri:r,range:n}};return i&&(o.containerName=i),o},(ac||(ac={})).create=function(e,t,n,r){return void 0!==r?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}},(lc=sc||(sc={})).create=function(e,t,n,r,i,o){var a={name:e,detail:t,kind:n,range:r,selectionRange:i};return void 0!==o&&(a.children=o),a},lc.is=function(e){var t=e;return t&&Yc.string(t.name)&&Yc.number(t.kind)&&Ms.is(t.range)&&Ms.is(t.selectionRange)&&(void 0===t.detail||Yc.string(t.detail))&&(void 0===t.deprecated||Yc.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))},(uc=cc||(cc={})).Empty="",uc.QuickFix="quickfix",uc.Refactor="refactor",uc.RefactorExtract="refactor.extract",uc.RefactorInline="refactor.inline",uc.RefactorRewrite="refactor.rewrite",uc.Source="source",uc.SourceOrganizeImports="source.organizeImports",uc.SourceFixAll="source.fixAll",(fc=dc||(dc={})).Invoked=1,fc.Automatic=2,(hc=pc||(pc={})).create=function(e,t,n){var r={diagnostics:e};return null!=t&&(r.only=t),null!=n&&(r.triggerKind=n),r},hc.is=function(e){var t=e;return Yc.defined(t)&&Yc.typedArray(t.diagnostics,ol.is)&&(void 0===t.only||Yc.typedArray(t.only,Yc.string))&&(void 0===t.triggerKind||t.triggerKind===dc.Invoked||t.triggerKind===dc.Automatic)},(vc=mc||(mc={})).create=function(e,t,n){var r={title:e},i=!0;return"string"==typeof t?(i=!1,r.kind=t):sl.is(t)?r.command=t:r.edit=t,i&&void 0!==n&&(r.kind=n),r},vc.is=function(e){var t=e;return t&&Yc.string(t.title)&&(void 0===t.diagnostics||Yc.typedArray(t.diagnostics,ol.is))&&(void 0===t.kind||Yc.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||sl.is(t.command))&&(void 0===t.isPreferred||Yc.boolean(t.isPreferred))&&(void 0===t.edit||Cl.is(t.edit))},(yc=gc||(gc={})).create=function(e,t){var n={range:e};return Yc.defined(t)&&(n.data=t),n},yc.is=function(e){var t=e;return Yc.defined(t)&&Ms.is(t.range)&&(Yc.undefined(t.command)||sl.is(t.command))},(Ec=bc||(bc={})).create=function(e,t){return{tabSize:e,insertSpaces:t}},Ec.is=function(e){var t=e;return Yc.defined(t)&&Yc.uinteger(t.tabSize)&&Yc.boolean(t.insertSpaces)},(wc=xc||(xc={})).create=function(e,t,n){return{range:e,target:t,data:n}},wc.is=function(e){var t=e;return Yc.defined(t)&&Ms.is(t.range)&&(Yc.undefined(t.target)||Yc.string(t.target))},(Cc=Tc||(Tc={})).create=function(e,t){return{range:e,parent:t}},Cc.is=function(e){var t=e;return Yc.objectLiteral(t)&&Ms.is(t.range)&&(void 0===t.parent||Cc.is(t.parent))},(Sc=kc||(kc={})).namespace="namespace",Sc.type="type",Sc.class="class",Sc.enum="enum",Sc.interface="interface",Sc.struct="struct",Sc.typeParameter="typeParameter",Sc.parameter="parameter",Sc.variable="variable",Sc.property="property",Sc.enumMember="enumMember",Sc.event="event",Sc.function="function",Sc.method="method",Sc.macro="macro",Sc.keyword="keyword",Sc.modifier="modifier",Sc.comment="comment",Sc.string="string",Sc.number="number",Sc.regexp="regexp",Sc.operator="operator",Sc.decorator="decorator",(Nc=_c||(_c={})).declaration="declaration",Nc.definition="definition",Nc.readonly="readonly",Nc.static="static",Nc.deprecated="deprecated",Nc.abstract="abstract",Nc.async="async",Nc.modification="modification",Nc.documentation="documentation",Nc.defaultLibrary="defaultLibrary",(Ac||(Ac={})).is=function(e){var t=e;return Yc.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])},(Ic=Dc||(Dc={})).create=function(e,t){return{range:e,text:t}},Ic.is=function(e){var t=e;return null!=t&&Ms.is(t.range)&&Yc.string(t.text)},(Lc=Oc||(Oc={})).create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},Lc.is=function(e){var t=e;return null!=t&&Ms.is(t.range)&&Yc.boolean(t.caseSensitiveLookup)&&(Yc.string(t.variableName)||void 0===t.variableName)},(Rc=Fc||(Fc={})).create=function(e,t){return{range:e,expression:t}},Rc.is=function(e){var t=e;return null!=t&&Ms.is(t.range)&&(Yc.string(t.expression)||void 0===t.expression)},(Pc=Mc||(Mc={})).create=function(e,t){return{frameId:e,stoppedLocation:t}},Pc.is=function(e){var t=e;return Yc.defined(t)&&Ms.is(e.stoppedLocation)},(Vc=jc||(jc={})).Type=1,Vc.Parameter=2,Vc.is=function(e){return 1===e||2===e},($c=Bc||(Bc={})).create=function(e){return{value:e}},$c.is=function(e){var t=e;return Yc.objectLiteral(t)&&(void 0===t.tooltip||Yc.string(t.tooltip)||Rl.is(t.tooltip))&&(void 0===t.location||js.is(t.location))&&(void 0===t.command||sl.is(t.command))},(Hc=Uc||(Uc={})).create=function(e,t,n){var r={position:e,label:t};return void 0!==n&&(r.kind=n),r},Hc.is=function(e){var t=e;return Yc.objectLiteral(t)&&Fs.is(t.position)&&(Yc.string(t.label)||Yc.typedArray(t.label,Bc.is))&&(void 0===t.kind||jc.is(t.kind))&&void 0===t.textEdits||Yc.typedArray(t.textEdits,cl.is)&&(void 0===t.tooltip||Yc.string(t.tooltip)||Rl.is(t.tooltip))&&(void 0===t.paddingLeft||Yc.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Yc.boolean(t.paddingRight))},(qc||(qc={})).is=function(e){var t=e;return Yc.objectLiteral(t)&&As.is(t.uri)&&Yc.string(t.name)},function(e){function t(e,n){if(e.length<=1)return e;var r=e.length/2|0,i=e.slice(0,r),o=e.slice(r);t(i,n),t(o,n);for(var a=0,s=0,l=0;a<i.length&&s<o.length;){var c=n(i[a],o[s]);e[l++]=c<=0?i[a++]:o[s++]}for(;a<i.length;)e[l++]=i[a++];for(;s<o.length;)e[l++]=o[s++];return e}e.create=function(e,t,n,r){return new Xc(e,t,n,r)},e.is=function(e){var t=e;return!!(Yc.defined(t)&&Yc.string(t.uri)&&(Yc.undefined(t.languageId)||Yc.string(t.languageId))&&Yc.uinteger(t.lineCount)&&Yc.func(t.getText)&&Yc.func(t.positionAt)&&Yc.func(t.offsetAt))},e.applyEdits=function(e,n){for(var r=e.getText(),i=t(n,(function(e,t){var n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),o=r.length,a=i.length-1;a>=0;a--){var s=i[a],l=e.offsetAt(s.range.start),c=e.offsetAt(s.range.end);if(!(c<=o))throw new Error("Overlapping edit");r=r.substring(0,l)+s.newText+r.substring(c,r.length),o=l}return r}}(zc||(zc={}));var Yc,Kc,Qc,Xc=function(){function e(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var e=[],t=this._content,n=!0,r=0;r<t.length;r++){n&&(e.push(r),n=!1);var i=t.charAt(r);n="\r"===i||"\n"===i,"\r"===i&&r+1<t.length&&"\n"===t.charAt(r+1)&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return Fs.create(0,e);for(;n<r;){var i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}var o=n-1;return Fs.create(o,e-t[o])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e}();Kc=Yc||(Yc={}),Qc=Object.prototype.toString,Kc.defined=function(e){return void 0!==e},Kc.undefined=function(e){return void 0===e},Kc.boolean=function(e){return!0===e||!1===e},Kc.string=function(e){return"[object String]"===Qc.call(e)},Kc.number=function(e){return"[object Number]"===Qc.call(e)},Kc.numberRange=function(e,t,n){return"[object Number]"===Qc.call(e)&&t<=e&&e<=n},Kc.integer=function(e){return"[object Number]"===Qc.call(e)&&-2147483648<=e&&e<=2147483647},Kc.uinteger=function(e){return"[object Number]"===Qc.call(e)&&0<=e&&e<=2147483647},Kc.func=function(e){return"[object Function]"===Qc.call(e)},Kc.objectLiteral=function(e){return null!==e&&"object"==typeof e},Kc.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)};class Jc{constructor(e){this._start=0,this._pos=0,this.getStartOfToken=()=>this._start,this.getCurrentPosition=()=>this._pos,this.eol=()=>this._sourceText.length===this._pos,this.sol=()=>0===this._pos,this.peek=()=>this._sourceText.charAt(this._pos)||null,this.next=()=>{const e=this._sourceText.charAt(this._pos);return this._pos++,e},this.eat=e=>{if(this._testNextCharacter(e))return this._start=this._pos,this._pos++,this._sourceText.charAt(this._pos-1)},this.eatWhile=e=>{let t=this._testNextCharacter(e),n=!1;for(t&&(n=t,this._start=this._pos);t;)this._pos++,t=this._testNextCharacter(e),n=!0;return n},this.eatSpace=()=>this.eatWhile(/[\s\u00a0]/),this.skipToEnd=()=>{this._pos=this._sourceText.length},this.skipTo=e=>{this._pos=e},this.match=(e,t=!0,n=!1)=>{let r=null,i=null;if("string"==typeof e){i=new RegExp(e,n?"i":"g").test(this._sourceText.slice(this._pos,this._pos+e.length)),r=e}else e instanceof RegExp&&(i=this._sourceText.slice(this._pos).match(e),r=null==i?void 0:i[0]);return!(null==i||!("string"==typeof e||i instanceof Array&&this._sourceText.startsWith(i[0],this._pos)))&&(t&&(this._start=this._pos,r&&r.length&&(this._pos+=r.length)),i)},this.backUp=e=>{this._pos-=e},this.column=()=>this._pos,this.indentation=()=>{const e=this._sourceText.match(/\s*/);let t=0;if(e&&0!==e.length){const n=e[0];let r=0;for(;n.length>r;)9===n.charCodeAt(r)?t+=2:t++,r++}return t},this.current=()=>this._sourceText.slice(this._start,this._pos),this._sourceText=e}_testNextCharacter(e){const t=this._sourceText.charAt(this._pos);let n=!1;return n="string"==typeof e?t===e:e instanceof RegExp?e.test(t):e(t),n}}function Zc(e){return{ofRule:e}}function eu(e,t){return{ofRule:e,isList:!0,separator:t}}function tu(e,t){return{style:t,match:t=>t.kind===e}}function nu(e,t){return{style:t||"punctuation",match:t=>"Punctuation"===t.kind&&t.value===e}}const ru=e=>" "===e||"\t"===e||","===e||"\n"===e||"\r"===e||"\ufeff"===e||" "===e,iu={Name:/^[_A-Za-z][_0-9A-Za-z]*/,Punctuation:/^(?:!|\$|\(|\)|\.\.\.|:|=|&|@|\[|]|\{|\||\})/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^(?:"""(?:\\"""|[^"]|"[^"]|""[^"])*(?:""")?|"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?)/,Comment:/^#.*/},ou={Document:[eu("Definition")],Definition(e){switch(e.value){case"{":return"ShortQuery";case"query":return"Query";case"mutation":return"Mutation";case"subscription":return"Subscription";case"fragment":return ye.FRAGMENT_DEFINITION;case"schema":return"SchemaDef";case"scalar":return"ScalarDef";case"type":return"ObjectTypeDef";case"interface":return"InterfaceDef";case"union":return"UnionDef";case"enum":return"EnumDef";case"input":return"InputDef";case"extend":return"ExtendDef";case"directive":return"DirectiveDef"}},ShortQuery:["SelectionSet"],Query:[su("query"),Zc(lu("def")),Zc("VariableDefinitions"),eu("Directive"),"SelectionSet"],Mutation:[su("mutation"),Zc(lu("def")),Zc("VariableDefinitions"),eu("Directive"),"SelectionSet"],Subscription:[su("subscription"),Zc(lu("def")),Zc("VariableDefinitions"),eu("Directive"),"SelectionSet"],VariableDefinitions:[nu("("),eu("VariableDefinition"),nu(")")],VariableDefinition:["Variable",nu(":"),"Type",Zc("DefaultValue")],Variable:[nu("$","variable"),lu("variable")],DefaultValue:[nu("="),"Value"],SelectionSet:[nu("{"),eu("Selection"),nu("}")],Selection:(e,t)=>"..."===e.value?t.match(/[\s\u00a0,]*(on\b|@|{)/,!1)?"InlineFragment":"FragmentSpread":t.match(/[\s\u00a0,]*:/,!1)?"AliasedField":"Field",AliasedField:[lu("property"),nu(":"),lu("qualifier"),Zc("Arguments"),eu("Directive"),Zc("SelectionSet")],Field:[lu("property"),Zc("Arguments"),eu("Directive"),Zc("SelectionSet")],Arguments:[nu("("),eu("Argument"),nu(")")],Argument:[lu("attribute"),nu(":"),"Value"],FragmentSpread:[nu("..."),lu("def"),eu("Directive")],InlineFragment:[nu("..."),Zc("TypeCondition"),eu("Directive"),"SelectionSet"],FragmentDefinition:[su("fragment"),Zc(function(e,t){const n=e.match;return e.match=e=>{let r=!1;return n&&(r=n(e)),r&&t.every((t=>t.match&&!t.match(e)))},e}(lu("def"),[su("on")])),"TypeCondition",eu("Directive"),"SelectionSet"],TypeCondition:[su("on"),"NamedType"],Value(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue";case"$":return"Variable";case"&":return"NamedType"}return null;case"Name":switch(e.value){case"true":case"false":return"BooleanValue"}return"null"===e.value?"NullValue":"EnumValue"}},NumberValue:[tu("Number","number")],StringValue:[{style:"string",match:e=>"String"===e.kind,update(e,t){t.value.startsWith('"""')&&(e.inBlockstring=!t.value.slice(3).endsWith('"""'))}}],BooleanValue:[tu("Name","builtin")],NullValue:[tu("Name","keyword")],EnumValue:[lu("string-2")],ListValue:[nu("["),eu("Value"),nu("]")],ObjectValue:[nu("{"),eu("ObjectField"),nu("}")],ObjectField:[lu("attribute"),nu(":"),"Value"],Type:e=>"["===e.value?"ListType":"NonNullType",ListType:[nu("["),"Type",nu("]"),Zc(nu("!"))],NonNullType:["NamedType",Zc(nu("!"))],NamedType:[(au="atom",{style:au,match:e=>"Name"===e.kind,update(e,t){var n;(null===(n=e.prevState)||void 0===n?void 0:n.prevState)&&(e.name=t.value,e.prevState.prevState.type=t.value)}})],Directive:[nu("@","meta"),lu("meta"),Zc("Arguments")],DirectiveDef:[su("directive"),nu("@","meta"),lu("meta"),Zc("ArgumentsDef"),su("on"),eu("DirectiveLocation",nu("|"))],InterfaceDef:[su("interface"),lu("atom"),Zc("Implements"),eu("Directive"),nu("{"),eu("FieldDef"),nu("}")],Implements:[su("implements"),eu("NamedType",nu("&"))],DirectiveLocation:[lu("string-2")],SchemaDef:[su("schema"),eu("Directive"),nu("{"),eu("OperationTypeDef"),nu("}")],OperationTypeDef:[lu("keyword"),nu(":"),lu("atom")],ScalarDef:[su("scalar"),lu("atom"),eu("Directive")],ObjectTypeDef:[su("type"),lu("atom"),Zc("Implements"),eu("Directive"),nu("{"),eu("FieldDef"),nu("}")],FieldDef:[lu("property"),Zc("ArgumentsDef"),nu(":"),"Type",eu("Directive")],ArgumentsDef:[nu("("),eu("InputValueDef"),nu(")")],InputValueDef:[lu("attribute"),nu(":"),"Type",Zc("DefaultValue"),eu("Directive")],UnionDef:[su("union"),lu("atom"),eu("Directive"),nu("="),eu("UnionMember",nu("|"))],UnionMember:["NamedType"],EnumDef:[su("enum"),lu("atom"),eu("Directive"),nu("{"),eu("EnumValueDef"),nu("}")],EnumValueDef:[lu("string-2"),eu("Directive")],InputDef:[su("input"),lu("atom"),eu("Directive"),nu("{"),eu("InputValueDef"),nu("}")],ExtendDef:[su("extend"),"ExtensionDefinition"],ExtensionDefinition(e){switch(e.value){case"schema":return ye.SCHEMA_EXTENSION;case"scalar":return ye.SCALAR_TYPE_EXTENSION;case"type":return ye.OBJECT_TYPE_EXTENSION;case"interface":return ye.INTERFACE_TYPE_EXTENSION;case"union":return ye.UNION_TYPE_EXTENSION;case"enum":return ye.ENUM_TYPE_EXTENSION;case"input":return ye.INPUT_OBJECT_TYPE_EXTENSION}},[ye.SCHEMA_EXTENSION]:["SchemaDef"],[ye.SCALAR_TYPE_EXTENSION]:["ScalarDef"],[ye.OBJECT_TYPE_EXTENSION]:["ObjectTypeDef"],[ye.INTERFACE_TYPE_EXTENSION]:["InterfaceDef"],[ye.UNION_TYPE_EXTENSION]:["UnionDef"],[ye.ENUM_TYPE_EXTENSION]:["EnumDef"],[ye.INPUT_OBJECT_TYPE_EXTENSION]:["InputDef"]};var au;function su(e){return{style:"keyword",match:t=>"Name"===t.kind&&t.value===e}}function lu(e){return{style:e,match:e=>"Name"===e.kind,update(e,t){e.name=t.value}}}function cu(e={eatWhitespace:e=>e.eatWhile(ru),lexRules:iu,parseRules:ou,editorConfig:{}}){return{startState(){const t={level:0,step:0,name:null,kind:null,type:null,rule:null,needsSeparator:!1,prevState:null};return fu(e.parseRules,t,ye.DOCUMENT),t},token:(t,n)=>function(e,t,n){var r;if(t.inBlockstring)return e.match(/.*"""/)?(t.inBlockstring=!1,"string"):(e.skipToEnd(),"string");const{lexRules:i,parseRules:o,eatWhitespace:a,editorConfig:s}=n;t.rule&&0===t.rule.length?pu(t):t.needsAdvance&&(t.needsAdvance=!1,hu(t,!0));if(e.sol()){const n=(null==s?void 0:s.tabSize)||2;t.indentLevel=Math.floor(e.indentation()/n)}if(a(e))return"ws";const l=function(e,t){const n=Object.keys(e);for(let r=0;r<n.length;r++){const i=t.match(e[n[r]]);if(i&&i instanceof Array)return{kind:n[r],value:i[0]}}}(i,e);if(!l){return e.match(/\S+/)||e.match(/\s/),fu(du,t,"Invalid"),"invalidchar"}if("Comment"===l.kind)return fu(du,t,"Comment"),"comment";const c=uu({},t);if("Punctuation"===l.kind)if(/^[{([]/.test(l.value))void 0!==t.indentLevel&&(t.levels=(t.levels||[]).concat(t.indentLevel+1));else if(/^[})\]]/.test(l.value)){const e=t.levels=(t.levels||[]).slice(0,-1);t.indentLevel&&e.length>0&&e.at(-1)<t.indentLevel&&(t.indentLevel=e.at(-1))}for(;t.rule;){let n="function"==typeof t.rule?0===t.step?t.rule(l,e):null:t.rule[t.step];if(t.needsSeparator&&(n=null==n?void 0:n.separator),n){if(n.ofRule&&(n=n.ofRule),"string"==typeof n){fu(o,t,n);continue}if(null===(r=n.match)||void 0===r?void 0:r.call(n,l))return n.update&&n.update(t,l),"Punctuation"===l.kind?hu(t,!0):t.needsAdvance=!0,n.style}vu(t)}return uu(t,c),fu(du,t,"Invalid"),"invalidchar"}(t,n,e)}}function uu(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r++)e[n[r]]=t[n[r]];return e}const du={Invalid:[],Comment:[]};function fu(e,t,n){if(!e[n])throw new TypeError("Unknown rule: "+n);t.prevState=Object.assign({},t),t.kind=n,t.name=null,t.type=null,t.rule=e[n],t.step=0,t.needsSeparator=!1}function pu(e){e.prevState&&(e.kind=e.prevState.kind,e.name=e.prevState.name,e.type=e.prevState.type,e.rule=e.prevState.rule,e.step=e.prevState.step,e.needsSeparator=e.prevState.needsSeparator,e.prevState=e.prevState.prevState)}function hu(e,t){var n;if(mu(e)&&e.rule){const n=e.rule[e.step];if(n.separator){const{separator:t}=n;if(e.needsSeparator=!e.needsSeparator,!e.needsSeparator&&t.ofRule)return}if(t)return}for(e.needsSeparator=!1,e.step++;e.rule&&!(Array.isArray(e.rule)&&e.step<e.rule.length);)pu(e),e.rule&&(mu(e)?(null===(n=e.rule)||void 0===n?void 0:n[e.step].separator)&&(e.needsSeparator=!e.needsSeparator):(e.needsSeparator=!1,e.step++))}function mu(e){const t=Array.isArray(e.rule)&&"string"!=typeof e.rule[e.step]&&e.rule[e.step];return t&&t.isList}function vu(e){for(;e.rule&&(!Array.isArray(e.rule)||!e.rule[e.step].ofRule);)pu(e);e.rule&&hu(e,!1)}function gu(e,t){const n=e.split("\n"),r=cu();let i=r.startState(),o="",a=new Jc("");for(let s=0;s<n.length;s++){for(a=new Jc(n[s]);!a.eol();){o=r.token(a,i);if("BREAK"===t(a,i,o,s))break}t(a,i,o,s),i.kind||(i=r.startState())}return{start:a.getStartOfToken(),end:a.getCurrentPosition(),string:a.current(),state:i,style:o}}var yu,bu;(bu=yu||(yu={})).TYPE_SYSTEM="TYPE_SYSTEM",bu.EXECUTABLE="EXECUTABLE",bu.UNKNOWN="UNKNOWN";const Eu=[ye.SCHEMA_DEFINITION,ye.OPERATION_TYPE_DEFINITION,ye.SCALAR_TYPE_DEFINITION,ye.OBJECT_TYPE_DEFINITION,ye.INTERFACE_TYPE_DEFINITION,ye.UNION_TYPE_DEFINITION,ye.ENUM_TYPE_DEFINITION,ye.INPUT_OBJECT_TYPE_DEFINITION,ye.DIRECTIVE_DEFINITION,ye.SCHEMA_EXTENSION,ye.SCALAR_TYPE_EXTENSION,ye.OBJECT_TYPE_EXTENSION,ye.INTERFACE_TYPE_EXTENSION,ye.UNION_TYPE_EXTENSION,ye.ENUM_TYPE_EXTENSION,ye.INPUT_OBJECT_TYPE_EXTENSION],xu=e=>{let t=yu.UNKNOWN;if(e)try{_t(it(e),{enter(e){if("Document"!==e.kind)return!!Eu.includes(e.kind)&&(t=yu.TYPE_SYSTEM,St);t=yu.EXECUTABLE}})}catch(n){return t}return t};function wu(e,t,n,r,i){const o=r||function(e,t,n=0){let r=null,i=null,o=null;const a=gu(e,((e,a,s,l)=>{if(!(l!==t.line||e.getCurrentPosition()+n<t.character+1))return r=s,i=Object.assign({},a),o=e.current(),"BREAK"}));return{start:a.start,end:a.end,string:o||a.string,state:i||a.state,style:r||a.style}}(e,t,1);if(!o)return null;const a="Invalid"===o.state.kind?o.state.prevState:o.state;if(!a)return null;const s=function(e,t){let n,r,i,o,a,s,l,c,u,d,f;return Cu(t,(t=>{var p;switch(t.kind){case ku.QUERY:case"ShortQuery":d=e.getQueryType();break;case ku.MUTATION:d=e.getMutationType();break;case ku.SUBSCRIPTION:d=e.getSubscriptionType();break;case ku.INLINE_FRAGMENT:case ku.FRAGMENT_DEFINITION:t.type&&(d=e.getType(t.type));break;case ku.FIELD:case ku.ALIASED_FIELD:d&&t.name?(a=u?Tu(e,u,t.name):null,d=a?a.type:null):a=null;break;case ku.SELECTION_SET:u=dn(d);break;case ku.DIRECTIVE:i=t.name?e.getDirective(t.name):null;break;case ku.INTERFACE_DEF:t.name&&(l=null,f=new Tn({name:t.name,interfaces:[],fields:{}}));break;case ku.OBJECT_TYPE_DEF:t.name&&(f=null,l=new mn({name:t.name,interfaces:[],fields:{}}));break;case ku.ARGUMENTS:if(t.prevState)switch(t.prevState.kind){case ku.FIELD:r=a&&a.args;break;case ku.DIRECTIVE:r=i&&i.args;break;case ku.ALIASED_FIELD:{const n=null===(p=t.prevState)||void 0===p?void 0:p.name;if(!n){r=null;break}const i=u?Tu(e,u,n):null;if(!i){r=null;break}r=i.args;break}default:r=null}else r=null;break;case ku.ARGUMENT:if(r)for(let e=0;e<r.length;e++)if(r[e].name===t.name){n=r[e];break}s=null==n?void 0:n.type;break;case ku.VARIABLE_DEFINITION:case ku.VARIABLE:d=s;break;case ku.ENUM_VALUE:const h=dn(s);o=h instanceof Sn?h.getValues().find((e=>e.value===t.name)):null;break;case ku.LIST_VALUE:const m=cn(s);s=m instanceof rn?m.ofType:null;break;case ku.OBJECT_VALUE:const v=dn(s);c=v instanceof An?v.getFields():null;break;case ku.OBJECT_FIELD:const g=t.name&&c?c[t.name]:null;s=null==g?void 0:g.type,a=g,d=a?a.type:null;break;case ku.NAMED_TYPE:t.name&&(d=e.getType(t.name))}})),{argDef:n,argDefs:r,directiveDef:i,enumValue:o,fieldDef:a,inputType:s,objectFieldDefs:c,parentType:u,type:d,interfaceDef:f,objectTypeDef:l}}(n,o.state);var l,c;return{token:o,state:a,typeInfo:s,mode:(null==i?void 0:i.mode)||(l=e,(null==(c=null==i?void 0:i.uri)?void 0:c.endsWith(".graphqls"))?yu.TYPE_SYSTEM:xu(l))}}function Tu(e,t,n){return n===hr.name&&e.getQueryType()===t?hr:n===mr.name&&e.getQueryType()===t?mr:n===vr.name&&en(t)?vr:"getFields"in t?t.getFields()[n]:null}function Cu(e,t){const n=[];let r=e;for(;null==r?void 0:r.kind;)n.push(r),r=r.prevState;for(let i=n.length-1;i>=0;i--)t(n[i])}const ku=Object.assign(Object.assign({},ye),{ALIASED_FIELD:"AliasedField",ARGUMENTS:"Arguments",SHORT_QUERY:"ShortQuery",QUERY:"Query",MUTATION:"Mutation",SUBSCRIPTION:"Subscription",TYPE_CONDITION:"TypeCondition",INVALID:"Invalid",COMMENT:"Comment",SCHEMA_DEF:"SchemaDef",SCALAR_DEF:"ScalarDef",OBJECT_TYPE_DEF:"ObjectTypeDef",OBJECT_VALUE:"ObjectValue",LIST_VALUE:"ListValue",INTERFACE_DEF:"InterfaceDef",UNION_DEF:"UnionDef",ENUM_DEF:"EnumDef",ENUM_VALUE:"EnumValue",FIELD_DEF:"FieldDef",INPUT_DEF:"InputDef",INPUT_VALUE_DEF:"InputValueDef",ARGUMENTS_DEF:"ArgumentsDef",EXTEND_DEF:"ExtendDef",EXTENSION_DEFINITION:"ExtensionDefinition",DIRECTIVE_DEF:"DirectiveDef",IMPLEMENTS:"Implements",VARIABLE_DEFINITIONS:"VariableDefinitions",TYPE:"Type",VARIABLE:"Variable"});var Su;!function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(Su||(Su={}));const _u={command:"editor.action.triggerSuggest",title:"Suggestions"};function Nu(e,t,n,r,i,o){var a;const s=Object.assign(Object.assign({},o),{schema:e}),l=wu(t,n,e,r,o);if(!l)return[];const{state:c,typeInfo:u,mode:d,token:f}=l,{kind:p,step:h,prevState:m}=c;if(p===ku.DOCUMENT)return d===yu.TYPE_SYSTEM?function(e){return xs(e,[{label:"extend",kind:Su.Function},...Au])}(f):d===yu.EXECUTABLE?function(e){return xs(e,Du)}(f):function(e){return xs(e,[{label:"extend",kind:Su.Function},...Du,...Au])}(f);if(p===ku.EXTEND_DEF)return function(e){return xs(e,Au)}(f);if((null===(a=null==m?void 0:m.prevState)||void 0===a?void 0:a.kind)===ku.EXTENSION_DEFINITION&&c.name)return xs(f,[]);if((null==m?void 0:m.kind)===ye.SCALAR_TYPE_EXTENSION)return xs(f,Object.values(e.getTypeMap()).filter($t).map((e=>({label:e.name,kind:Su.Function}))));if((null==m?void 0:m.kind)===ye.OBJECT_TYPE_EXTENSION)return xs(f,Object.values(e.getTypeMap()).filter((e=>Ut(e)&&!e.name.startsWith("__"))).map((e=>({label:e.name,kind:Su.Function}))));if((null==m?void 0:m.kind)===ye.INTERFACE_TYPE_EXTENSION)return xs(f,Object.values(e.getTypeMap()).filter(qt).map((e=>({label:e.name,kind:Su.Function}))));if((null==m?void 0:m.kind)===ye.UNION_TYPE_EXTENSION)return xs(f,Object.values(e.getTypeMap()).filter(Wt).map((e=>({label:e.name,kind:Su.Function}))));if((null==m?void 0:m.kind)===ye.ENUM_TYPE_EXTENSION)return xs(f,Object.values(e.getTypeMap()).filter((e=>Gt(e)&&!e.name.startsWith("__"))).map((e=>({label:e.name,kind:Su.Function}))));if((null==m?void 0:m.kind)===ye.INPUT_OBJECT_TYPE_EXTENSION)return xs(f,Object.values(e.getTypeMap()).filter(Yt).map((e=>({label:e.name,kind:Su.Function}))));if(p===ku.IMPLEMENTS||p===ku.NAMED_TYPE&&(null==m?void 0:m.kind)===ku.IMPLEMENTS)return function(e,t,n,r,i){if(t.needsSeparator)return[];const o=n.getTypeMap(),a=Es(o).filter(qt),s=a.map((({name:e})=>e)),l=new Set;gu(r,((e,t)=>{var r,o,a,c,u;if(t.name&&(t.kind!==ku.INTERFACE_DEF||s.includes(t.name)||l.add(t.name),t.kind===ku.NAMED_TYPE&&(null===(r=t.prevState)||void 0===r?void 0:r.kind)===ku.IMPLEMENTS))if(i.interfaceDef){if(null===(o=i.interfaceDef)||void 0===o?void 0:o.getInterfaces().find((({name:e})=>e===t.name)))return;const e=n.getType(t.name),r=null===(a=i.interfaceDef)||void 0===a?void 0:a.toConfig();i.interfaceDef=new Tn(Object.assign(Object.assign({},r),{interfaces:[...r.interfaces,e||new Tn({name:t.name,fields:{}})]}))}else if(i.objectTypeDef){if(null===(c=i.objectTypeDef)||void 0===c?void 0:c.getInterfaces().find((({name:e})=>e===t.name)))return;const e=n.getType(t.name),r=null===(u=i.objectTypeDef)||void 0===u?void 0:u.toConfig();i.objectTypeDef=new mn(Object.assign(Object.assign({},r),{interfaces:[...r.interfaces,e||new Tn({name:t.name,fields:{}})]}))}}));const c=i.interfaceDef||i.objectTypeDef,u=((null==c?void 0:c.getInterfaces())||[]).map((({name:e})=>e)),d=a.concat([...l].map((e=>({name:e})))).filter((({name:e})=>e!==(null==c?void 0:c.name)&&!u.includes(e)));return xs(e,d.map((e=>{const t={label:e.name,kind:Su.Interface,type:e};return(null==e?void 0:e.description)&&(t.documentation=e.description),t})))}(f,c,e,t,u);if(p===ku.SELECTION_SET||p===ku.FIELD||p===ku.ALIASED_FIELD)return function(e,t,n){var r;if(t.parentType){const{parentType:i}=t;let o=[];return"getFields"in i&&(o=Es(i.getFields())),en(i)&&o.push(vr),i===(null===(r=null==n?void 0:n.schema)||void 0===r?void 0:r.getQueryType())&&o.push(hr,mr),xs(e,o.map(((t,r)=>{var i;const o={sortText:String(r)+t.name,label:t.name,detail:String(t.type),documentation:null!==(i=t.description)&&void 0!==i?i:void 0,deprecated:Boolean(t.deprecationReason),isDeprecated:Boolean(t.deprecationReason),deprecationReason:t.deprecationReason,kind:Su.Field,labelDetails:{detail:" "+t.type.toString()},type:t.type};return(null==n?void 0:n.fillLeafsOnComplete)&&(o.insertText=_s(t),o.insertText||(o.insertText=ks(t.name,t.type,t.name+(e.state.needsAdvance?"":"\n"))),o.insertText&&(o.insertTextFormat=jl.Snippet,o.insertTextMode=Hl.adjustIndentation,o.command=_u)),o})))}return[]}(f,u,s);if(p===ku.ARGUMENTS||p===ku.ARGUMENT&&0===h){const{argDefs:e}=u;if(e)return xs(f,e.map((e=>{var t;return{label:e.name,insertText:Ss(e.name+": ",e.type),insertTextMode:Hl.adjustIndentation,insertTextFormat:jl.Snippet,command:_u,labelDetails:{detail:" "+String(e.type)},documentation:null!==(t=e.description)&&void 0!==t?t:void 0,kind:Su.Variable,type:e.type}})))}if((p===ku.OBJECT_VALUE||p===ku.OBJECT_FIELD&&0===h)&&u.objectFieldDefs){const e=Es(u.objectFieldDefs),t=p===ku.OBJECT_VALUE?Su.Value:Su.Field;return xs(f,e.map((e=>{var n;return{label:e.name,detail:String(e.type),documentation:null!==(n=null==e?void 0:e.description)&&void 0!==n?n:void 0,kind:t,type:e.type,insertText:Ss(e.name+": ",e.type),insertTextMode:Hl.adjustIndentation,insertTextFormat:jl.Snippet,command:_u}})))}if(p===ku.ENUM_VALUE||p===ku.LIST_VALUE&&1===h||p===ku.OBJECT_FIELD&&2===h||p===ku.ARGUMENT&&2===h)return function(e,t,n,r){const i=dn(t.inputType),o=Ou(n,r,e).filter((e=>e.detail===(null==i?void 0:i.name)));if(i instanceof Sn){return xs(e,i.getValues().map((e=>{var t;return{label:e.name,detail:String(i),documentation:null!==(t=e.description)&&void 0!==t?t:void 0,deprecated:Boolean(e.deprecationReason),isDeprecated:Boolean(e.deprecationReason),deprecationReason:e.deprecationReason,kind:Su.EnumMember,type:i}})).concat(o))}if(i===Bn)return xs(e,o.concat([{label:"true",detail:String(Bn),documentation:"Not false.",kind:Su.Variable,type:Bn},{label:"false",detail:String(Bn),documentation:"Not true.",kind:Su.Variable,type:Bn}]));return o}(f,u,t,e);if(p===ku.VARIABLE&&1===h){const n=dn(u.inputType);return xs(f,Ou(t,e,f).filter((e=>e.detail===(null==n?void 0:n.name))))}if(p===ku.TYPE_CONDITION&&1===h||p===ku.NAMED_TYPE&&null!=m&&m.kind===ku.TYPE_CONDITION)return function(e,t,n,r){let i;if(t.parentType)if(tn(t.parentType)){const e=nn(t.parentType),r=n.getPossibleTypes(e),o=Object.create(null);for(const t of r)for(const e of t.getInterfaces())o[e.name]=e;i=r.concat(Es(o))}else i=[t.parentType];else{i=Es(n.getTypeMap()).filter((e=>en(e)&&!e.name.startsWith("__")))}return xs(e,i.map((e=>{const t=dn(e);return{label:String(e),documentation:(null==t?void 0:t.description)||"",kind:Su.Field}})))}(f,u,e);if(p===ku.FRAGMENT_SPREAD&&1===h)return function(e,t,n,r,i){if(!r)return[];const o=n.getTypeMap(),a=function(e){let t;return Cu(e,(e=>{switch(e.kind){case"Query":case"ShortQuery":case"Mutation":case"Subscription":case"FragmentDefinition":t=e}})),t}(e.state),s=function(e){const t=[];return gu(e,((e,n)=>{n.kind===ku.FRAGMENT_DEFINITION&&n.name&&n.type&&t.push({kind:ku.FRAGMENT_DEFINITION,name:{kind:ye.NAME,value:n.name},selectionSet:{kind:ku.SELECTION_SET,selections:[]},typeCondition:{kind:ku.NAMED_TYPE,name:{kind:ye.NAME,value:n.type}}})})),t}(r);i&&i.length>0&&s.push(...i);const l=s.filter((e=>o[e.typeCondition.name.value]&&!(a&&a.kind===ku.FRAGMENT_DEFINITION&&a.name===e.name.value)&&en(t.parentType)&&en(o[e.typeCondition.name.value])&&Fn(n,t.parentType,o[e.typeCondition.name.value])));return xs(e,l.map((e=>({label:e.name.value,detail:String(o[e.typeCondition.name.value]),documentation:`fragment ${e.name.value} on ${e.typeCondition.name.value}`,labelDetails:{detail:`fragment ${e.name.value} on ${e.typeCondition.name.value}`},kind:Su.Field,type:o[e.typeCondition.name.value]}))))}(f,u,e,t,Array.isArray(i)?i:(e=>{const t=[];if(e)try{_t(it(e),{FragmentDefinition(e){t.push(e)}})}catch(a){return[]}return t})(i));const v=Lu(c);return v.kind===ku.FIELD_DEF?xs(f,Object.values(e.getTypeMap()).filter((e=>Jt(e)&&!e.name.startsWith("__"))).map((e=>({label:e.name,kind:Su.Function,insertText:(null==o?void 0:o.fillLeafsOnComplete)?e.name+"\n":e.name,insertTextMode:Hl.adjustIndentation})))):v.kind===ku.INPUT_VALUE_DEF&&2===h?xs(f,Object.values(e.getTypeMap()).filter((e=>Xt(e)&&!e.name.startsWith("__"))).map((e=>({label:e.name,kind:Su.Function,insertText:(null==o?void 0:o.fillLeafsOnComplete)?e.name+"\n$1":e.name,insertTextMode:Hl.adjustIndentation,insertTextFormat:jl.Snippet})))):p===ku.VARIABLE_DEFINITION&&2===h||p===ku.LIST_TYPE&&1===h||p===ku.NAMED_TYPE&&m&&(m.kind===ku.VARIABLE_DEFINITION||m.kind===ku.LIST_TYPE||m.kind===ku.NON_NULL_TYPE)?function(e,t,n){const r=t.getTypeMap(),i=Es(r).filter(Xt);return xs(e,i.map((e=>({label:e.name,documentation:(null==e?void 0:e.description)||"",kind:Su.Variable}))))}(f,e):p===ku.DIRECTIVE?function(e,t,n,r){var i;if(null===(i=t.prevState)||void 0===i?void 0:i.kind){const r=n.getDirectives().filter((e=>function(e,t){if(!(null==e?void 0:e.kind))return!1;const{kind:n,prevState:r}=e,{locations:i}=t;switch(n){case ku.QUERY:return i.includes(ve.QUERY);case ku.MUTATION:return i.includes(ve.MUTATION);case ku.SUBSCRIPTION:return i.includes(ve.SUBSCRIPTION);case ku.FIELD:case ku.ALIASED_FIELD:return i.includes(ve.FIELD);case ku.FRAGMENT_DEFINITION:return i.includes(ve.FRAGMENT_DEFINITION);case ku.FRAGMENT_SPREAD:return i.includes(ve.FRAGMENT_SPREAD);case ku.INLINE_FRAGMENT:return i.includes(ve.INLINE_FRAGMENT);case ku.SCHEMA_DEF:return i.includes(ve.SCHEMA);case ku.SCALAR_DEF:return i.includes(ve.SCALAR);case ku.OBJECT_TYPE_DEF:return i.includes(ve.OBJECT);case ku.FIELD_DEF:return i.includes(ve.FIELD_DEFINITION);case ku.INTERFACE_DEF:return i.includes(ve.INTERFACE);case ku.UNION_DEF:return i.includes(ve.UNION);case ku.ENUM_DEF:return i.includes(ve.ENUM);case ku.ENUM_VALUE:return i.includes(ve.ENUM_VALUE);case ku.INPUT_DEF:return i.includes(ve.INPUT_OBJECT);case ku.INPUT_VALUE_DEF:switch(null==r?void 0:r.kind){case ku.ARGUMENTS_DEF:return i.includes(ve.ARGUMENT_DEFINITION);case ku.INPUT_DEF:return i.includes(ve.INPUT_FIELD_DEFINITION)}}return!1}(t.prevState,e)));return xs(e,r.map((e=>({label:e.name,documentation:(null==e?void 0:e.description)||"",kind:Su.Function}))))}return[]}(f,c,e):p===ku.DIRECTIVE_DEF?function(e,t,n,r){const i=n.getDirectives().find((e=>e.name===t.name));return xs(e,(null==i?void 0:i.args.map((e=>({label:e.name,documentation:e.description||"",kind:Su.Field}))))||[])}(f,c,e):[]}const Au=[{label:"type",kind:Su.Function},{label:"interface",kind:Su.Function},{label:"union",kind:Su.Function},{label:"input",kind:Su.Function},{label:"scalar",kind:Su.Function},{label:"schema",kind:Su.Function}],Du=[{label:"query",kind:Su.Function},{label:"mutation",kind:Su.Function},{label:"subscription",kind:Su.Function},{label:"fragment",kind:Su.Function},{label:"{",kind:Su.Constructor}];const Iu=(e,t)=>{var n,r,i,o,a,s,l,c,u,d;return(null===(n=e.prevState)||void 0===n?void 0:n.kind)===t?e.prevState:(null===(i=null===(r=e.prevState)||void 0===r?void 0:r.prevState)||void 0===i?void 0:i.kind)===t?e.prevState.prevState:(null===(s=null===(a=null===(o=e.prevState)||void 0===o?void 0:o.prevState)||void 0===a?void 0:a.prevState)||void 0===s?void 0:s.kind)===t?e.prevState.prevState.prevState:(null===(d=null===(u=null===(c=null===(l=e.prevState)||void 0===l?void 0:l.prevState)||void 0===c?void 0:c.prevState)||void 0===u?void 0:u.prevState)||void 0===d?void 0:d.kind)===t?e.prevState.prevState.prevState.prevState:void 0};function Ou(e,t,n){let r,i=null;const o=Object.create({});return gu(e,((e,a)=>{var s;if((null==a?void 0:a.kind)===ku.VARIABLE&&a.name&&(i=a.name),(null==a?void 0:a.kind)===ku.NAMED_TYPE&&i){const e=Iu(a,ku.TYPE);(null==e?void 0:e.type)&&(r=t.getType(null==e?void 0:e.type))}if(i&&r&&!o[i]){const e="$"===n.string||"Variable"===(null===(s=null==n?void 0:n.state)||void 0===s?void 0:s.kind)?i:"$"+i;o[i]={detail:r.toString(),insertText:e,label:"$"+i,rawInsert:e,type:r,kind:Su.Variable},i=null,r=null}})),Es(o)}function Lu(e){return e.prevState&&e.kind&&[ku.NAMED_TYPE,ku.LIST_TYPE,ku.TYPE,ku.NON_NULL_TYPE].includes(e.kind)?Lu(e.prevState):e}var Fu={exports:{}};function Ru(e,t){if(null!=e)return e;var n=new Error(void 0!==t?t:"Got unexpected "+e);throw n.framesToPop=1,n}Fu.exports=Ru,Fu.exports.default=Ru,Object.defineProperty(Fu.exports,"__esModule",{value:!0});const Mu=a(Fu.exports),Pu=(e,t)=>{if(!t)return[];const n=new Map,r=new Set;_t(e,{FragmentDefinition(e){n.set(e.name.value,!0)},FragmentSpread(e){r.has(e.name.value)||r.add(e.name.value)}});const i=new Set;for(const a of r)!n.has(a)&&t.has(a)&&i.add(Mu(t.get(a)));const o=[];for(const a of i)_t(a,{FragmentSpread(e){!r.has(e.name.value)&&t.get(e.name.value)&&(i.add(Mu(t.get(e.name.value))),r.add(e.name.value))}}),n.has(a.name.value)||o.push(a);return o};class ju{constructor(e,t){this.containsPosition=e=>this.start.line===e.line?this.start.character<=e.character:this.end.line===e.line?this.end.character>=e.character:this.start.line<=e.line&&this.end.line>=e.line,this.start=e,this.end=t}setStart(e,t){this.start=new Vu(e,t)}setEnd(e,t){this.end=new Vu(e,t)}}class Vu{constructor(e,t){this.lessThanOrEqualTo=e=>this.line<e.line||this.line===e.line&&this.character<=e.character,this.line=e,this.character=t}setLine(e){this.line=e}setCharacter(e){this.character=e}}function Bu(e,t){const n=t?function(e,t){const n=Object.create(null);for(const r of t.definitions)if("OperationDefinition"===r.kind){const{variableDefinitions:t}=r;if(t)for(const{variable:r,type:i}of t){const t=Vr(e,i);t?n[r.name.value]=t:i.kind===ye.NAMED_TYPE&&"Float"===i.name.value&&(n[r.name.value]=jn)}}return n}(t,e):void 0,r=[];return _t(e,{OperationDefinition(e){r.push(e)}}),{variableToType:n,operations:r}}const $u={["Error"]:1,["Warning"]:2},Uu=(e,t)=>{if(!e)throw new Error(t)};function Hu(e,t=null,n,r,i){var o,a;let s=null,l="";i&&(l="string"==typeof i?i:i.reduce(((e,t)=>e+Dt(t)+"\n\n"),""));const c=l?`${e}\n\n${l}`:e;try{s=it(c)}catch(u){if(u instanceof ae){const e=function(e,t){const n=cu(),r=n.startState(),i=t.split("\n");Uu(i.length>=e.line,"Query text must have more lines than where the error happened");let o=null;for(let c=0;c<e.line;c++)for(o=new Jc(i[c]);!o.eol();){if("invalidchar"===n.token(o,r))break}Uu(o,"Expected Parser stream to be available.");const a=e.line-1,s=o.getStartOfToken(),l=o.getCurrentPosition();return new ju(new Vu(a,s),new Vu(a,l))}(null!==(a=null===(o=u.locations)||void 0===o?void 0:o[0])&&void 0!==a?a:{line:0},c);return[{severity:$u.Error,message:u.message,source:"GraphQL: Syntax",range:e}]}throw u}return function(e,t=null,n,r){if(!t)return[];const i=function(e,t,n,r,i){const o=mo.filter((e=>e!==ci&&e!==Kr));return n&&Array.prototype.push.apply(o,n),Eo(e,t,o).filter((e=>{if(e.message.includes("Unknown directive")&&e.nodes){const t=e.nodes[0];if(t&&t.kind===ye.DIRECTIVE){const e=t.name.value;if("arguments"===e||"argumentDefinitions"===e)return!1}}return!0}))}(t,e,n).flatMap((e=>qu(e,$u.Error,"Validation"))),o=Eo(t,e,[zo]).flatMap((e=>qu(e,$u.Warning,"Deprecation")));return i.concat(o)}(s,t,n)}function qu(e,t,n){if(!e.nodes)return[];const r=[];for(const[i,o]of e.nodes.entries()){const a="Variable"!==o.kind&&"name"in o&&void 0!==o.name?o.name:"variable"in o&&void 0!==o.variable?o.variable:o;if(a){Uu(e.locations,"GraphQL validation error requires locations.");const o=e.locations[i],s=zu(a),l=o.column+(s.end-s.start);r.push({source:`GraphQL: ${n}`,message:e.message,severity:t,range:new ju(new Vu(o.line-1,o.column-1),new Vu(o.line-1,l))})}}return r}function zu(e){const t=e.loc;return Uu(t,"Expected ASTNode to have a location."),t}
|
|
14
|
+
/*!
|
|
15
|
+
* is-primitive <https://github.com/jonschlinkert/is-primitive>
|
|
16
|
+
*
|
|
17
|
+
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
18
|
+
* Released under the MIT License.
|
|
19
|
+
*/var Wu=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)};
|
|
20
|
+
/*!
|
|
21
|
+
* isobject <https://github.com/jonschlinkert/isobject>
|
|
22
|
+
*
|
|
23
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
24
|
+
* Released under the MIT License.
|
|
25
|
+
*/function Gu(e){return!0===Wu(e)&&"[object Object]"===Object.prototype.toString.call(e)}
|
|
26
|
+
/*!
|
|
27
|
+
* set-value <https://github.com/jonschlinkert/set-value>
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Jon Schlinkert (https://github.com/jonschlinkert).
|
|
30
|
+
* Released under the MIT License.
|
|
31
|
+
*/
|
|
32
|
+
const{deleteProperty:Yu}=Reflect,Ku=function(e){return"object"==typeof e?null===e:"function"!=typeof e},Qu=function(e){var t,n;return!1!==Gu(e)&&("function"==typeof(t=e.constructor)&&(!1!==Gu(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf")))},Xu=e=>"object"==typeof e&&null!==e||"function"==typeof e,Ju=e=>{if(!Ku(e))throw new TypeError("Object keys must be strings or symbols");if((e=>"__proto__"===e||"constructor"===e||"prototype"===e)(e))throw new Error(`Cannot set unsafe key: "${e}"`)},Zu=(e,t,n)=>{const r=(e=>Array.isArray(e)?e.flat().map(String).join(","):e)(t?((e,t)=>{if("string"!=typeof e||!t)return e;let n=e+";";return void 0!==t.arrays&&(n+=`arrays=${t.arrays};`),void 0!==t.separator&&(n+=`separator=${t.separator};`),void 0!==t.split&&(n+=`split=${t.split};`),void 0!==t.merge&&(n+=`merge=${t.merge};`),void 0!==t.preservePaths&&(n+=`preservePaths=${t.preservePaths};`),n})(e,t):e);Ju(r);const i=nd.cache.get(r)||n();return nd.cache.set(r,i),i},ed=(e,t)=>t&&"function"==typeof t.split?t.split(e):"symbol"==typeof e?[e]:Array.isArray(e)?e:Zu(e,t,(()=>((e,t={})=>{const n=t.separator||".",r="/"!==n&&t.preservePaths;if("string"==typeof e&&!1!==r&&/\//.test(e))return[e];const i=[];let o="";const a=e=>{let t;""!==e.trim()&&Number.isInteger(t=Number(e))?i.push(t):i.push(e)};for(let s=0;s<e.length;s++){const t=e[s];"\\"!==t?t!==n?o+=t:(a(o),o=""):o+=e[++s]}return o&&a(o),i})(e,t))),td=(e,t,n,r)=>{if(Ju(t),void 0===n)Yu(e,t);else if(r&&r.merge){const i="function"===r.merge?r.merge:Object.assign;i&&Qu(e[t])&&Qu(n)?e[t]=i(e[t],n):e[t]=n}else e[t]=n;return e},nd=(e,t,n,r)=>{if(!t||!Xu(e))return e;const i=ed(t,r);let o=e;for(let a=0;a<i.length;a++){const e=i[a],t=i[a+1];if(Ju(e),void 0===t){td(o,e,n,r);break}"number"!=typeof t||Array.isArray(o[e])?(Xu(o[e])||(o[e]={}),o=o[e]):o=o[e]=[]}return e};nd.split=ed,nd.cache=new Map,nd.clear=()=>{nd.cache=new Map};const rd=a(nd);
|
|
33
|
+
/*!
|
|
34
|
+
* isobject <https://github.com/jonschlinkert/isobject>
|
|
35
|
+
*
|
|
36
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
37
|
+
* Released under the MIT License.
|
|
38
|
+
*/
|
|
39
|
+
/*!
|
|
40
|
+
* get-value <https://github.com/jonschlinkert/get-value>
|
|
41
|
+
*
|
|
42
|
+
* Copyright (c) 2014-2018, Jon Schlinkert.
|
|
43
|
+
* Released under the MIT License.
|
|
44
|
+
*/
|
|
45
|
+
const id=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)};var od=function(e,t,n){if(id(n)||(n={default:n}),!ld(e))return void 0!==n.default?n.default:e;"number"==typeof t&&(t=String(t));const r=Array.isArray(t),i="string"==typeof t,o=n.separator||".",a=n.joinChar||("string"==typeof o?o:".");if(!i&&!r)return e;if(i&&t in e)return sd(t,e,n)?e[t]:n.default;let s=r?t:function(e,t,n){if("function"==typeof n.split)return n.split(e);return e.split(t)}(t,o,n),l=s.length,c=0;do{let t=s[c];for("number"==typeof t&&(t=String(t));t&&"\\"===t.slice(-1);)t=ad([t.slice(0,-1),s[++c]||""],a,n);if(t in e){if(!sd(t,e,n))return n.default;e=e[t]}else{let r=!1,i=c+1;for(;i<l;)if(t=ad([t,s[i++]],a,n),r=t in e){if(!sd(t,e,n))return n.default;e=e[t],c=i-1;break}if(!r)return n.default}}while(++c<l&&ld(e));return c===l?e:n.default};function ad(e,t,n){return"function"==typeof n.join?n.join(e):e[0]+t+e[1]}function sd(e,t,n){return"function"!=typeof n.isValid||n.isValid(e,t)}function ld(e){return id(e)||Array.isArray(e)||"function"==typeof e}const cd=a(od);var ud=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}},dd={"text/plain":"Text","text/html":"Url",default:"Text"};var fd=function(e,t){var n,r,i,o,a,s,l=!1;t||(t={}),n=t.debug||!1;try{if(i=ud(),o=document.createRange(),a=document.getSelection(),(s=document.createElement("span")).textContent=e,s.ariaHidden="true",s.style.all="unset",s.style.position="fixed",s.style.top=0,s.style.clip="rect(0, 0, 0, 0)",s.style.whiteSpace="pre",s.style.webkitUserSelect="text",s.style.MozUserSelect="text",s.style.msUserSelect="text",s.style.userSelect="text",s.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var i=dd[t.format]||dd.default;window.clipboardData.setData(i,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(s),o.selectNodeContents(s),a.addRange(o),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");l=!0}catch(c){n&&console.error("unable to copy using execCommand: ",c),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(u){n&&console.error("unable to copy using clipboardData: ",u),n&&console.error("falling back to prompt"),r=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(r,e)}}finally{a&&("function"==typeof a.removeRange?a.removeRange(o):a.removeAllRanges()),s&&document.body.removeChild(s),i()}return l};const pd=a(fd);function hd(){return hd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hd.apply(null,arguments)}function md(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function vd(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function gd(...t){return e.useCallback(vd(...t),t)}function yd(t,n=[]){let r=[];const i=()=>{const n=r.map((t=>e.createContext(t)));return function(r){const i=(null==r?void 0:r[t])||n;return e.useMemo((()=>({[`__scope${t}`]:{...r,[t]:i}})),[r,i])}};return i.scopeName=t,[function(n,i){const o=e.createContext(i),a=r.length;function s(n){const{scope:r,children:i,...s}=n,l=(null==r?void 0:r[t][a])||o,c=e.useMemo((()=>s),Object.values(s));return e.createElement(l.Provider,{value:c},i)}return r=[...r,i],s.displayName=n+"Provider",[s,function(r,s){const l=(null==s?void 0:s[t][a])||o,c=e.useContext(l);if(c)return c;if(void 0!==i)return i;throw new Error(`\`${r}\` must be used within \`${n}\``)}]},bd(i,...n)]}function bd(...t){const n=t[0];if(1===t.length)return n;const r=()=>{const r=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const i=r.reduce(((e,{useScope:n,scopeName:r})=>({...e,...n(t)[`__scope${r}`]})),{});return e.useMemo((()=>({[`__scope${n.scopeName}`]:i})),[i])}};return r.scopeName=n.scopeName,r}const Ed=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?e.useLayoutEffect:()=>{},xd=i["useId".toString()]||(()=>{});let wd=0;function Td(e){const[t,n]=i.useState(xd());return Ed((()=>{n((e=>null!=e?e:String(wd++)))}),[e]),e||(t?`radix-${t}`:"")}function Cd(t){const n=e.useRef(t);return e.useEffect((()=>{n.current=t})),e.useMemo((()=>(...e)=>{var t;return null===(t=n.current)||void 0===t?void 0:t.call(n,...e)}),[])}function kd({prop:t,defaultProp:n,onChange:r=(()=>{})}){const[i,o]=function({defaultProp:t,onChange:n}){const r=e.useState(t),[i]=r,o=e.useRef(i),a=Cd(n);return e.useEffect((()=>{o.current!==i&&(a(i),o.current=i)}),[i,o,a]),r}({defaultProp:n,onChange:r}),a=void 0!==t,s=a?t:i,l=Cd(r);return[s,e.useCallback((e=>{if(a){const n="function"==typeof e?e(t):e;n!==t&&l(n)}else o(e)}),[a,t,o,l])]}const Sd=e.forwardRef(((t,n)=>{const{children:r,...i}=t,o=e.Children.toArray(r),a=o.find(Ad);if(a){const t=a.props.children,r=o.map((n=>n===a?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n));return e.createElement(_d,hd({},i,{ref:n}),e.isValidElement(t)?e.cloneElement(t,void 0,r):null)}return e.createElement(_d,hd({},i,{ref:n}),r)}));Sd.displayName="Slot";const _d=e.forwardRef(((t,n)=>{const{children:r,...i}=t;return e.isValidElement(r)?e.cloneElement(r,{...Dd(i,r.props),ref:n?vd(n,r.ref):r.ref}):e.Children.count(r)>1?e.Children.only(null):null}));_d.displayName="SlotClone";const Nd=({children:t})=>e.createElement(e.Fragment,null,t);function Ad(t){return e.isValidElement(t)&&t.type===Nd}function Dd(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...e)=>{o(...e),i(...e)}:i&&(n[r]=i):"style"===r?n[r]={...i,...o}:"className"===r&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const Id=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((t,n)=>{const r=e.forwardRef(((t,r)=>{const{asChild:i,...o}=t,a=i?Sd:n;return e.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),e.createElement(a,hd({},o,{ref:r}))}));return r.displayName=`Primitive.${n}`,{...t,[n]:r}}),{});function Od(e,n){e&&t.flushSync((()=>e.dispatchEvent(n)))}const Ld="dismissableLayer.update",Fd="dismissableLayer.pointerDownOutside",Rd="dismissableLayer.focusOutside";let Md;const Pd=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),jd=e.forwardRef(((t,n)=>{var r;const{disableOutsidePointerEvents:i=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...u}=t,d=e.useContext(Pd),[f,p]=e.useState(null),h=null!==(r=null==f?void 0:f.ownerDocument)&&void 0!==r?r:null===globalThis||void 0===globalThis?void 0:globalThis.document,[,m]=e.useState({}),v=gd(n,(e=>p(e))),g=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(y),E=f?g.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,w=E>=b,T=function(t,n=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=Cd(t),i=e.useRef(!1),o=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!i.current){let t=function(){Bd(Fd,r,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",o.current),o.current=t,n.addEventListener("click",o.current,{once:!0})):t()}i.current=!1},t=window.setTimeout((()=>{n.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",o.current)}}),[n,r]),{onPointerDownCapture:()=>i.current=!0}}((e=>{const t=e.target,n=[...d.branches].some((e=>e.contains(t)));w&&!n&&(null==a||a(e),null==l||l(e),e.defaultPrevented||null==c||c())}),h),C=function(t,n=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=Cd(t),i=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!i.current){Bd(Rd,r,{originalEvent:e},{discrete:!1})}};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)}),[n,r]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}((e=>{const t=e.target;[...d.branches].some((e=>e.contains(t)))||(null==s||s(e),null==l||l(e),e.defaultPrevented||null==c||c())}),h);return function(t,n=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=Cd(t);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&r(e)};return n.addEventListener("keydown",e),()=>n.removeEventListener("keydown",e)}),[r,n])}((e=>{E===d.layers.size-1&&(null==o||o(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))}),h),e.useEffect((()=>{if(f)return i&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(Md=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Vd(),()=>{i&&1===d.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=Md)}}),[f,h,i,d]),e.useEffect((()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Vd())}),[f,d]),e.useEffect((()=>{const e=()=>m({});return document.addEventListener(Ld,e),()=>document.removeEventListener(Ld,e)}),[]),e.createElement(Id.div,hd({},u,{ref:v,style:{pointerEvents:x?w?"auto":"none":void 0,...t.style},onFocusCapture:md(t.onFocusCapture,C.onFocusCapture),onBlurCapture:md(t.onBlurCapture,C.onBlurCapture),onPointerDownCapture:md(t.onPointerDownCapture,T.onPointerDownCapture)}))}));function Vd(){const e=new CustomEvent(Ld);document.dispatchEvent(e)}function Bd(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Od(i,o):i.dispatchEvent(o)}const $d="focusScope.autoFocusOnMount",Ud="focusScope.autoFocusOnUnmount",Hd={bubbles:!1,cancelable:!0},qd=e.forwardRef(((t,n)=>{const{loop:r=!1,trapped:i=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=t,[l,c]=e.useState(null),u=Cd(o),d=Cd(a),f=e.useRef(null),p=gd(n,(e=>c(e))),h=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect((()=>{if(i){let e=function(e){if(h.paused||!l)return;const t=e.target;l.contains(t)?f.current=t:Yd(f.current,{select:!0})},t=function(e){if(h.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||Yd(f.current,{select:!0}))},n=function(e){const t=document.activeElement;for(const n of e)n.removedNodes.length>0&&(null!=l&&l.contains(t)||Yd(l))};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[i,l,h.paused]),e.useEffect((()=>{if(l){Kd.add(h);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent($d,Hd);l.addEventListener($d,u),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Yd(r,{select:t}),document.activeElement!==n)return}((e=zd(l),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&Yd(l))}return()=>{l.removeEventListener($d,u),setTimeout((()=>{const e=new CustomEvent(Ud,Hd);l.addEventListener(Ud,d),l.dispatchEvent(e),e.defaultPrevented||Yd(null!=t?t:document.body,{select:!0}),l.removeEventListener(Ud,d),Kd.remove(h)}),0)}}var e}),[l,u,d,h]);const m=e.useCallback((e=>{if(!r&&!i)return;if(h.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[i,o]=function(e){const t=zd(e),n=Wd(t,e),r=Wd(t.reverse(),e);return[n,r]}(t);i&&o?e.shiftKey||n!==o?e.shiftKey&&n===i&&(e.preventDefault(),r&&Yd(o,{select:!0})):(e.preventDefault(),r&&Yd(i,{select:!0})):n===t&&e.preventDefault()}}),[r,i,h.paused]);return e.createElement(Id.div,hd({tabIndex:-1},s,{ref:p,onKeyDown:m}))}));function zd(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Wd(e,t){for(const n of e)if(!Gd(n,{upTo:t}))return n}function Gd(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Yd(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}const Kd=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=Qd(e,t),e.unshift(t)},remove(t){var n;e=Qd(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function Qd(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}const Xd=e.forwardRef(((n,r)=>{var i;const{container:o=(null===globalThis||void 0===globalThis||null===(i=globalThis.document)||void 0===i?void 0:i.body),...a}=n;return o?t.createPortal(e.createElement(Id.div,hd({},a,{ref:r})),o):null}));const Jd=n=>{const{present:r,children:i}=n,o=function(n){const[r,i]=e.useState(),o=e.useRef({}),a=e.useRef(n),s=e.useRef("none"),l=n?"mounted":"unmounted",[c,u]=function(t,n){return e.useReducer(((e,t)=>{const r=n[e][t];return null!=r?r:e}),t)}(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect((()=>{const e=Zd(o.current);s.current="mounted"===c?e:"none"}),[c]),Ed((()=>{const e=o.current,t=a.current;if(t!==n){const r=s.current,i=Zd(e);if(n)u("MOUNT");else if("none"===i||"none"===(null==e?void 0:e.display))u("UNMOUNT");else{u(t&&r!==i?"ANIMATION_OUT":"UNMOUNT")}a.current=n}}),[n,u]),Ed((()=>{if(r){const e=e=>{const n=Zd(o.current).includes(e.animationName);e.target===r&&n&&t.flushSync((()=>u("ANIMATION_END")))},n=e=>{e.target===r&&(s.current=Zd(o.current))};return r.addEventListener("animationstart",n),r.addEventListener("animationcancel",e),r.addEventListener("animationend",e),()=>{r.removeEventListener("animationstart",n),r.removeEventListener("animationcancel",e),r.removeEventListener("animationend",e)}}u("ANIMATION_END")}),[r,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:e.useCallback((e=>{e&&(o.current=getComputedStyle(e)),i(e)}),[])}}(r),a="function"==typeof i?i({present:o.isPresent}):e.Children.only(i),s=gd(o.ref,a.ref);return"function"==typeof i||o.isPresent?e.cloneElement(a,{ref:s}):null};function Zd(e){return(null==e?void 0:e.animationName)||"none"}Jd.displayName="Presence";let ef=0;function tf(){e.useEffect((()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:nf()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:nf()),ef++,()=>{1===ef&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),ef--}}),[])}function nf(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var rf=function(e,t){return(rf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function of(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}rf(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var af=function(){return af=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},af.apply(this,arguments)};function sf(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function lf(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function cf(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var uf="right-scroll-bar-position",df="width-before-scroll-bar";function ff(t,n){return r=null,i=function(e){return t.forEach((function(t){return function(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}(t,e)}))},(o=e.useState((function(){return{value:r,callback:i,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}}))[0]).callback=i,o.facade;var r,i,o}function pf(e){return e}var hf=function(e){var t=e.sideCar,n=sf(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return i.createElement(r,af({},n))};hf.isSideCarExport=!0;var mf=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=pf);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter((function(e){return e!==i}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var o=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(o)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=af({async:!0,ssr:!1},e),t}(),vf=function(){},gf=i.forwardRef((function(e,t){var n=i.useRef(null),r=i.useState({onScrollCapture:vf,onWheelCapture:vf,onTouchMoveCapture:vf}),o=r[0],a=r[1],s=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,h=e.noIsolation,m=e.inert,v=e.allowPinchZoom,g=e.as,y=void 0===g?"div":g,b=sf(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),E=p,x=ff([n,t]),w=af(af({},b),o);return i.createElement(i.Fragment,null,d&&i.createElement(E,{sideCar:mf,removeScrollBar:u,shards:f,noIsolation:h,inert:m,setCallbacks:a,allowPinchZoom:!!v,lockRef:n}),s?i.cloneElement(i.Children.only(l),af(af({},w),{ref:x})):i.createElement(y,af({},w,{className:c,ref:x}),l))}));gf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},gf.classNames={fullWidth:df,zeroRight:uf};function yf(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var bf=function(){var e=0,t=null;return{add:function(n){var r,i;0==e&&(t=yf())&&(i=n,(r=t).styleSheet?r.styleSheet.cssText=i:r.appendChild(document.createTextNode(i)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ef=function(){var e,t=(e=bf(),function(t,n){i.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},xf={left:0,top:0,right:0,gap:0},wf=function(e){return parseInt(e||"",10)||0},Tf=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return xf;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],i=t["padding"===e?"paddingRight":"marginRight"];return[wf(n),wf(r),wf(i)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Cf=Ef(),kf=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(i,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(uf," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(df," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(uf," .").concat(uf," {\n right: 0 ").concat(r,";\n }\n \n .").concat(df," .").concat(df," {\n margin-right: 0 ").concat(r,";\n }\n \n body {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},Sf=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r,a=i.useMemo((function(){return Tf(o)}),[o]);return i.createElement(Cf,{styles:kf(a,!t,o,n?"":"!important")})},_f=!1;if("undefined"!=typeof window)try{var Nf=Object.defineProperty({},"passive",{get:function(){return _f=!0,!0}});window.addEventListener("test",Nf,Nf),window.removeEventListener("test",Nf,Nf)}catch(gR){_f=!1}var Af=!!_f&&{passive:!1},Df=function(e,t){var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},If=function(e,t){var n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),Of(e,n)){var r=Lf(e,n);if(r[1]>r[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Of=function(e,t){return"v"===e?function(e){return Df(e,"overflowY")}(t):function(e){return Df(e,"overflowX")}(t)},Lf=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},Ff=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Rf=function(e){return[e.deltaX,e.deltaY]},Mf=function(e){return e&&"current"in e?e.current:e},Pf=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},jf=0,Vf=[];const Bf=($f=function(e){var t=i.useRef([]),n=i.useRef([0,0]),r=i.useRef(),o=i.useState(jf++)[0],a=i.useState((function(){return Ef()}))[0],s=i.useRef(e);i.useEffect((function(){s.current=e}),[e]),i.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=cf([e.lockRef.current],(e.shards||[]).map(Mf),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[e.inert,e.lockRef.current,e.shards]);var l=i.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!s.current.allowPinchZoom;var i,o=Ff(e),a=n.current,l="deltaX"in e?e.deltaX:a[0]-o[0],c="deltaY"in e?e.deltaY:a[1]-o[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=If(d,u);if(!f)return!0;if(f?i=d:(i="v"===d?"h":"v",f=If(d,u)),!f)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=i),!i)return!0;var p=r.current||i;return function(e,t,n,r,i){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),c=!1,u=a>0,d=0,f=0;do{var p=Lf(e,s),h=p[0],m=p[1]-p[2]-o*h;(h||m)&&Of(e,s)&&(d+=m,f+=h),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return u&&0===d?c=!0:u||0!==f||(c=!0),c}(p,t,e,"h"===p?l:c)}),[]),c=i.useCallback((function(e){var n=e;if(Vf.length&&Vf[Vf.length-1]===a){var r="deltaY"in n?Rf(n):Ff(n),i=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&(t=e.delta,i=r,t[0]===i[0]&&t[1]===i[1]);var t,i}))[0];if(i&&i.should)n.cancelable&&n.preventDefault();else if(!i){var o=(s.current.shards||[]).map(Mf).filter(Boolean).filter((function(e){return e.contains(n.target)}));(o.length>0?l(n,o[0]):!s.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),u=i.useCallback((function(e,n,r,i){var o={name:e,delta:n,target:r,should:i};t.current.push(o),setTimeout((function(){t.current=t.current.filter((function(e){return e!==o}))}),1)}),[]),d=i.useCallback((function(e){n.current=Ff(e),r.current=void 0}),[]),f=i.useCallback((function(t){u(t.type,Rf(t),t.target,l(t,e.lockRef.current))}),[]),p=i.useCallback((function(t){u(t.type,Ff(t),t.target,l(t,e.lockRef.current))}),[]);i.useEffect((function(){return Vf.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Af),document.addEventListener("touchmove",c,Af),document.addEventListener("touchstart",d,Af),function(){Vf=Vf.filter((function(e){return e!==a})),document.removeEventListener("wheel",c,Af),document.removeEventListener("touchmove",c,Af),document.removeEventListener("touchstart",d,Af)}}),[]);var h=e.removeScrollBar,m=e.inert;return i.createElement(i.Fragment,null,m?i.createElement(a,{styles:Pf(o)}):null,h?i.createElement(Sf,{gapMode:"margin"}):null)},mf.useMedium($f),hf);var $f,Uf=i.forwardRef((function(e,t){return i.createElement(gf,af({},e,{ref:t,sideCar:Bf}))}));Uf.classNames=gf.classNames;var Hf=new WeakMap,qf=new WeakMap,zf={},Wf=0,Gf=function(e){return e&&(e.host||Gf(e.parentNode))},Yf=function(e,t,n,r){var i=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=Gf(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);zf[n]||(zf[n]=new WeakMap);var o=zf[n],a=[],s=new Set,l=new Set(i),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};i.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(s.has(e))u(e);else{var t=e.getAttribute(r),i=null!==t&&"false"!==t,l=(Hf.get(e)||0)+1,c=(o.get(e)||0)+1;Hf.set(e,l),o.set(e,c),a.push(e),1===l&&i&&qf.set(e,!0),1===c&&e.setAttribute(n,"true"),i||e.setAttribute(r,"true")}}))};return u(t),s.clear(),Wf++,function(){a.forEach((function(e){var t=Hf.get(e)-1,i=o.get(e)-1;Hf.set(e,t),o.set(e,i),t||(qf.has(e)||e.removeAttribute(r),qf.delete(e)),i||e.removeAttribute(n)})),--Wf||(Hf=new WeakMap,Hf=new WeakMap,qf=new WeakMap,zf={})}},Kf=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Yf(r,i,n,"aria-hidden")):function(){return null}};const Qf="Dialog",[Xf,Jf]=yd(Qf),[Zf,ep]=Xf(Qf),tp=e.forwardRef(((t,n)=>{const{__scopeDialog:r,...i}=t,o=ep("DialogTrigger",r),a=gd(n,o.triggerRef);return e.createElement(Id.button,hd({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":bp(o.open)},i,{ref:a,onClick:md(t.onClick,o.onOpenToggle)}))})),np="DialogPortal",[rp,ip]=Xf(np,{forceMount:void 0}),op="DialogOverlay",ap=e.forwardRef(((t,n)=>{const r=ip(op,t.__scopeDialog),{forceMount:i=r.forceMount,...o}=t,a=ep(op,t.__scopeDialog);return a.modal?e.createElement(Jd,{present:i||a.open},e.createElement(sp,hd({},o,{ref:n}))):null})),sp=e.forwardRef(((t,n)=>{const{__scopeDialog:r,...i}=t,o=ep(op,r);return e.createElement(Uf,{as:Sd,allowPinchZoom:!0,shards:[o.contentRef]},e.createElement(Id.div,hd({"data-state":bp(o.open)},i,{ref:n,style:{pointerEvents:"auto",...i.style}})))})),lp="DialogContent",cp=e.forwardRef(((t,n)=>{const r=ip(lp,t.__scopeDialog),{forceMount:i=r.forceMount,...o}=t,a=ep(lp,t.__scopeDialog);return e.createElement(Jd,{present:i||a.open},a.modal?e.createElement(up,hd({},o,{ref:n})):e.createElement(dp,hd({},o,{ref:n})))})),up=e.forwardRef(((t,n)=>{const r=ep(lp,t.__scopeDialog),i=e.useRef(null),o=gd(n,r.contentRef,i);return e.useEffect((()=>{const e=i.current;if(e)return Kf(e)}),[]),e.createElement(fp,hd({},t,{ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:md(t.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null===(t=r.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:md(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:md(t.onFocusOutside,(e=>e.preventDefault()))}))})),dp=e.forwardRef(((t,n)=>{const r=ep(lp,t.__scopeDialog),i=e.useRef(!1),o=e.useRef(!1);return e.createElement(fp,hd({},t,{ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{var n,a;(null===(n=t.onCloseAutoFocus)||void 0===n||n.call(t,e),e.defaultPrevented)||(i.current||null===(a=r.triggerRef.current)||void 0===a||a.focus(),e.preventDefault());i.current=!1,o.current=!1},onInteractOutside:e=>{var n,a;null===(n=t.onInteractOutside)||void 0===n||n.call(t,e),e.defaultPrevented||(i.current=!0,"pointerdown"===e.detail.originalEvent.type&&(o.current=!0));const s=e.target;(null===(a=r.triggerRef.current)||void 0===a?void 0:a.contains(s))&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&o.current&&e.preventDefault()}}))})),fp=e.forwardRef(((t,n)=>{const{__scopeDialog:r,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=t,l=ep(lp,r),c=gd(n,e.useRef(null));return tf(),e.createElement(e.Fragment,null,e.createElement(qd,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:o,onUnmountAutoFocus:a},e.createElement(jd,hd({role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":bp(l.open)},s,{ref:c,onDismiss:()=>l.onOpenChange(!1)}))),!1)})),pp="DialogTitle",hp=e.forwardRef(((t,n)=>{const{__scopeDialog:r,...i}=t,o=ep(pp,r);return e.createElement(Id.h2,hd({id:o.titleId},i,{ref:n}))})),mp="DialogDescription",vp=e.forwardRef(((t,n)=>{const{__scopeDialog:r,...i}=t,o=ep(mp,r);return e.createElement(Id.p,hd({id:o.descriptionId},i,{ref:n}))})),gp="DialogClose",yp=e.forwardRef(((t,n)=>{const{__scopeDialog:r,...i}=t,o=ep(gp,r);return e.createElement(Id.button,hd({type:"button"},i,{ref:n,onClick:md(t.onClick,(()=>o.onOpenChange(!1)))}))}));function bp(e){return e?"open":"closed"}!function(t,n){const r=e.createContext(n);function i(t){const{children:n,...i}=t,o=e.useMemo((()=>i),Object.values(i));return e.createElement(r.Provider,{value:o},n)}i.displayName=t+"Provider"}("DialogTitleWarning",{contentName:lp,titleName:pp,docsSlug:"dialog"});const Ep=t=>{const{__scopeDialog:n,children:r,open:i,defaultOpen:o,onOpenChange:a,modal:s=!0}=t,l=e.useRef(null),c=e.useRef(null),[u=!1,d]=kd({prop:i,defaultProp:o,onChange:a});return e.createElement(Zf,{scope:n,triggerRef:l,contentRef:c,contentId:Td(),titleId:Td(),descriptionId:Td(),open:u,onOpenChange:d,onOpenToggle:e.useCallback((()=>d((e=>!e))),[d]),modal:s},r)},xp=tp,wp=t=>{const{__scopeDialog:n,forceMount:r,children:i,container:o}=t,a=ep(np,n);return e.createElement(rp,{scope:n,forceMount:r},e.Children.map(i,(t=>e.createElement(Jd,{present:r||a.open},e.createElement(Xd,{asChild:!0,container:o},t)))))},Tp=ap,Cp=cp,kp=hp,Sp=vp,_p=yp,Np=e.forwardRef(((t,n)=>e.createElement(Id.span,hd({},t,{ref:n,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}}))));function Ap(t){const n=t+"CollectionProvider",[r,i]=yd(n),[o,a]=r(n,{collectionRef:{current:null},itemMap:new Map}),s=t+"CollectionSlot",l=t+"CollectionItemSlot",c="data-radix-collection-item";return[{Provider:t=>{const{scope:n,children:r}=t,i=e.useRef(null),a=e.useRef(new Map).current;return e.createElement(o,{scope:n,itemMap:a,collectionRef:i},r)},Slot:e.forwardRef(((t,n)=>{const{scope:r,children:i}=t,o=gd(n,a(s,r).collectionRef);return e.createElement(Sd,{ref:o},i)})),ItemSlot:e.forwardRef(((t,n)=>{const{scope:r,children:i,...o}=t,s=e.useRef(null),u=gd(n,s),d=a(l,r);return e.useEffect((()=>(d.itemMap.set(s,{ref:s,...o}),()=>{d.itemMap.delete(s)}))),e.createElement(Sd,{[c]:"",ref:u},i)}))},function(n){const r=a(t+"CollectionConsumer",n);return e.useCallback((()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${c}]`));return Array.from(r.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[r.collectionRef,r.itemMap])},i]}const Dp=e.createContext(void 0);function Ip(t){const n=e.useContext(Dp);return t||n||"ltr"}function Op(e){return e.split("-")[1]}function Lp(e){return"y"===e?"height":"width"}function Fp(e){return e.split("-")[0]}function Rp(e){return["top","bottom"].includes(Fp(e))?"x":"y"}function Mp(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=Rp(t),l=Lp(s),c=r[l]/2-i[l]/2,u="x"===s;let d;switch(Fp(t)){case"top":d={x:o,y:r.y-i.height};break;case"bottom":d={x:o,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:a};break;case"left":d={x:r.x-i.width,y:a};break;default:d={x:r.x,y:r.y}}switch(Op(t)){case"start":d[s]-=c*(n&&u?-1:1);break;case"end":d[s]+=c*(n&&u?-1:1)}return d}function Pp(e,t){return"function"==typeof e?e(t):e}function jp(e){return"number"!=typeof e?(t=e,{top:0,right:0,bottom:0,left:0,...t}):{top:e,right:e,bottom:e,left:e};var t}function Vp(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function Bp(e,t){var n;void 0===t&&(t={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Pp(t,e),h=jp(p),m=s[f?"floating"===d?"reference":"floating":d],v=Vp(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(m)))||n?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),g="floating"===d?{...a.floating,x:r,y:i}:a.reference,y=await(null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),b=await(null==o.isElement?void 0:o.isElement(y))&&await(null==o.getScale?void 0:o.getScale(y))||{x:1,y:1},E=Vp(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:g,offsetParent:y,strategy:l}):g);return{top:(v.top-E.top+h.top)/b.y,bottom:(E.bottom-v.bottom+h.bottom)/b.y,left:(v.left-E.left+h.left)/b.x,right:(E.right-v.right+h.right)/b.x}}const $p=Math.min,Up=Math.max;function Hp(e,t,n){return Up(e,$p(t,n))}const qp=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:s}=t,{element:l,padding:c=0}=Pp(e,t)||{};if(null==l)return{};const u=jp(c),d={x:n,y:r},f=Rp(i),p=Lp(f),h=await a.getDimensions(l),m="y"===f,v=m?"top":"left",g=m?"bottom":"right",y=m?"clientHeight":"clientWidth",b=o.reference[p]+o.reference[f]-d[f]-o.floating[p],E=d[f]-o.reference[f],x=await(null==a.getOffsetParent?void 0:a.getOffsetParent(l));let w=x?x[y]:0;w&&await(null==a.isElement?void 0:a.isElement(x))||(w=s.floating[y]||o.floating[p]);const T=b/2-E/2,C=w/2-h[p]/2-1,k=$p(u[v],C),S=$p(u[g],C),_=k,N=w-h[p]-S,A=w/2-h[p]/2+T,D=Hp(_,A,N),I=null!=Op(i)&&A!=D&&o.reference[p]/2-(A<_?k:S)-h[p]/2<0;return{[f]:d[f]-(I?A<_?_-A:N-A:0),data:{[f]:D,centerOffset:A-D}}}}),zp=["top","right","bottom","left"];zp.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);const Wp={left:"right",right:"left",bottom:"top",top:"bottom"};function Gp(e){return e.replace(/left|right|bottom|top/g,(e=>Wp[e]))}const Yp={start:"end",end:"start"};function Kp(e){return e.replace(/start|end/g,(e=>Yp[e]))}const Qp=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:c=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:h=!0,...m}=Pp(e,t),v=Fp(r),g=Fp(a)===a,y=await(null==s.isRTL?void 0:s.isRTL(l.floating)),b=d||(g||!h?[Gp(a)]:function(e){const t=Gp(e);return[Kp(e),t,Kp(t)]}(a));d||"none"===p||b.push(...function(e,t,n,r){const i=Op(e);let o=function(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:a;default:return[]}}(Fp(e),"start"===n,r);return i&&(o=o.map((e=>e+"-"+i)),t&&(o=o.concat(o.map(Kp)))),o}(a,h,p,y));const E=[a,...b],x=await Bp(t,m),w=[];let T=(null==(n=i.flip)?void 0:n.overflows)||[];if(c&&w.push(x[v]),u){const{main:e,cross:t}=function(e,t,n){void 0===n&&(n=!1);const r=Op(e),i=Rp(e),o=Lp(i);let a="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Gp(a)),{main:a,cross:Gp(a)}}(r,o,y);w.push(x[e],x[t])}if(T=[...T,{placement:r,overflows:w}],!w.every((e=>e<=0))){var C,k;const e=((null==(C=i.flip)?void 0:C.index)||0)+1,t=E[e];if(t)return{data:{index:e,overflows:T},reset:{placement:t}};let n=null==(k=T.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:k.placement;if(!n)switch(f){case"bestFit":{var S;const e=null==(S=T.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:S[0];e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}};function Xp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Jp(e){return zp.some((t=>e[t]>=0))}const Zp=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Pp(e,t);switch(r){case"referenceHidden":{const e=Xp(await Bp(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Jp(e)}}}case"escaped":{const e=Xp(await Bp(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Jp(e)}}}default:return{}}}}};function eh(e){return"x"===e?"y":"x"}const th=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Pp(e,t),c={x:n,y:r},u=await Bp(t,l),d=Rp(Fp(i)),f=eh(d);let p=c[d],h=c[f];if(o){const e="y"===d?"bottom":"right";p=Hp(p+u["y"===d?"top":"left"],p,p-u[e])}if(a){const e="y"===f?"bottom":"right";h=Hp(h+u["y"===f?"top":"left"],h,h-u[e])}const m=s.fn({...t,[d]:p,[f]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},nh=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:o}=t,{apply:a=(()=>{}),...s}=Pp(e,t),l=await Bp(t,s),c=Fp(n),u=Op(n),d="x"===Rp(n),{width:f,height:p}=r.floating;let h,m;"top"===c||"bottom"===c?(h=c,m=u===(await(null==i.isRTL?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(m=c,h="end"===u?"top":"bottom");const v=p-l[h],g=f-l[m],y=!t.middlewareData.shift;let b=v,E=g;if(d){const e=f-l.left-l.right;E=u||y?$p(g,e):e}else{const e=p-l.top-l.bottom;b=u||y?$p(v,e):e}if(y&&!u){const e=Up(l.left,0),t=Up(l.right,0),n=Up(l.top,0),r=Up(l.bottom,0);d?E=f-2*(0!==e||0!==t?e+t:Up(l.left,l.right)):b=p-2*(0!==n||0!==r?n+r:Up(l.top,l.bottom))}await a({...t,availableWidth:E,availableHeight:b});const x=await i.getDimensions(o.floating);return f!==x.width||p!==x.height?{reset:{rects:!0}}:{}}}};function rh(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ih(e){return rh(e).getComputedStyle(e)}function oh(e){return e instanceof rh(e).Node}function ah(e){return oh(e)?(e.nodeName||"").toLowerCase():""}function sh(e){return e instanceof rh(e).HTMLElement}function lh(e){return e instanceof rh(e).Element}function ch(e){return"undefined"!=typeof ShadowRoot&&(e instanceof rh(e).ShadowRoot||e instanceof ShadowRoot)}function uh(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ih(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function dh(e){return["table","td","th"].includes(ah(e))}function fh(e){const t=ph(),n=ih(e);return"none"!==n.transform||"none"!==n.perspective||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function ph(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function hh(e){return["html","body","#document"].includes(ah(e))}const mh=Math.min,vh=Math.max,gh=Math.round;function yh(e){const t=ih(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=sh(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=gh(n)!==o||gh(r)!==a;return s&&(n=o,r=a),{width:n,height:r,fallback:s}}function bh(e){return lh(e)?e:e.contextElement}const Eh={x:1,y:1};function xh(e){const t=bh(e);if(!sh(t))return Eh;const n=t.getBoundingClientRect(),{width:r,height:i,fallback:o}=yh(t);let a=(o?gh(n.width):n.width)/r,s=(o?gh(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const wh={x:0,y:0};function Th(e,t,n){var r,i;if(void 0===t&&(t=!0),!ph())return wh;const o=e?rh(e):window;return!n||t&&n!==o?wh:{x:(null==(r=o.visualViewport)?void 0:r.offsetLeft)||0,y:(null==(i=o.visualViewport)?void 0:i.offsetTop)||0}}function Ch(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const i=e.getBoundingClientRect(),o=bh(e);let a=Eh;t&&(r?lh(r)&&(a=xh(r)):a=xh(e));const s=Th(o,n,r);let l=(i.left+s.x)/a.x,c=(i.top+s.y)/a.y,u=i.width/a.x,d=i.height/a.y;if(o){const e=rh(o),t=r&&lh(r)?rh(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=xh(n),t=n.getBoundingClientRect(),r=getComputedStyle(n);t.x+=(n.clientLeft+parseFloat(r.paddingLeft))*e.x,t.y+=(n.clientTop+parseFloat(r.paddingTop))*e.y,l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=t.x,c+=t.y,n=rh(n).frameElement}}return Vp({width:u,height:d,x:l,y:c})}function kh(e){return((oh(e)?e.ownerDocument:e.document)||window.document).documentElement}function Sh(e){return lh(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function _h(e){return Ch(kh(e)).left+Sh(e).scrollLeft}function Nh(e){if("html"===ah(e))return e;const t=e.assignedSlot||e.parentNode||ch(e)&&e.host||kh(e);return ch(t)?t.host:t}function Ah(e){const t=Nh(e);return hh(t)?t.ownerDocument.body:sh(t)&&uh(t)?t:Ah(t)}function Dh(e,t){var n;void 0===t&&(t=[]);const r=Ah(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=rh(r);return i?t.concat(o,o.visualViewport||[],uh(r)?r:[]):t.concat(r,Dh(r))}function Ih(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=rh(e),r=kh(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const e=ph();(!e||e&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=kh(e),n=Sh(e),r=e.ownerDocument.body,i=vh(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=vh(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+_h(e);const s=-n.scrollTop;return"rtl"===ih(r).direction&&(a+=vh(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}(kh(e));else if(lh(t))r=function(e,t){const n=Ch(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=sh(e)?xh(e):{x:1,y:1};return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}(t,n);else{const n=Th(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return Vp(r)}function Oh(e,t){const n=Nh(e);return!(n===t||!lh(n)||hh(n))&&("fixed"===ih(n).position||Oh(n,t))}function Lh(e,t){return sh(e)&&"fixed"!==ih(e).position?t?t(e):e.offsetParent:null}function Fh(e,t){const n=rh(e);if(!sh(e))return n;let r=Lh(e,t);for(;r&&dh(r)&&"static"===ih(r).position;)r=Lh(r,t);return r&&("html"===ah(r)||"body"===ah(r)&&"static"===ih(r).position&&!fh(r))?n:r||function(e){let t=Nh(e);for(;sh(t)&&!hh(t);){if(fh(t))return t;t=Nh(t)}return null}(e)||n}function Rh(e,t,n){const r=sh(t),i=kh(t),o="fixed"===n,a=Ch(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(r||!r&&!o)if(("body"!==ah(t)||uh(i))&&(s=Sh(t)),sh(t)){const e=Ch(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&(l.x=_h(i));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}const Mh={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=Dh(e).filter((e=>lh(e)&&"body"!==ah(e))),i=null;const o="fixed"===ih(e).position;let a=o?Nh(e):e;for(;lh(a)&&!hh(a);){const t=ih(a),n=fh(a);n||"fixed"!==t.position||(i=null),(o?!n&&!i:!n&&"static"===t.position&&i&&["absolute","fixed"].includes(i.position)||uh(a)&&!n&&Oh(e,a))?r=r.filter((e=>e!==a)):i=t,a=Nh(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=o[0],s=o.reduce(((e,n)=>{const r=Ih(t,n,i);return e.top=vh(r.top,e.top),e.right=mh(r.right,e.right),e.bottom=mh(r.bottom,e.bottom),e.left=vh(r.left,e.left),e}),Ih(t,a,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=sh(n),o=kh(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0},s={x:1,y:1};const l={x:0,y:0};if((i||!i&&"fixed"!==r)&&(("body"!==ah(n)||uh(o))&&(a=Sh(n)),sh(n))){const e=Ch(n);s=xh(n),l.x=e.x+n.clientLeft,l.y=e.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+l.x,y:t.y*s.y-a.scrollTop*s.y+l.y}},isElement:lh,getDimensions:function(e){return yh(e)},getOffsetParent:Fh,getDocumentElement:kh,getScale:xh,async getElementRects(e){let{reference:t,floating:n,strategy:r}=e;const i=this.getOffsetParent||Fh,o=this.getDimensions;return{reference:Rh(t,await i(n),r),floating:{x:0,y:0,...await o(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===ih(e).direction};function Ph(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i||o?[...lh(e)?Dh(e):e.contextElement?Dh(e.contextElement):[],...Dh(t)]:[];l.forEach((e=>{const t=!lh(e)&&e.toString().includes("V");!i||s&&!t||e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)}));let c,u=null;a&&(u=new ResizeObserver((()=>{n()})),lh(e)&&!s&&u.observe(e),lh(e)||!e.contextElement||s||u.observe(e.contextElement),u.observe(t));let d=s?Ch(e):null;return s&&function t(){const r=Ch(e);!d||r.x===d.x&&r.y===d.y&&r.width===d.width&&r.height===d.height||n(),d=r,c=requestAnimationFrame(t)}(),n(),()=>{var e;l.forEach((e=>{i&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)})),null==(e=u)||e.disconnect(),u=null,s&&cancelAnimationFrame(c)}}const jh=(e,t,n)=>{const r=new Map,i={platform:Mh,...n},o={...i.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Mp(c,r,l),f=r,p={},h=0;for(let m=0;m<s.length;m++){const{name:n,fn:o}=s[m],{x:v,y:g,data:y,reset:b}=await o({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=v?v:u,d=null!=g?g:d,p={...p,[n]:{...p[n],...y}},b&&h<=50&&(h++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:i}):b.rects),({x:u,y:d}=Mp(c,f,l))),m=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:p}})(e,t,{...i,platform:o})};var Vh="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function Bh(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;0!=r--;)if(!Bh(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){const n=i[r];if(("_owner"!==n||!e.$$typeof)&&!Bh(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function $h(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Uh(e,t){const n=$h(e);return Math.round(t*n)/n}function Hh(e){const t=i.useRef(e);return Vh((()=>{t.current=e})),t}const qh="Popper",[zh,Wh]=yd(qh),[Gh,Yh]=zh(qh),Kh=e.forwardRef(((t,n)=>{const{__scopePopper:r,virtualRef:i,...o}=t,a=Yh("PopperAnchor",r),s=e.useRef(null),l=gd(n,s);return e.useEffect((()=>{a.onAnchorChange((null==i?void 0:i.current)||s.current)})),i?null:e.createElement(Id.div,hd({},o,{ref:l}))})),Qh="PopperContent",[Xh,Jh]=zh(Qh),Zh=e.forwardRef(((t,n)=>{var r,a,s,l,c,u,d,f;const{__scopePopper:p,side:h="bottom",sideOffset:m=0,align:v="center",alignOffset:g=0,arrowPadding:y=0,collisionBoundary:b=[],collisionPadding:E=0,sticky:x="partial",hideWhenDetached:w=!1,avoidCollisions:T=!0,onPlaced:C,...k}=t,S=Yh(Qh,p),[_,N]=e.useState(null),A=gd(n,(e=>N(e))),[D,I]=e.useState(null),O=function(t){const[n,r]=e.useState(void 0);return Ed((()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver((e=>{if(!Array.isArray(e))return;if(!e.length)return;const n=e[0];let i,o;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,o=t.blockSize}else i=t.offsetWidth,o=t.offsetHeight;r({width:i,height:o})}));return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}r(void 0)}),[t]),n}(D),L=null!==(r=null==O?void 0:O.width)&&void 0!==r?r:0,F=null!==(a=null==O?void 0:O.height)&&void 0!==a?a:0,R=h+("center"!==v?"-"+v:""),M="number"==typeof E?E:{top:0,right:0,bottom:0,left:0,...E},P=Array.isArray(b)?b:[b],j=P.length>0,V={padding:M,boundary:P.filter(em),altBoundary:j},{refs:B,floatingStyles:$,placement:U,isPositioned:H,middlewareData:q}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:s,floating:l}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[f,p]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=i.useState(r);Bh(h,r)||m(r);const[v,g]=i.useState(null),[y,b]=i.useState(null),E=i.useCallback((e=>{e!=C.current&&(C.current=e,g(e))}),[g]),x=i.useCallback((e=>{e!==k.current&&(k.current=e,b(e))}),[b]),w=s||v,T=l||y,C=i.useRef(null),k=i.useRef(null),S=i.useRef(f),_=Hh(u),N=Hh(a),A=i.useCallback((()=>{if(!C.current||!k.current)return;const e={placement:t,strategy:n,middleware:h};N.current&&(e.platform=N.current),jh(C.current,k.current,e).then((e=>{const t={...e,isPositioned:!0};D.current&&!Bh(S.current,t)&&(S.current=t,o.flushSync((()=>{p(t)})))}))}),[h,t,n,N]);Vh((()=>{!1===d&&S.current.isPositioned&&(S.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[d]);const D=i.useRef(!1);Vh((()=>(D.current=!0,()=>{D.current=!1})),[]),Vh((()=>{if(w&&(C.current=w),T&&(k.current=T),w&&T){if(_.current)return _.current(w,T,A);A()}}),[w,T,A,_]);const I=i.useMemo((()=>({reference:C,floating:k,setReference:E,setFloating:x})),[E,x]),O=i.useMemo((()=>({reference:w,floating:T})),[w,T]),L=i.useMemo((()=>{const e={position:n,left:0,top:0};if(!O.floating)return e;const t=Uh(O.floating,f.x),r=Uh(O.floating,f.y);return c?{...e,transform:"translate("+t+"px, "+r+"px)",...$h(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,c,O.floating,f.x,f.y]);return i.useMemo((()=>({...f,update:A,refs:I,elements:O,floatingStyles:L})),[f,A,I,O,L])}({strategy:"fixed",placement:R,whileElementsMounted:Ph,elements:{reference:S.anchor},middleware:[(G={mainAxis:m+F,alignmentAxis:g},void 0===G&&(G=0),{name:"offset",options:G,async fn(e){const{x:t,y:n}=e,r=await async function(e,t){const{placement:n,platform:r,elements:i}=e,o=await(null==r.isRTL?void 0:r.isRTL(i.floating)),a=Fp(n),s=Op(n),l="x"===Rp(n),c=["left","top"].includes(a)?-1:1,u=o&&l?-1:1,d=Pp(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof h&&(p="end"===s?-1*h:h),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(e,G);return{x:t+r.x,y:n+r.y,data:r}}}),T&&th({mainAxis:!0,crossAxis:!1,limiter:"partial"===x?(void 0===W&&(W={}),{options:W,fn(e){const{x:t,y:n,placement:r,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:s=!0,crossAxis:l=!0}=Pp(W,e),c={x:t,y:n},u=Rp(r),d=eh(u);let f=c[u],p=c[d];const h=Pp(a,e),m="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(s){const e="y"===u?"height":"width",t=i.reference[u]-i.floating[e]+m.mainAxis,n=i.reference[u]+i.reference[e]-m.mainAxis;f<t?f=t:f>n&&(f=n)}if(l){var v,g;const e="y"===u?"width":"height",t=["top","left"].includes(Fp(r)),n=i.reference[d]-i.floating[e]+(t&&(null==(v=o.offset)?void 0:v[d])||0)+(t?0:m.crossAxis),a=i.reference[d]+i.reference[e]+(t?0:(null==(g=o.offset)?void 0:g[d])||0)-(t?m.crossAxis:0);p<n?p=n:p>a&&(p=a)}return{[u]:f,[d]:p}}}):void 0,...V}),T&&Qp({...V}),nh({...V,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:i,height:o}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${n}px`),a.setProperty("--radix-popper-available-height",`${r}px`),a.setProperty("--radix-popper-anchor-width",`${i}px`),a.setProperty("--radix-popper-anchor-height",`${o}px`)}}),D&&(z={element:D,padding:y},{name:"arrow",options:z,fn(e){const{element:t,padding:n}="function"==typeof z?z(e):z;return t&&(r=t,{}.hasOwnProperty.call(r,"current"))?null!=t.current?qp({element:t.current,padding:n}).fn(e):{}:t?qp({element:t,padding:n}).fn(e):{};var r}}),tm({arrowWidth:L,arrowHeight:F}),w&&Zp({strategy:"referenceHidden"})]});var z,W,G;const[Y,K]=nm(U),Q=Cd(C);Ed((()=>{H&&(null==Q||Q())}),[H,Q]);const X=null===(s=q.arrow)||void 0===s?void 0:s.x,J=null===(l=q.arrow)||void 0===l?void 0:l.y,Z=0!==(null===(c=q.arrow)||void 0===c?void 0:c.centerOffset),[ee,te]=e.useState();return Ed((()=>{_&&te(window.getComputedStyle(_).zIndex)}),[_]),e.createElement("div",{ref:B.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:H?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ee,"--radix-popper-transform-origin":[null===(u=q.transformOrigin)||void 0===u?void 0:u.x,null===(d=q.transformOrigin)||void 0===d?void 0:d.y].join(" ")},dir:t.dir},e.createElement(Xh,{scope:p,placedSide:Y,onArrowChange:I,arrowX:X,arrowY:J,shouldHideArrow:Z},e.createElement(Id.div,hd({"data-side":Y,"data-align":K},k,{ref:A,style:{...k.style,animation:H?void 0:"none",opacity:null!==(f=q.hide)&&void 0!==f&&f.referenceHidden?0:void 0}}))))}));function em(e){return null!==e}const tm=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:c}=t,u=0!==(null===(n=c.arrow)||void 0===n?void 0:n.centerOffset),d=u?0:e.arrowWidth,f=u?0:e.arrowHeight,[p,h]=nm(s),m={start:"0%",center:"50%",end:"100%"}[h],v=(null!==(r=null===(i=c.arrow)||void 0===i?void 0:i.x)&&void 0!==r?r:0)+d/2,g=(null!==(o=null===(a=c.arrow)||void 0===a?void 0:a.y)&&void 0!==o?o:0)+f/2;let y="",b="";return"bottom"===p?(y=u?m:`${v}px`,b=-f+"px"):"top"===p?(y=u?m:`${v}px`,b=`${l.floating.height+f}px`):"right"===p?(y=-f+"px",b=u?m:`${g}px`):"left"===p&&(y=`${l.floating.width+f}px`,b=u?m:`${g}px`),{data:{x:y,y:b}}}});function nm(e){const[t,n="center"]=e.split("-");return[t,n]}const rm=t=>{const{__scopePopper:n,children:r}=t,[i,o]=e.useState(null);return e.createElement(Gh,{scope:n,anchor:i,onAnchorChange:o},r)},im=Kh,om=Zh,am="rovingFocusGroup.onEntryFocus",sm={bubbles:!1,cancelable:!0},lm="RovingFocusGroup",[cm,um,dm]=Ap(lm),[fm,pm]=yd(lm,[dm]),[hm,mm]=fm(lm),vm=e.forwardRef(((t,n)=>e.createElement(cm.Provider,{scope:t.__scopeRovingFocusGroup},e.createElement(cm.Slot,{scope:t.__scopeRovingFocusGroup},e.createElement(gm,hd({},t,{ref:n})))))),gm=e.forwardRef(((t,n)=>{const{__scopeRovingFocusGroup:r,orientation:i,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,...d}=t,f=e.useRef(null),p=gd(n,f),h=Ip(a),[m=null,v]=kd({prop:s,defaultProp:l,onChange:c}),[g,y]=e.useState(!1),b=Cd(u),E=um(r),x=e.useRef(!1),[w,T]=e.useState(0);return e.useEffect((()=>{const e=f.current;if(e)return e.addEventListener(am,b),()=>e.removeEventListener(am,b)}),[b]),e.createElement(hm,{scope:r,orientation:i,dir:h,loop:o,currentTabStopId:m,onItemFocus:e.useCallback((e=>v(e)),[v]),onItemShiftTab:e.useCallback((()=>y(!0)),[]),onFocusableItemAdd:e.useCallback((()=>T((e=>e+1))),[]),onFocusableItemRemove:e.useCallback((()=>T((e=>e-1))),[])},e.createElement(Id.div,hd({tabIndex:g||0===w?-1:0,"data-orientation":i},d,{ref:p,style:{outline:"none",...t.style},onMouseDown:md(t.onMouseDown,(()=>{x.current=!0})),onFocus:md(t.onFocus,(e=>{const t=!x.current;if(e.target===e.currentTarget&&t&&!g){const t=new CustomEvent(am,sm);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=E().filter((e=>e.focusable));Em([e.find((e=>e.active)),e.find((e=>e.id===m)),...e].filter(Boolean).map((e=>e.ref.current)))}}x.current=!1})),onBlur:md(t.onBlur,(()=>y(!1)))})))})),ym=e.forwardRef(((t,n)=>{const{__scopeRovingFocusGroup:r,focusable:i=!0,active:o=!1,tabStopId:a,...s}=t,l=Td(),c=a||l,u=mm("RovingFocusGroupItem",r),d=u.currentTabStopId===c,f=um(r),{onFocusableItemAdd:p,onFocusableItemRemove:h}=u;return e.useEffect((()=>{if(i)return p(),()=>h()}),[i,p,h]),e.createElement(cm.ItemSlot,{scope:r,id:c,focusable:i,active:o},e.createElement(Id.span,hd({tabIndex:d?0:-1,"data-orientation":u.orientation},s,{ref:n,onMouseDown:md(t.onMouseDown,(e=>{i?u.onItemFocus(c):e.preventDefault()})),onFocus:md(t.onFocus,(()=>u.onItemFocus(c))),onKeyDown:md(t.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:bm[r]}(e,u.orientation,u.dir);if(void 0!==t){e.preventDefault();let i=f().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)i.reverse();else if("prev"===t||"next"===t){"prev"===t&&i.reverse();const o=i.indexOf(e.currentTarget);i=u.loop?(r=o+1,(n=i).map(((e,t)=>n[(r+t)%n.length]))):i.slice(o+1)}setTimeout((()=>Em(i)))}var n,r}))})))})),bm={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Em(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}const xm=vm,wm=ym,Tm=["Enter"," "],Cm=["ArrowUp","PageDown","End"],km=["ArrowDown","PageUp","Home",...Cm],Sm="Menu",[_m,Nm,Am]=Ap(Sm),[Dm,Im]=yd(Sm,[Am,Wh,pm]),Om=Wh(),Lm=pm(),[Fm,Rm]=Dm(Sm),[Mm,Pm]=Dm(Sm),jm=e.forwardRef(((t,n)=>{const{__scopeMenu:r,...i}=t,o=Om(r);return e.createElement(im,hd({},o,i,{ref:n}))})),Vm="MenuPortal",[Bm,$m]=Dm(Vm,{forceMount:void 0}),Um="MenuContent",[Hm,qm]=Dm(Um),zm=e.forwardRef(((t,n)=>{const r=$m(Um,t.__scopeMenu),{forceMount:i=r.forceMount,...o}=t,a=Rm(Um,t.__scopeMenu),s=Pm(Um,t.__scopeMenu);return e.createElement(_m.Provider,{scope:t.__scopeMenu},e.createElement(Jd,{present:i||a.open},e.createElement(_m.Slot,{scope:t.__scopeMenu},s.modal?e.createElement(Wm,hd({},o,{ref:n})):e.createElement(Gm,hd({},o,{ref:n})))))})),Wm=e.forwardRef(((t,n)=>{const r=Rm(Um,t.__scopeMenu),i=e.useRef(null),o=gd(n,i);return e.useEffect((()=>{const e=i.current;if(e)return Kf(e)}),[]),e.createElement(Ym,hd({},t,{ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:md(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)}))})),Gm=e.forwardRef(((t,n)=>{const r=Rm(Um,t.__scopeMenu);return e.createElement(Ym,hd({},t,{ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)}))})),Ym=e.forwardRef(((t,n)=>{const{__scopeMenu:r,loop:i=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:h,disableOutsideScroll:m,...v}=t,g=Rm(Um,r),y=Pm(Um,r),b=Om(r),E=Lm(r),x=Nm(r),[w,T]=e.useState(null),C=e.useRef(null),k=gd(n,C,g.onContentChange),S=e.useRef(0),_=e.useRef(""),N=e.useRef(0),A=e.useRef(null),D=e.useRef("right"),I=e.useRef(0),O=m?Uf:e.Fragment,L=m?{as:Sd,allowPinchZoom:!0}:void 0,F=e=>{var t,n;const r=_.current+e,i=x().filter((e=>!e.disabled)),o=document.activeElement,a=null===(t=i.find((e=>e.ref.current===o)))||void 0===t?void 0:t.textValue,s=function(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0])),i=r?t[0]:t,o=n?e.indexOf(n):-1;let a=(s=e,l=Math.max(o,0),s.map(((e,t)=>s[(l+t)%s.length])));var s,l;1===i.length&&(a=a.filter((e=>e!==n)));const c=a.find((e=>e.toLowerCase().startsWith(i.toLowerCase())));return c!==n?c:void 0}(i.map((e=>e.textValue)),r,a),l=null===(n=i.find((e=>e.textValue===s)))||void 0===n?void 0:n.ref.current;!function e(t){_.current=t,window.clearTimeout(S.current),""!==t&&(S.current=window.setTimeout((()=>e("")),1e3))}(r),l&&setTimeout((()=>l.focus()))};e.useEffect((()=>()=>window.clearTimeout(S.current)),[]),tf();const R=e.useCallback((e=>{var t,n;return D.current===(null===(t=A.current)||void 0===t?void 0:t.side)&&function(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return function(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const e=t[o].x,s=t[o].y,l=t[a].x,c=t[a].y;s>r!=c>r&&n<(l-e)*(r-s)/(c-s)+e&&(i=!i)}return i}(n,t)}(e,null===(n=A.current)||void 0===n?void 0:n.area)}),[]);return e.createElement(Hm,{scope:r,searchRef:_,onItemEnter:e.useCallback((e=>{R(e)&&e.preventDefault()}),[R]),onItemLeave:e.useCallback((e=>{var t;R(e)||(null===(t=C.current)||void 0===t||t.focus(),T(null))}),[R]),onTriggerLeave:e.useCallback((e=>{R(e)&&e.preventDefault()}),[R]),pointerGraceTimerRef:N,onPointerGraceIntentChange:e.useCallback((e=>{A.current=e}),[])},e.createElement(O,L,e.createElement(qd,{asChild:!0,trapped:o,onMountAutoFocus:md(a,(e=>{var t;e.preventDefault(),null===(t=C.current)||void 0===t||t.focus()})),onUnmountAutoFocus:s},e.createElement(jd,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:h},e.createElement(xm,hd({asChild:!0},E,{dir:y.dir,orientation:"vertical",loop:i,currentTabStopId:w,onCurrentTabStopIdChange:T,onEntryFocus:md(c,(e=>{y.isUsingKeyboardRef.current||e.preventDefault()}))}),e.createElement(om,hd({role:"menu","aria-orientation":"vertical","data-state":(M=g.open,M?"open":"closed"),"data-radix-menu-content":"",dir:y.dir},b,v,{ref:k,style:{outline:"none",...v.style},onKeyDown:md(v.onKeyDown,(e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&F(e.key));const i=C.current;if(e.target!==i)return;if(!km.includes(e.key))return;e.preventDefault();const o=x().filter((e=>!e.disabled)).map((e=>e.ref.current));Cm.includes(e.key)&&o.reverse(),function(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}(o)})),onBlur:md(t.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(S.current),_.current="")})),onPointerMove:md(t.onPointerMove,ov((e=>{const t=e.target,n=I.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>I.current?"right":"left";D.current=t,I.current=e.clientX}})))})))))));var M})),Km="MenuItem",Qm="menu.itemSelect",Xm=e.forwardRef(((t,n)=>{const{disabled:r=!1,onSelect:i,...o}=t,a=e.useRef(null),s=Pm(Km,t.__scopeMenu),l=qm(Km,t.__scopeMenu),c=gd(n,a),u=e.useRef(!1);return e.createElement(Jm,hd({},o,{ref:c,disabled:r,onClick:md(t.onClick,(()=>{const e=a.current;if(!r&&e){const t=new CustomEvent(Qm,{bubbles:!0,cancelable:!0});e.addEventListener(Qm,(e=>null==i?void 0:i(e)),{once:!0}),Od(e,t),t.defaultPrevented?u.current=!1:s.onClose()}})),onPointerDown:e=>{var n;null===(n=t.onPointerDown)||void 0===n||n.call(t,e),u.current=!0},onPointerUp:md(t.onPointerUp,(e=>{var t;u.current||null===(t=e.currentTarget)||void 0===t||t.click()})),onKeyDown:md(t.onKeyDown,(e=>{const t=""!==l.searchRef.current;r||t&&" "===e.key||Tm.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))}))})),Jm=e.forwardRef(((t,n)=>{const{__scopeMenu:r,disabled:i=!1,textValue:o,...a}=t,s=qm(Km,r),l=Lm(r),c=e.useRef(null),u=gd(n,c),[d,f]=e.useState(!1),[p,h]=e.useState("");return e.useEffect((()=>{const e=c.current;var t;e&&h((null!==(t=e.textContent)&&void 0!==t?t:"").trim())}),[a.children]),e.createElement(_m.ItemSlot,{scope:r,disabled:i,textValue:null!=o?o:p},e.createElement(wm,hd({asChild:!0},l,{focusable:!i}),e.createElement(Id.div,hd({role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0},a,{ref:u,onPointerMove:md(t.onPointerMove,ov((e=>{if(i)s.onItemLeave(e);else if(s.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus()}}))),onPointerLeave:md(t.onPointerLeave,ov((e=>s.onItemLeave(e)))),onFocus:md(t.onFocus,(()=>f(!0))),onBlur:md(t.onBlur,(()=>f(!1)))}))))})),[Zm,ev]=Dm("MenuRadioGroup",{value:void 0,onValueChange:()=>{}}),[tv,nv]=Dm("MenuItemIndicator",{checked:!1}),[rv,iv]=Dm("MenuSub");function ov(e){return t=>"mouse"===t.pointerType?e(t):void 0}const av=t=>{const{__scopeMenu:n,open:r=!1,children:i,dir:o,onOpenChange:a,modal:s=!0}=t,l=Om(n),[c,u]=e.useState(null),d=e.useRef(!1),f=Cd(a),p=Ip(o);return e.useEffect((()=>{const e=()=>{d.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>d.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}}),[]),e.createElement(rm,l,e.createElement(Fm,{scope:n,open:r,onOpenChange:f,content:c,onContentChange:u},e.createElement(Mm,{scope:n,onClose:e.useCallback((()=>f(!1)),[f]),isUsingKeyboardRef:d,dir:p,modal:s},i)))},sv=jm,lv=t=>{const{__scopeMenu:n,forceMount:r,children:i,container:o}=t,a=Rm(Vm,n);return e.createElement(Bm,{scope:n,forceMount:r},e.createElement(Jd,{present:r||a.open},e.createElement(Xd,{asChild:!0,container:o},i)))},cv=zm,uv=Xm,dv="DropdownMenu",[fv,pv]=yd(dv,[Im]),hv=Im(),[mv,vv]=fv(dv),gv=t=>{const{__scopeDropdownMenu:n,children:r,dir:i,open:o,defaultOpen:a,onOpenChange:s,modal:l=!0}=t,c=hv(n),u=e.useRef(null),[d=!1,f]=kd({prop:o,defaultProp:a,onChange:s});return e.createElement(mv,{scope:n,triggerId:Td(),triggerRef:u,contentId:Td(),open:d,onOpenChange:f,onOpenToggle:e.useCallback((()=>f((e=>!e))),[f]),modal:l},e.createElement(av,hd({},c,{open:d,onOpenChange:f,dir:i,modal:l}),r))},yv=e.forwardRef(((t,n)=>{const{__scopeDropdownMenu:r,disabled:i=!1,...o}=t,a=vv("DropdownMenuTrigger",r),s=hv(r);return e.createElement(sv,hd({asChild:!0},s),e.createElement(Id.button,hd({type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":i?"":void 0,disabled:i},o,{ref:vd(n,a.triggerRef),onPointerDown:md(t.onPointerDown,(e=>{i||0!==e.button||!1!==e.ctrlKey||(a.onOpenToggle(),a.open||e.preventDefault())})),onKeyDown:md(t.onKeyDown,(e=>{i||(["Enter"," "].includes(e.key)&&a.onOpenToggle(),"ArrowDown"===e.key&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())}))})))})),bv=t=>{const{__scopeDropdownMenu:n,...r}=t,i=hv(n);return e.createElement(lv,hd({},i,r))},Ev=e.forwardRef(((t,n)=>{const{__scopeDropdownMenu:r,...i}=t,o=vv("DropdownMenuContent",r),a=hv(r),s=e.useRef(!1);return e.createElement(cv,hd({id:o.contentId,"aria-labelledby":o.triggerId},a,i,{ref:n,onCloseAutoFocus:md(t.onCloseAutoFocus,(e=>{var t;s.current||null===(t=o.triggerRef.current)||void 0===t||t.focus(),s.current=!1,e.preventDefault()})),onInteractOutside:md(t.onInteractOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;o.modal&&!r||(s.current=!0)})),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))})),xv=e.forwardRef(((t,n)=>{const{__scopeDropdownMenu:r,...i}=t,o=hv(r);return e.createElement(uv,hd({},o,i,{ref:n}))})),wv={};function Tv(e,t){"string"!=typeof t&&(t=Tv.defaultChars);const n=function(e){let t=wv[e];if(t)return t;t=wv[e]=[];for(let n=0;n<128;n++){const e=String.fromCharCode(n);t.push(e)}for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t[r]="%"+("0"+r.toString(16).toUpperCase()).slice(-2)}return t}(t);return e.replace(/(%[a-f0-9]{2})+/gi,(function(e){let t="";for(let r=0,i=e.length;r<i;r+=3){const o=parseInt(e.slice(r+1,r+3),16);if(o<128)t+=n[o];else{if(192==(224&o)&&r+3<i){const n=parseInt(e.slice(r+4,r+6),16);if(128==(192&n)){const e=o<<6&1984|63&n;t+=e<128?"��":String.fromCharCode(e),r+=3;continue}}if(224==(240&o)&&r+6<i){const n=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16);if(128==(192&n)&&128==(192&i)){const e=o<<12&61440|n<<6&4032|63&i;t+=e<2048||e>=55296&&e<=57343?"���":String.fromCharCode(e),r+=6;continue}}if(240==(248&o)&&r+9<i){const n=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16),a=parseInt(e.slice(r+10,r+12),16);if(128==(192&n)&&128==(192&i)&&128==(192&a)){let e=o<<18&1835008|n<<12&258048|i<<6&4032|63&a;e<65536||e>1114111?t+="����":(e-=65536,t+=String.fromCharCode(55296+(e>>10),56320+(1023&e))),r+=9;continue}}t+="�"}}return t}))}Tv.defaultChars=";/?:@&=+$,#",Tv.componentChars="";const Cv={};function kv(e,t,n){"string"!=typeof t&&(n=t,t=kv.defaultChars),void 0===n&&(n=!0);const r=function(e){let t=Cv[e];if(t)return t;t=Cv[e]=[];for(let n=0;n<128;n++){const e=String.fromCharCode(n);/^[0-9a-z]$/i.test(e)?t.push(e):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}(t);let i="";for(let o=0,a=e.length;o<a;o++){const t=e.charCodeAt(o);if(n&&37===t&&o+2<a&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3)))i+=e.slice(o,o+3),o+=2;else if(t<128)i+=r[t];else if(t>=55296&&t<=57343){if(t>=55296&&t<=56319&&o+1<a){const t=e.charCodeAt(o+1);if(t>=56320&&t<=57343){i+=encodeURIComponent(e[o]+e[o+1]),o++;continue}}i+="%EF%BF%BD"}else i+=encodeURIComponent(e[o])}return i}function Sv(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function _v(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}kv.defaultChars=";/?:@&=+$,-_.!~*'()#",kv.componentChars="-_.!~*'()";const Nv=/^([a-z0-9.+-]+:)/i,Av=/:[0-9]*$/,Dv=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Iv=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),Ov=["'"].concat(Iv),Lv=["%","/","?",";","#"].concat(Ov),Fv=["/","?","#"],Rv=/^[+a-z0-9A-Z_-]{0,63}$/,Mv=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Pv={javascript:!0,"javascript:":!0},jv={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Vv(e,t){if(e&&e instanceof _v)return e;const n=new _v;return n.parse(e,t),n}_v.prototype.parse=function(e,t){let n,r,i,o=e;if(o=o.trim(),!t&&1===e.split("#").length){const e=Dv.exec(o);if(e)return this.pathname=e[1],e[2]&&(this.search=e[2]),this}let a=Nv.exec(o);if(a&&(a=a[0],n=a.toLowerCase(),this.protocol=a,o=o.substr(a.length)),(t||a||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i="//"===o.substr(0,2),!i||a&&Pv[a]||(o=o.substr(2),this.slashes=!0)),!Pv[a]&&(i||a&&!jv[a])){let e,t,n=-1;for(let s=0;s<Fv.length;s++)r=o.indexOf(Fv[s]),-1!==r&&(-1===n||r<n)&&(n=r);t=-1===n?o.lastIndexOf("@"):o.lastIndexOf("@",n),-1!==t&&(e=o.slice(0,t),o=o.slice(t+1),this.auth=e),n=-1;for(let s=0;s<Lv.length;s++)r=o.indexOf(Lv[s]),-1!==r&&(-1===n||r<n)&&(n=r);-1===n&&(n=o.length),":"===o[n-1]&&n--;const i=o.slice(0,n);o=o.slice(n),this.parseHost(i),this.hostname=this.hostname||"";const a="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!a){const e=this.hostname.split(/\./);for(let t=0,n=e.length;t<n;t++){const n=e[t];if(n&&!n.match(Rv)){let r="";for(let e=0,t=n.length;e<t;e++)n.charCodeAt(e)>127?r+="x":r+=n[e];if(!r.match(Rv)){const r=e.slice(0,t),i=e.slice(t+1),a=n.match(Mv);a&&(r.push(a[1]),i.unshift(a[2])),i.length&&(o=i.join(".")+o),this.hostname=r.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),a&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const s=o.indexOf("#");-1!==s&&(this.hash=o.substr(s),o=o.slice(0,s));const l=o.indexOf("?");return-1!==l&&(this.search=o.substr(l),o=o.slice(0,l)),o&&(this.pathname=o),jv[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this},_v.prototype.parseHost=function(e){let t=Av.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const Bv=Object.freeze(Object.defineProperty({__proto__:null,decode:Tv,encode:kv,format:Sv,parse:Vv},Symbol.toStringTag,{value:"Module"})),$v=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Uv=/[\0-\x1F\x7F-\x9F]/,Hv=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,qv=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,zv=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,Wv=Object.freeze(Object.defineProperty({__proto__:null,Any:$v,Cc:Uv,Cf:/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,P:Hv,S:qv,Z:zv},Symbol.toStringTag,{value:"Module"})),Gv=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((e=>e.charCodeAt(0)))),Yv=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((e=>e.charCodeAt(0))));var Kv;const Qv=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Xv=null!==(Kv=String.fromCodePoint)&&void 0!==Kv?Kv:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e),t};var Jv,Zv;(Zv=Jv||(Jv={}))[Zv.NUM=35]="NUM",Zv[Zv.SEMI=59]="SEMI",Zv[Zv.EQUALS=61]="EQUALS",Zv[Zv.ZERO=48]="ZERO",Zv[Zv.NINE=57]="NINE",Zv[Zv.LOWER_A=97]="LOWER_A",Zv[Zv.LOWER_F=102]="LOWER_F",Zv[Zv.LOWER_X=120]="LOWER_X",Zv[Zv.LOWER_Z=122]="LOWER_Z",Zv[Zv.UPPER_A=65]="UPPER_A",Zv[Zv.UPPER_F=70]="UPPER_F",Zv[Zv.UPPER_Z=90]="UPPER_Z";var eg,tg,ng,rg,ig,og;function ag(e){return e>=Jv.ZERO&&e<=Jv.NINE}function sg(e){return e===Jv.EQUALS||function(e){return e>=Jv.UPPER_A&&e<=Jv.UPPER_Z||e>=Jv.LOWER_A&&e<=Jv.LOWER_Z||ag(e)}(e)}(tg=eg||(eg={}))[tg.VALUE_LENGTH=49152]="VALUE_LENGTH",tg[tg.BRANCH_LENGTH=16256]="BRANCH_LENGTH",tg[tg.JUMP_TABLE=127]="JUMP_TABLE",(rg=ng||(ng={}))[rg.EntityStart=0]="EntityStart",rg[rg.NumericStart=1]="NumericStart",rg[rg.NumericDecimal=2]="NumericDecimal",rg[rg.NumericHex=3]="NumericHex",rg[rg.NamedEntity=4]="NamedEntity",(og=ig||(ig={}))[og.Legacy=0]="Legacy",og[og.Strict=1]="Strict",og[og.Attribute=2]="Attribute";class lg{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=ng.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ig.Strict}startEntity(e){this.decodeMode=e,this.state=ng.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case ng.EntityStart:return e.charCodeAt(t)===Jv.NUM?(this.state=ng.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=ng.NamedEntity,this.stateNamedEntity(e,t));case ng.NumericStart:return this.stateNumericStart(e,t);case ng.NumericDecimal:return this.stateNumericDecimal(e,t);case ng.NumericHex:return this.stateNumericHex(e,t);case ng.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===Jv.LOWER_X?(this.state=ng.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=ng.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){const i=n-t;this.result=this.result*Math.pow(r,i)+parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){const n=t;for(;t<e.length;){const i=e.charCodeAt(t);if(!(ag(i)||(r=i,r>=Jv.UPPER_A&&r<=Jv.UPPER_F||r>=Jv.LOWER_A&&r<=Jv.LOWER_F)))return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(i,3);t+=1}var r;return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){const n=t;for(;t<e.length;){const r=e.charCodeAt(t);if(!ag(r))return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2);t+=1}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return null===(n=this.errors)||void 0===n||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===Jv.SEMI)this.consumed+=1;else if(this.decodeMode===ig.Strict)return 0;return this.emitCodePoint(function(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=Qv.get(e))&&void 0!==t?t:e}(this.result),this.consumed),this.errors&&(e!==Jv.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){const{decodeTree:n}=this;let r=n[this.treeIndex],i=(r&eg.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){const o=e.charCodeAt(t);if(this.treeIndex=ug(n,r,this.treeIndex+Math.max(1,i),o),this.treeIndex<0)return 0===this.result||this.decodeMode===ig.Attribute&&(0===i||sg(o))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&eg.VALUE_LENGTH)>>14,0!==i){if(o===Jv.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==ig.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:n}=this,r=(n[t]&eg.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),null===(e=this.errors)||void 0===e||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){const{decodeTree:r}=this;return this.emitCodePoint(1===t?r[e]&~eg.VALUE_LENGTH:r[e+1],n),3===t&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case ng.NamedEntity:return 0===this.result||this.decodeMode===ig.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case ng.NumericDecimal:return this.emitNumericEntity(0,2);case ng.NumericHex:return this.emitNumericEntity(0,3);case ng.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case ng.EntityStart:return 0}}}function cg(e){let t="";const n=new lg(e,(e=>t+=Xv(e)));return function(e,r){let i=0,o=0;for(;(o=e.indexOf("&",o))>=0;){t+=e.slice(i,o),n.startEntity(r);const a=n.write(e,o+1);if(a<0){i=o+n.end();break}i=o+a,o=0===a?i+1:i}const a=t+e.slice(i);return t="",a}}function ug(e,t,n,r){const i=(t&eg.BRANCH_LENGTH)>>7,o=t&eg.JUMP_TABLE;if(0===i)return 0!==o&&r===o?n:-1;if(o){const t=r-o;return t<0||t>=i?-1:e[n+t]-1}let a=n,s=a+i-1;for(;a<=s;){const t=a+s>>>1,n=e[t];if(n<r)a=t+1;else{if(!(n>r))return e[t+i];s=t-1}}return-1}const dg=cg(Gv);function fg(e,t=ig.Legacy){return dg(e,t)}function pg(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)}cg(Yv);const hg=Object.prototype.hasOwnProperty;function mg(e){return Array.prototype.slice.call(arguments,1).forEach((function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach((function(n){e[n]=t[n]}))}})),e}function vg(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function gg(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!=(65535&e)&&65534!=(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function yg(e){if(e>65535){const t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const bg=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,Eg=new RegExp(bg.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),xg=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function wg(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(Eg,(function(e,t,n){return t||function(e,t){if(35===t.charCodeAt(0)&&xg.test(t)){const n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return gg(n)?yg(n):e}const n=fg(e);return n!==e?n:e}(e,n)}))}const Tg=/[&<>"]/,Cg=/[&<>"]/g,kg={"&":"&","<":"<",">":">",'"':"""};function Sg(e){return kg[e]}function _g(e){return Tg.test(e)?e.replace(Cg,Sg):e}const Ng=/[.?*+^$[\]\\(){}|-]/g;function Ag(e){switch(e){case 9:case 32:return!0}return!1}function Dg(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Ig(e){return Hv.test(e)||qv.test(e)}function Og(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Lg(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}const Fg={mdurl:Bv,ucmicro:Wv},Rg=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:vg,assign:mg,escapeHtml:_g,escapeRE:function(e){return e.replace(Ng,"\\$&")},fromCodePoint:yg,has:function(e,t){return hg.call(e,t)},isMdAsciiPunct:Og,isPunctChar:Ig,isSpace:Ag,isString:pg,isValidEntityCode:gg,isWhiteSpace:Dg,lib:Fg,normalizeReference:Lg,unescapeAll:wg,unescapeMd:function(e){return e.indexOf("\\")<0?e:e.replace(bg,"$1")}},Symbol.toStringTag,{value:"Module"}));const Mg=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:function(e,t,n){let r,i=t;const o={ok:!1,pos:0,str:""};if(60===e.charCodeAt(i)){for(i++;i<n;){if(r=e.charCodeAt(i),10===r)return o;if(60===r)return o;if(62===r)return o.pos=i+1,o.str=wg(e.slice(t+1,i)),o.ok=!0,o;92===r&&i+1<n?i+=2:i++}return o}let a=0;for(;i<n&&(r=e.charCodeAt(i),32!==r)&&!(r<32||127===r);)if(92===r&&i+1<n){if(32===e.charCodeAt(i+1))break;i+=2}else{if(40===r&&(a++,a>32))return o;if(41===r){if(0===a)break;a--}i++}return t===i||0!==a||(o.str=wg(e.slice(t,i)),o.pos=i,o.ok=!0),o},parseLinkLabel:function(e,t,n){let r,i,o,a;const s=e.posMax,l=e.pos;for(e.pos=t+1,r=1;e.pos<s;){if(o=e.src.charCodeAt(e.pos),93===o&&(r--,0===r)){i=!0;break}if(a=e.pos,e.md.inline.skipToken(e),91===o)if(a===e.pos-1)r++;else if(n)return e.pos=l,-1}let c=-1;return i&&(c=e.pos),e.pos=l,c},parseLinkTitle:function(e,t,n,r){let i,o=t;const a={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)a.str=r.str,a.marker=r.marker;else{if(o>=n)return a;let r=e.charCodeAt(o);if(34!==r&&39!==r&&40!==r)return a;t++,o++,40===r&&(r=41),a.marker=r}for(;o<n;){if(i=e.charCodeAt(o),i===a.marker)return a.pos=o+1,a.str+=wg(e.slice(t,o)),a.ok=!0,a;if(40===i&&41===a.marker)return a;92===i&&o+1<n&&o++,o++}return a.can_continue=!0,a.str+=wg(e.slice(t,o)),a}},Symbol.toStringTag,{value:"Module"})),Pg={};function jg(){this.rules=mg({},Pg)}function Vg(){this.__rules__=[],this.__cache__=null}function Bg(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}function $g(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}Pg.code_inline=function(e,t,n,r,i){const o=e[t];return"<code"+i.renderAttrs(o)+">"+_g(o.content)+"</code>"},Pg.code_block=function(e,t,n,r,i){const o=e[t];return"<pre"+i.renderAttrs(o)+"><code>"+_g(e[t].content)+"</code></pre>\n"},Pg.fence=function(e,t,n,r,i){const o=e[t],a=o.info?wg(o.info).trim():"";let s,l="",c="";if(a){const e=a.split(/(\s+)/g);l=e[0],c=e.slice(2).join("")}if(s=n.highlight&&n.highlight(o.content,l,c)||_g(o.content),0===s.indexOf("<pre"))return s+"\n";if(a){const e=o.attrIndex("class"),t=o.attrs?o.attrs.slice():[];e<0?t.push(["class",n.langPrefix+l]):(t[e]=t[e].slice(),t[e][1]+=" "+n.langPrefix+l);const r={attrs:t};return`<pre><code${i.renderAttrs(r)}>${s}</code></pre>\n`}return`<pre><code${i.renderAttrs(o)}>${s}</code></pre>\n`},Pg.image=function(e,t,n,r,i){const o=e[t];return o.attrs[o.attrIndex("alt")][1]=i.renderInlineAsText(o.children,n,r),i.renderToken(e,t,n)},Pg.hardbreak=function(e,t,n){return n.xhtmlOut?"<br />\n":"<br>\n"},Pg.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},Pg.text=function(e,t){return _g(e[t].content)},Pg.html_block=function(e,t){return e[t].content},Pg.html_inline=function(e,t){return e[t].content},jg.prototype.renderAttrs=function(e){let t,n,r;if(!e.attrs)return"";for(r="",t=0,n=e.attrs.length;t<n;t++)r+=" "+_g(e.attrs[t][0])+'="'+_g(e.attrs[t][1])+'"';return r},jg.prototype.renderToken=function(e,t,n){const r=e[t];let i="";if(r.hidden)return"";r.block&&-1!==r.nesting&&t&&e[t-1].hidden&&(i+="\n"),i+=(-1===r.nesting?"</":"<")+r.tag,i+=this.renderAttrs(r),0===r.nesting&&n.xhtmlOut&&(i+=" /");let o=!1;if(r.block&&(o=!0,1===r.nesting&&t+1<e.length)){const n=e[t+1];("inline"===n.type||n.hidden||-1===n.nesting&&n.tag===r.tag)&&(o=!1)}return i+=o?">\n":">",i},jg.prototype.renderInline=function(e,t,n){let r="";const i=this.rules;for(let o=0,a=e.length;o<a;o++){const a=e[o].type;void 0!==i[a]?r+=i[a](e,o,t,n,this):r+=this.renderToken(e,o,t)}return r},jg.prototype.renderInlineAsText=function(e,t,n){let r="";for(let i=0,o=e.length;i<o;i++)switch(e[i].type){case"text":case"html_inline":case"html_block":r+=e[i].content;break;case"image":r+=this.renderInlineAsText(e[i].children,t,n);break;case"softbreak":case"hardbreak":r+="\n"}return r},jg.prototype.render=function(e,t,n){let r="";const i=this.rules;for(let o=0,a=e.length;o<a;o++){const a=e[o].type;"inline"===a?r+=this.renderInline(e[o].children,t,n):void 0!==i[a]?r+=i[a](e,o,t,n,this):r+=this.renderToken(e,o,t,n)}return r},Vg.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},Vg.prototype.__compile__=function(){const e=this,t=[""];e.__rules__.forEach((function(e){e.enabled&&e.alt.forEach((function(e){t.indexOf(e)<0&&t.push(e)}))})),e.__cache__={},t.forEach((function(t){e.__cache__[t]=[],e.__rules__.forEach((function(n){n.enabled&&(t&&n.alt.indexOf(t)<0||e.__cache__[t].push(n.fn))}))}))},Vg.prototype.at=function(e,t,n){const r=this.__find__(e),i=n||{};if(-1===r)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=i.alt||[],this.__cache__=null},Vg.prototype.before=function(e,t,n,r){const i=this.__find__(e),o=r||{};if(-1===i)throw new Error("Parser rule not found: "+e);this.__rules__.splice(i,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null},Vg.prototype.after=function(e,t,n,r){const i=this.__find__(e),o=r||{};if(-1===i)throw new Error("Parser rule not found: "+e);this.__rules__.splice(i+1,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null},Vg.prototype.push=function(e,t,n){const r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null},Vg.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach((function(e){const r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!0,n.push(e)}),this),this.__cache__=null,n},Vg.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach((function(e){e.enabled=!1})),this.enable(e,t)},Vg.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach((function(e){const r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!1,n.push(e)}),this),this.__cache__=null,n},Vg.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},Bg.prototype.attrIndex=function(e){if(!this.attrs)return-1;const t=this.attrs;for(let n=0,r=t.length;n<r;n++)if(t[n][0]===e)return n;return-1},Bg.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},Bg.prototype.attrSet=function(e,t){const n=this.attrIndex(e),r=[e,t];n<0?this.attrPush(r):this.attrs[n]=r},Bg.prototype.attrGet=function(e){const t=this.attrIndex(e);let n=null;return t>=0&&(n=this.attrs[t][1]),n},Bg.prototype.attrJoin=function(e,t){const n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t},$g.prototype.Token=Bg;const Ug=/\r\n?|\n/g,Hg=/\0/g;function qg(e){return/^<\/a\s*>/i.test(e)}const zg=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,Wg=/\((c|tm|r)\)/i,Gg=/\((c|tm|r)\)/gi,Yg={c:"©",r:"®",tm:"™"};function Kg(e,t){return Yg[t.toLowerCase()]}function Qg(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];"text"!==r.type||t||(r.content=r.content.replace(Gg,Kg)),"link_open"===r.type&&"auto"===r.info&&t--,"link_close"===r.type&&"auto"===r.info&&t++}}function Xg(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];"text"!==r.type||t||zg.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===r.type&&"auto"===r.info&&t--,"link_close"===r.type&&"auto"===r.info&&t++}}const Jg=/['"]/,Zg=/['"]/g,ey="’";function ty(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function ny(e,t){let n;const r=[];for(let i=0;i<e.length;i++){const o=e[i],a=e[i].level;for(n=r.length-1;n>=0&&!(r[n].level<=a);n--);if(r.length=n+1,"text"!==o.type)continue;let s=o.content,l=0,c=s.length;e:for(;l<c;){Zg.lastIndex=l;const u=Zg.exec(s);if(!u)break;let d=!0,f=!0;l=u.index+1;const p="'"===u[0];let h=32;if(u.index-1>=0)h=s.charCodeAt(u.index-1);else for(n=i-1;n>=0&&("softbreak"!==e[n].type&&"hardbreak"!==e[n].type);n--)if(e[n].content){h=e[n].content.charCodeAt(e[n].content.length-1);break}let m=32;if(l<c)m=s.charCodeAt(l);else for(n=i+1;n<e.length&&("softbreak"!==e[n].type&&"hardbreak"!==e[n].type);n++)if(e[n].content){m=e[n].content.charCodeAt(0);break}const v=Og(h)||Ig(String.fromCharCode(h)),g=Og(m)||Ig(String.fromCharCode(m)),y=Dg(h),b=Dg(m);if(b?d=!1:g&&(y||v||(d=!1)),y?f=!1:v&&(b||g||(f=!1)),34===m&&'"'===u[0]&&h>=48&&h<=57&&(f=d=!1),d&&f&&(d=v,f=g),d||f){if(f)for(n=r.length-1;n>=0;n--){let d=r[n];if(r[n].level<a)break;if(d.single===p&&r[n].level===a){let a,f;d=r[n],p?(a=t.md.options.quotes[2],f=t.md.options.quotes[3]):(a=t.md.options.quotes[0],f=t.md.options.quotes[1]),o.content=ty(o.content,u.index,f),e[d.token].content=ty(e[d.token].content,d.pos,a),l+=f.length-1,d.token===i&&(l+=a.length-1),s=o.content,c=s.length,r.length=n;continue e}}d?r.push({token:i,pos:u.index,single:p,level:a}):f&&p&&(o.content=ty(o.content,u.index,ey))}else p&&(o.content=ty(o.content,u.index,ey))}}}const ry=[["normalize",function(e){let t;t=e.src.replace(Ug,"\n"),t=t.replace(Hg,"�"),e.src=t}],["block",function(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}],["inline",function(e){const t=e.tokens;for(let n=0,r=t.length;n<r;n++){const r=t[n];"inline"===r.type&&e.md.inline.parse(r.content,e.md,e.env,r.children)}}],["linkify",function(e){const t=e.tokens;var n;if(e.md.options.linkify)for(let r=0,i=t.length;r<i;r++){if("inline"!==t[r].type||!e.md.linkify.pretest(t[r].content))continue;let i=t[r].children,o=0;for(let a=i.length-1;a>=0;a--){const s=i[a];if("link_close"!==s.type){if("html_inline"===s.type&&(n=s.content,/^<a[>\s]/i.test(n)&&o>0&&o--,qg(s.content)&&o++),!(o>0)&&"text"===s.type&&e.md.linkify.test(s.content)){const n=s.content;let o=e.md.linkify.match(n);const l=[];let c=s.level,u=0;o.length>0&&0===o[0].index&&a>0&&"text_special"===i[a-1].type&&(o=o.slice(1));for(let t=0;t<o.length;t++){const r=o[t].url,i=e.md.normalizeLink(r);if(!e.md.validateLink(i))continue;let a=o[t].text;a=o[t].schema?"mailto:"!==o[t].schema||/^mailto:/i.test(a)?e.md.normalizeLinkText(a):e.md.normalizeLinkText("mailto:"+a).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+a).replace(/^http:\/\//,"");const s=o[t].index;if(s>u){const t=new e.Token("text","",0);t.content=n.slice(u,s),t.level=c,l.push(t)}const d=new e.Token("link_open","a",1);d.attrs=[["href",i]],d.level=c++,d.markup="linkify",d.info="auto",l.push(d);const f=new e.Token("text","",0);f.content=a,f.level=c,l.push(f);const p=new e.Token("link_close","a",-1);p.level=--c,p.markup="linkify",p.info="auto",l.push(p),u=o[t].lastIndex}if(u<n.length){const t=new e.Token("text","",0);t.content=n.slice(u),t.level=c,l.push(t)}t[r].children=i=vg(i,a,l)}}else for(a--;i[a].level!==s.level&&"link_open"!==i[a].type;)a--}}}],["replacements",function(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&(Wg.test(e.tokens[t].content)&&Qg(e.tokens[t].children),zg.test(e.tokens[t].content)&&Xg(e.tokens[t].children))}],["smartquotes",function(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&Jg.test(e.tokens[t].content)&&ny(e.tokens[t].children,e)}],["text_join",function(e){let t,n;const r=e.tokens,i=r.length;for(let o=0;o<i;o++){if("inline"!==r[o].type)continue;const e=r[o].children,i=e.length;for(t=0;t<i;t++)"text_special"===e[t].type&&(e[t].type="text");for(t=n=0;t<i;t++)"text"===e[t].type&&t+1<i&&"text"===e[t+1].type?e[t+1].content=e[t].content+e[t+1].content:(t!==n&&(e[n]=e[t]),n++);t!==n&&(e.length=n)}}]];function iy(){this.ruler=new Vg;for(let e=0;e<ry.length;e++)this.ruler.push(ry[e][0],ry[e][1])}function oy(e,t,n,r){this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const i=this.src;for(let o=0,a=0,s=0,l=0,c=i.length,u=!1;a<c;a++){const e=i.charCodeAt(a);if(!u){if(Ag(e)){s++,9===e?l+=4-l%4:l++;continue}u=!0}10!==e&&a!==c-1||(10!==e&&a++,this.bMarks.push(o),this.eMarks.push(a),this.tShift.push(s),this.sCount.push(l),this.bsCount.push(0),u=!1,s=0,l=0,o=a+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}iy.prototype.process=function(e){const t=this.ruler.getRules("");for(let n=0,r=t.length;n<r;n++)t[n](e)},iy.prototype.State=$g,oy.prototype.push=function(e,t,n){const r=new Bg(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r},oy.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},oy.prototype.skipEmptyLines=function(e){for(let t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},oy.prototype.skipSpaces=function(e){for(let t=this.src.length;e<t;e++){if(!Ag(this.src.charCodeAt(e)))break}return e},oy.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!Ag(this.src.charCodeAt(--e)))return e+1;return e},oy.prototype.skipChars=function(e,t){for(let n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e},oy.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e},oy.prototype.getLines=function(e,t,n,r){if(e>=t)return"";const i=new Array(t-e);for(let o=0,a=e;a<t;a++,o++){let e=0;const s=this.bMarks[a];let l,c=s;for(l=a+1<t||r?this.eMarks[a]+1:this.eMarks[a];c<l&&e<n;){const t=this.src.charCodeAt(c);if(Ag(t))9===t?e+=4-(e+this.bsCount[a])%4:e++;else{if(!(c-s<this.tShift[a]))break;e++}c++}i[o]=e>n?new Array(e-n+1).join(" ")+this.src.slice(c,l):this.src.slice(c,l)}return i.join("")},oy.prototype.Token=Bg;function ay(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function sy(e){const t=[],n=e.length;let r=0,i=e.charCodeAt(r),o=!1,a=0,s="";for(;r<n;)124===i&&(o?(s+=e.substring(a,r-1),a=r):(t.push(s+e.substring(a,r)),s="",a=r+1)),o=92===i,r++,i=e.charCodeAt(r);return t.push(s+e.substring(a)),t}function ly(e,t){const n=e.eMarks[t];let r=e.bMarks[t]+e.tShift[t];const i=e.src.charCodeAt(r++);if(42!==i&&45!==i&&43!==i)return-1;if(r<n){if(!Ag(e.src.charCodeAt(r)))return-1}return r}function cy(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];let i=n;if(i+1>=r)return-1;let o=e.src.charCodeAt(i++);if(o<48||o>57)return-1;for(;;){if(i>=r)return-1;if(o=e.src.charCodeAt(i++),!(o>=48&&o<=57)){if(41===o||46===o)break;return-1}if(i-n>=10)return-1}return i<r&&(o=e.src.charCodeAt(i),!Ag(o))?-1:i}const uy="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",dy="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",fy=new RegExp("^(?:"+uy+"|"+dy+"|\x3c!---?>|\x3c!--(?:[^-]|-[^-]|--[^>])*--\x3e|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),py=new RegExp("^(?:"+uy+"|"+dy+")"),hy=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"].join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(py.source+"\\s*$"),/^$/,!1]];const my=[["table",function(e,t,n,r){if(t+2>n)return!1;let i=t+1;if(e.sCount[i]<e.blkIndent)return!1;if(e.sCount[i]-e.blkIndent>=4)return!1;let o=e.bMarks[i]+e.tShift[i];if(o>=e.eMarks[i])return!1;const a=e.src.charCodeAt(o++);if(124!==a&&45!==a&&58!==a)return!1;if(o>=e.eMarks[i])return!1;const s=e.src.charCodeAt(o++);if(124!==s&&45!==s&&58!==s&&!Ag(s))return!1;if(45===a&&Ag(s))return!1;for(;o<e.eMarks[i];){const t=e.src.charCodeAt(o);if(124!==t&&45!==t&&58!==t&&!Ag(t))return!1;o++}let l=ay(e,t+1),c=l.split("|");const u=[];for(let g=0;g<c.length;g++){const e=c[g].trim();if(!e){if(0===g||g===c.length-1)continue;return!1}if(!/^:?-+:?$/.test(e))return!1;58===e.charCodeAt(e.length-1)?u.push(58===e.charCodeAt(0)?"center":"right"):58===e.charCodeAt(0)?u.push("left"):u.push("")}if(l=ay(e,t).trim(),-1===l.indexOf("|"))return!1;if(e.sCount[t]-e.blkIndent>=4)return!1;c=sy(l),c.length&&""===c[0]&&c.shift(),c.length&&""===c[c.length-1]&&c.pop();const d=c.length;if(0===d||d!==u.length)return!1;if(r)return!0;const f=e.parentType;e.parentType="table";const p=e.md.block.ruler.getRules("blockquote"),h=[t,0];e.push("table_open","table",1).map=h,e.push("thead_open","thead",1).map=[t,t+1],e.push("tr_open","tr",1).map=[t,t+1];for(let g=0;g<c.length;g++){const t=e.push("th_open","th",1);u[g]&&(t.attrs=[["style","text-align:"+u[g]]]);const n=e.push("inline","",0);n.content=c[g].trim(),n.children=[],e.push("th_close","th",-1)}let m;e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let v=0;for(i=t+2;i<n&&!(e.sCount[i]<e.blkIndent);i++){let r=!1;for(let t=0,o=p.length;t<o;t++)if(p[t](e,i,n,!0)){r=!0;break}if(r)break;if(l=ay(e,i).trim(),!l)break;if(e.sCount[i]-e.blkIndent>=4)break;if(c=sy(l),c.length&&""===c[0]&&c.shift(),c.length&&""===c[c.length-1]&&c.pop(),v+=d-c.length,v>65536)break;if(i===t+2){e.push("tbody_open","tbody",1).map=m=[t+2,0]}e.push("tr_open","tr",1).map=[i,i+1];for(let t=0;t<d;t++){const n=e.push("td_open","td",1);u[t]&&(n.attrs=[["style","text-align:"+u[t]]]);const r=e.push("inline","",0);r.content=c[t]?c[t].trim():"",r.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return m&&(e.push("tbody_close","tbody",-1),m[1]=i),e.push("table_close","table",-1),h[1]=i,e.parentType=f,e.line=i,!0},["paragraph","reference"]],["code",function(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,i=r;for(;r<n;)if(e.isEmpty(r))r++;else{if(!(e.sCount[r]-e.blkIndent>=4))break;r++,i=r}e.line=i;const o=e.push("code_block","code",0);return o.content=e.getLines(t,i,4+e.blkIndent,!1)+"\n",o.map=[t,e.line],!0}],["fence",function(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(i+3>o)return!1;const a=e.src.charCodeAt(i);if(126!==a&&96!==a)return!1;let s=i;i=e.skipChars(i,a);let l=i-s;if(l<3)return!1;const c=e.src.slice(s,i),u=e.src.slice(i,o);if(96===a&&u.indexOf(String.fromCharCode(a))>=0)return!1;if(r)return!0;let d=t,f=!1;for(;(d++,!(d>=n))&&(i=s=e.bMarks[d]+e.tShift[d],o=e.eMarks[d],!(i<o&&e.sCount[d]<e.blkIndent));)if(e.src.charCodeAt(i)===a&&!(e.sCount[d]-e.blkIndent>=4||(i=e.skipChars(i,a),i-s<l||(i=e.skipSpaces(i),i<o)))){f=!0;break}l=e.sCount[t],e.line=d+(f?1:0);const p=e.push("fence","code",0);return p.info=u,p.content=e.getLines(t+1,d,l,!0),p.markup=c,p.map=[t,e.line],!0},["paragraph","reference","blockquote","list"]],["blockquote",function(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];const a=e.lineMax;if(e.sCount[t]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(i))return!1;if(r)return!0;const s=[],l=[],c=[],u=[],d=e.md.block.ruler.getRules("blockquote"),f=e.parentType;e.parentType="blockquote";let p,h=!1;for(p=t;p<n;p++){const t=e.sCount[p]<e.blkIndent;if(i=e.bMarks[p]+e.tShift[p],o=e.eMarks[p],i>=o)break;if(62===e.src.charCodeAt(i++)&&!t){let t,n,r=e.sCount[p]+1;32===e.src.charCodeAt(i)?(i++,r++,n=!1,t=!0):9===e.src.charCodeAt(i)?(t=!0,(e.bsCount[p]+r)%4==3?(i++,r++,n=!1):n=!0):t=!1;let a=r;for(s.push(e.bMarks[p]),e.bMarks[p]=i;i<o;){const t=e.src.charCodeAt(i);if(!Ag(t))break;9===t?a+=4-(a+e.bsCount[p]+(n?1:0))%4:a++,i++}h=i>=o,l.push(e.bsCount[p]),e.bsCount[p]=e.sCount[p]+1+(t?1:0),c.push(e.sCount[p]),e.sCount[p]=a-r,u.push(e.tShift[p]),e.tShift[p]=i-e.bMarks[p];continue}if(h)break;let r=!1;for(let i=0,o=d.length;i<o;i++)if(d[i](e,p,n,!0)){r=!0;break}if(r){e.lineMax=p,0!==e.blkIndent&&(s.push(e.bMarks[p]),l.push(e.bsCount[p]),u.push(e.tShift[p]),c.push(e.sCount[p]),e.sCount[p]-=e.blkIndent);break}s.push(e.bMarks[p]),l.push(e.bsCount[p]),u.push(e.tShift[p]),c.push(e.sCount[p]),e.sCount[p]=-1}const m=e.blkIndent;e.blkIndent=0;const v=e.push("blockquote_open","blockquote",1);v.markup=">";const g=[t,0];v.map=g,e.md.block.tokenize(e,t,p),e.push("blockquote_close","blockquote",-1).markup=">",e.lineMax=a,e.parentType=f,g[1]=e.line;for(let y=0;y<u.length;y++)e.bMarks[y+t]=s[y],e.tShift[y+t]=u[y],e.sCount[y+t]=c[y],e.bsCount[y+t]=l[y];return e.blkIndent=m,!0},["paragraph","reference","blockquote","list"]],["hr",function(e,t,n,r){const i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.bMarks[t]+e.tShift[t];const a=e.src.charCodeAt(o++);if(42!==a&&45!==a&&95!==a)return!1;let s=1;for(;o<i;){const t=e.src.charCodeAt(o++);if(t!==a&&!Ag(t))return!1;t===a&&s++}if(s<3)return!1;if(r)return!0;e.line=t+1;const l=e.push("hr","hr",0);return l.map=[t,e.line],l.markup=Array(s+1).join(String.fromCharCode(a)),!0},["paragraph","reference","blockquote","list"]],["list",function(e,t,n,r){let i,o,a,s,l=t,c=!0;if(e.sCount[l]-e.blkIndent>=4)return!1;if(e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]<e.blkIndent)return!1;let u,d,f,p=!1;if(r&&"paragraph"===e.parentType&&e.sCount[l]>=e.blkIndent&&(p=!0),(f=cy(e,l))>=0){if(u=!0,a=e.bMarks[l]+e.tShift[l],d=Number(e.src.slice(a,f-1)),p&&1!==d)return!1}else{if(!((f=ly(e,l))>=0))return!1;u=!1}if(p&&e.skipSpaces(f)>=e.eMarks[l])return!1;if(r)return!0;const h=e.src.charCodeAt(f-1),m=e.tokens.length;u?(s=e.push("ordered_list_open","ol",1),1!==d&&(s.attrs=[["start",d]])):s=e.push("bullet_list_open","ul",1);const v=[l,0];s.map=v,s.markup=String.fromCharCode(h);let g=!1;const y=e.md.block.ruler.getRules("list"),b=e.parentType;for(e.parentType="list";l<n;){o=f,i=e.eMarks[l];const t=e.sCount[l]+f-(e.bMarks[l]+e.tShift[l]);let r=t;for(;o<i;){const t=e.src.charCodeAt(o);if(9===t)r+=4-(r+e.bsCount[l])%4;else{if(32!==t)break;r++}o++}const d=o;let p;p=d>=i?1:r-t,p>4&&(p=1);const m=t+p;s=e.push("list_item_open","li",1),s.markup=String.fromCharCode(h);const v=[l,0];s.map=v,u&&(s.info=e.src.slice(a,f-1));const b=e.tight,E=e.tShift[l],x=e.sCount[l],w=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=m,e.tight=!0,e.tShift[l]=d-e.bMarks[l],e.sCount[l]=r,d>=i&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,l,n,!0),e.tight&&!g||(c=!1),g=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=w,e.tShift[l]=E,e.sCount[l]=x,e.tight=b,s=e.push("list_item_close","li",-1),s.markup=String.fromCharCode(h),l=e.line,v[1]=l,l>=n)break;if(e.sCount[l]<e.blkIndent)break;if(e.sCount[l]-e.blkIndent>=4)break;let T=!1;for(let i=0,o=y.length;i<o;i++)if(y[i](e,l,n,!0)){T=!0;break}if(T)break;if(u){if(f=cy(e,l),f<0)break;a=e.bMarks[l]+e.tShift[l]}else if(f=ly(e,l),f<0)break;if(h!==e.src.charCodeAt(f-1))break}return s=u?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1),s.markup=String.fromCharCode(h),v[1]=l,e.line=l,e.parentType=b,c&&function(e,t){const n=e.level+2;for(let r=t+2,i=e.tokens.length-2;r<i;r++)e.tokens[r].level===n&&"paragraph_open"===e.tokens[r].type&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}(e,m),!0},["paragraph","reference","blockquote"]],["reference",function(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],a=t+1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(91!==e.src.charCodeAt(i))return!1;function s(t){const n=e.lineMax;if(t>=n||e.isEmpty(t))return null;let r=!1;if(e.sCount[t]-e.blkIndent>3&&(r=!0),e.sCount[t]<0&&(r=!0),!r){const r=e.md.block.ruler.getRules("reference"),i=e.parentType;e.parentType="reference";let o=!1;for(let a=0,s=r.length;a<s;a++)if(r[a](e,t,n,!0)){o=!0;break}if(e.parentType=i,o)return null}const i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];return e.src.slice(i,o+1)}let l=e.src.slice(i,o+1);o=l.length;let c=-1;for(i=1;i<o;i++){const e=l.charCodeAt(i);if(91===e)return!1;if(93===e){c=i;break}if(10===e){const e=s(a);null!==e&&(l+=e,o=l.length,a++)}else if(92===e&&(i++,i<o&&10===l.charCodeAt(i))){const e=s(a);null!==e&&(l+=e,o=l.length,a++)}}if(c<0||58!==l.charCodeAt(c+1))return!1;for(i=c+2;i<o;i++){const e=l.charCodeAt(i);if(10===e){const e=s(a);null!==e&&(l+=e,o=l.length,a++)}else if(!Ag(e))break}const u=e.md.helpers.parseLinkDestination(l,i,o);if(!u.ok)return!1;const d=e.md.normalizeLink(u.str);if(!e.md.validateLink(d))return!1;i=u.pos;const f=i,p=a,h=i;for(;i<o;i++){const e=l.charCodeAt(i);if(10===e){const e=s(a);null!==e&&(l+=e,o=l.length,a++)}else if(!Ag(e))break}let m,v=e.md.helpers.parseLinkTitle(l,i,o);for(;v.can_continue;){const t=s(a);if(null===t)break;l+=t,i=o,o=l.length,a++,v=e.md.helpers.parseLinkTitle(l,i,o,v)}for(i<o&&h!==i&&v.ok?(m=v.str,i=v.pos):(m="",i=f,a=p);i<o;){if(!Ag(l.charCodeAt(i)))break;i++}if(i<o&&10!==l.charCodeAt(i)&&m)for(m="",i=f,a=p;i<o;){if(!Ag(l.charCodeAt(i)))break;i++}if(i<o&&10!==l.charCodeAt(i))return!1;const g=Lg(l.slice(1,c));return!!g&&(r||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[g]&&(e.env.references[g]={title:m,href:d}),e.line=a),!0)}],["html_block",function(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(i))return!1;let a=e.src.slice(i,o),s=0;for(;s<hy.length&&!hy[s][0].test(a);s++);if(s===hy.length)return!1;if(r)return hy[s][2];let l=t+1;if(!hy[s][1].test(a))for(;l<n&&!(e.sCount[l]<e.blkIndent);l++)if(i=e.bMarks[l]+e.tShift[l],o=e.eMarks[l],a=e.src.slice(i,o),hy[s][1].test(a)){0!==a.length&&l++;break}e.line=l;const c=e.push("html_block","",0);return c.map=[t,l],c.content=e.getLines(t,l,e.blkIndent,!0),!0},["paragraph","reference","blockquote"]],["heading",function(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let a=e.src.charCodeAt(i);if(35!==a||i>=o)return!1;let s=1;for(a=e.src.charCodeAt(++i);35===a&&i<o&&s<=6;)s++,a=e.src.charCodeAt(++i);if(s>6||i<o&&!Ag(a))return!1;if(r)return!0;o=e.skipSpacesBack(o,i);const l=e.skipCharsBack(o,35,i);l>i&&Ag(e.src.charCodeAt(l-1))&&(o=l),e.line=t+1;const c=e.push("heading_open","h"+String(s),1);c.markup="########".slice(0,s),c.map=[t,e.line];const u=e.push("inline","",0);return u.content=e.src.slice(i,o).trim(),u.map=[t,e.line],u.children=[],e.push("heading_close","h"+String(s),-1).markup="########".slice(0,s),!0},["paragraph","reference","blockquote"]],["lheading",function(e,t,n){const r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const i=e.parentType;e.parentType="paragraph";let o,a=0,s=t+1;for(;s<n&&!e.isEmpty(s);s++){if(e.sCount[s]-e.blkIndent>3)continue;if(e.sCount[s]>=e.blkIndent){let t=e.bMarks[s]+e.tShift[s];const n=e.eMarks[s];if(t<n&&(o=e.src.charCodeAt(t),(45===o||61===o)&&(t=e.skipChars(t,o),t=e.skipSpaces(t),t>=n))){a=61===o?1:2;break}}if(e.sCount[s]<0)continue;let t=!1;for(let i=0,o=r.length;i<o;i++)if(r[i](e,s,n,!0)){t=!0;break}if(t)break}if(!a)return!1;const l=e.getLines(t,s,e.blkIndent,!1).trim();e.line=s+1;const c=e.push("heading_open","h"+String(a),1);c.markup=String.fromCharCode(o),c.map=[t,e.line];const u=e.push("inline","",0);return u.content=l,u.map=[t,e.line-1],u.children=[],e.push("heading_close","h"+String(a),-1).markup=String.fromCharCode(o),e.parentType=i,!0}],["paragraph",function(e,t,n){const r=e.md.block.ruler.getRules("paragraph"),i=e.parentType;let o=t+1;for(e.parentType="paragraph";o<n&&!e.isEmpty(o);o++){if(e.sCount[o]-e.blkIndent>3)continue;if(e.sCount[o]<0)continue;let t=!1;for(let i=0,a=r.length;i<a;i++)if(r[i](e,o,n,!0)){t=!0;break}if(t)break}const a=e.getLines(t,o,e.blkIndent,!1).trim();e.line=o,e.push("paragraph_open","p",1).map=[t,e.line];const s=e.push("inline","",0);return s.content=a,s.map=[t,e.line],s.children=[],e.push("paragraph_close","p",-1),e.parentType=i,!0}]];function vy(){this.ruler=new Vg;for(let e=0;e<my.length;e++)this.ruler.push(my[e][0],my[e][1],{alt:(my[e][2]||[]).slice()})}function gy(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}function yy(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}vy.prototype.tokenize=function(e,t,n){const r=this.ruler.getRules(""),i=r.length,o=e.md.options.maxNesting;let a=t,s=!1;for(;a<n&&(e.line=a=e.skipEmptyLines(a),!(a>=n))&&!(e.sCount[a]<e.blkIndent);){if(e.level>=o){e.line=n;break}const t=e.line;let l=!1;for(let o=0;o<i;o++)if(l=r[o](e,a,n,!1),l){if(t>=e.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),a=e.line,a<n&&e.isEmpty(a)&&(s=!0,a++,e.line=a)}},vy.prototype.parse=function(e,t,n,r){if(!e)return;const i=new this.State(e,t,n,r);this.tokenize(i,i.line,i.lineMax)},vy.prototype.State=oy,gy.prototype.pushPending=function(){const e=new Bg("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},gy.prototype.push=function(e,t,n){this.pending&&this.pushPending();const r=new Bg(e,t,n);let i=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r},gy.prototype.scanDelims=function(e,t){const n=this.posMax,r=this.src.charCodeAt(e),i=e>0?this.src.charCodeAt(e-1):32;let o=e;for(;o<n&&this.src.charCodeAt(o)===r;)o++;const a=o-e,s=o<n?this.src.charCodeAt(o):32,l=Og(i)||Ig(String.fromCharCode(i)),c=Og(s)||Ig(String.fromCharCode(s)),u=Dg(i),d=Dg(s),f=!d&&(!c||u||l),p=!u&&(!l||d||c);return{can_open:f&&(t||!p||l),can_close:p&&(t||!f||c),length:a}},gy.prototype.Token=Bg;const by=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;const Ey=[];for(let bR=0;bR<256;bR++)Ey.push(0);function xy(e,t){let n;const r=[],i=t.length;for(let o=0;o<i;o++){const i=t[o];if(126!==i.marker)continue;if(-1===i.end)continue;const a=t[i.end];n=e.tokens[i.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[a.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="","text"===e.tokens[a.token-1].type&&"~"===e.tokens[a.token-1].content&&r.push(a.token-1)}for(;r.length;){const t=r.pop();let i=t+1;for(;i<e.tokens.length&&"s_close"===e.tokens[i].type;)i++;i--,t!==i&&(n=e.tokens[i],e.tokens[i]=e.tokens[t],e.tokens[t]=n)}}"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(e){Ey[e.charCodeAt(0)]=1}));const wy={tokenize:function(e,t){const n=e.pos,r=e.src.charCodeAt(n);if(t)return!1;if(126!==r)return!1;const i=e.scanDelims(e.pos,!0);let o=i.length;const a=String.fromCharCode(r);if(o<2)return!1;let s;o%2&&(s=e.push("text","",0),s.content=a,o--);for(let l=0;l<o;l+=2)s=e.push("text","",0),s.content=a+a,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,!0},postProcess:function(e){const t=e.tokens_meta,n=e.tokens_meta.length;xy(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&xy(e,t[r].delimiters)}};function Ty(e,t){for(let n=t.length-1;n>=0;n--){const r=t[n];if(95!==r.marker&&42!==r.marker)continue;if(-1===r.end)continue;const i=t[r.end],o=n>0&&t[n-1].end===r.end+1&&t[n-1].marker===r.marker&&t[n-1].token===r.token-1&&t[r.end+1].token===i.token+1,a=String.fromCharCode(r.marker),s=e.tokens[r.token];s.type=o?"strong_open":"em_open",s.tag=o?"strong":"em",s.nesting=1,s.markup=o?a+a:a,s.content="";const l=e.tokens[i.token];l.type=o?"strong_close":"em_close",l.tag=o?"strong":"em",l.nesting=-1,l.markup=o?a+a:a,l.content="",o&&(e.tokens[t[n-1].token].content="",e.tokens[t[r.end+1].token].content="",n--)}}const Cy={tokenize:function(e,t){const n=e.pos,r=e.src.charCodeAt(n);if(t)return!1;if(95!==r&&42!==r)return!1;const i=e.scanDelims(e.pos,42===r);for(let o=0;o<i.length;o++){e.push("text","",0).content=String.fromCharCode(r),e.delimiters.push({marker:r,length:i.length,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close})}return e.pos+=i.length,!0},postProcess:function(e){const t=e.tokens_meta,n=e.tokens_meta.length;Ty(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&Ty(e,t[r].delimiters)}};const ky=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Sy=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;const _y=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Ny=/^&([a-z][a-z0-9]{1,31});/i;function Ay(e){const t={},n=e.length;if(!n)return;let r=0,i=-2;const o=[];for(let a=0;a<n;a++){const n=e[a];if(o.push(0),e[r].marker===n.marker&&i===n.token-1||(r=a),i=n.token,n.length=n.length||0,!n.close)continue;t.hasOwnProperty(n.marker)||(t[n.marker]=[-1,-1,-1,-1,-1,-1]);const s=t[n.marker][(n.open?3:0)+n.length%3];let l=r-o[r]-1,c=l;for(;l>s;l-=o[l]+1){const t=e[l];if(t.marker===n.marker&&(t.open&&t.end<0)){let r=!1;if((t.close||n.open)&&(t.length+n.length)%3==0&&(t.length%3==0&&n.length%3==0||(r=!0)),!r){const r=l>0&&!e[l-1].open?o[l-1]+1:0;o[a]=a-l+r,o[l]=r,n.open=!1,t.end=a,t.close=!1,c=-1,i=-2;break}}}-1!==c&&(t[n.marker][(n.open?3:0)+(n.length||0)%3]=c)}}const Dy=[["text",function(e,t){let n=e.pos;for(;n<e.posMax&&!yy(e.src.charCodeAt(n));)n++;return n!==e.pos&&(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}],["linkify",function(e,t){if(!e.md.options.linkify)return!1;if(e.linkLevel>0)return!1;const n=e.pos;if(n+3>e.posMax)return!1;if(58!==e.src.charCodeAt(n))return!1;if(47!==e.src.charCodeAt(n+1))return!1;if(47!==e.src.charCodeAt(n+2))return!1;const r=e.pending.match(by);if(!r)return!1;const i=r[1],o=e.md.linkify.matchAtStart(e.src.slice(n-i.length));if(!o)return!1;let a=o.url;if(a.length<=i.length)return!1;a=a.replace(/\*+$/,"");const s=e.md.normalizeLink(a);if(!e.md.validateLink(s))return!1;if(!t){e.pending=e.pending.slice(0,-i.length);const t=e.push("link_open","a",1);t.attrs=[["href",s]],t.markup="linkify",t.info="auto";e.push("text","",0).content=e.md.normalizeLinkText(a);const n=e.push("link_close","a",-1);n.markup="linkify",n.info="auto"}return e.pos+=a.length-i.length,!0}],["newline",function(e,t){let n=e.pos;if(10!==e.src.charCodeAt(n))return!1;const r=e.pending.length-1,i=e.posMax;if(!t)if(r>=0&&32===e.pending.charCodeAt(r))if(r>=1&&32===e.pending.charCodeAt(r-1)){let t=r-1;for(;t>=1&&32===e.pending.charCodeAt(t-1);)t--;e.pending=e.pending.slice(0,t),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n<i&&Ag(e.src.charCodeAt(n));)n++;return e.pos=n,!0}],["escape",function(e,t){let n=e.pos;const r=e.posMax;if(92!==e.src.charCodeAt(n))return!1;if(n++,n>=r)return!1;let i=e.src.charCodeAt(n);if(10===i){for(t||e.push("hardbreak","br",0),n++;n<r&&(i=e.src.charCodeAt(n),Ag(i));)n++;return e.pos=n,!0}let o=e.src[n];if(i>=55296&&i<=56319&&n+1<r){const t=e.src.charCodeAt(n+1);t>=56320&&t<=57343&&(o+=e.src[n+1],n++)}const a="\\"+o;if(!t){const t=e.push("text_special","",0);i<256&&0!==Ey[i]?t.content=o:t.content=a,t.markup=a,t.info="escape"}return e.pos=n+1,!0}],["backticks",function(e,t){let n=e.pos;if(96!==e.src.charCodeAt(n))return!1;const r=n;n++;const i=e.posMax;for(;n<i&&96===e.src.charCodeAt(n);)n++;const o=e.src.slice(r,n),a=o.length;if(e.backticksScanned&&(e.backticks[a]||0)<=r)return t||(e.pending+=o),e.pos+=a,!0;let s,l=n;for(;-1!==(s=e.src.indexOf("`",l));){for(l=s+1;l<i&&96===e.src.charCodeAt(l);)l++;const r=l-s;if(r===a){if(!t){const t=e.push("code_inline","code",0);t.markup=o,t.content=e.src.slice(n,s).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=l,!0}e.backticks[r]=s}return e.backticksScanned=!0,t||(e.pending+=o),e.pos+=a,!0}],["strikethrough",wy.tokenize],["emphasis",Cy.tokenize],["link",function(e,t){let n,r,i,o,a="",s="",l=e.pos,c=!0;if(91!==e.src.charCodeAt(e.pos))return!1;const u=e.pos,d=e.posMax,f=e.pos+1,p=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(p<0)return!1;let h=p+1;if(h<d&&40===e.src.charCodeAt(h)){for(c=!1,h++;h<d&&(n=e.src.charCodeAt(h),Ag(n)||10===n);h++);if(h>=d)return!1;if(l=h,i=e.md.helpers.parseLinkDestination(e.src,h,e.posMax),i.ok){for(a=e.md.normalizeLink(i.str),e.md.validateLink(a)?h=i.pos:a="",l=h;h<d&&(n=e.src.charCodeAt(h),Ag(n)||10===n);h++);if(i=e.md.helpers.parseLinkTitle(e.src,h,e.posMax),h<d&&l!==h&&i.ok)for(s=i.str,h=i.pos;h<d&&(n=e.src.charCodeAt(h),Ag(n)||10===n);h++);}(h>=d||41!==e.src.charCodeAt(h))&&(c=!0),h++}if(c){if(void 0===e.env.references)return!1;if(h<d&&91===e.src.charCodeAt(h)?(l=h+1,h=e.md.helpers.parseLinkLabel(e,h),h>=0?r=e.src.slice(l,h++):h=p+1):h=p+1,r||(r=e.src.slice(f,p)),o=e.env.references[Lg(r)],!o)return e.pos=u,!1;a=o.href,s=o.title}if(!t){e.pos=f,e.posMax=p;const t=[["href",a]];e.push("link_open","a",1).attrs=t,s&&t.push(["title",s]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=h,e.posMax=d,!0}],["image",function(e,t){let n,r,i,o,a,s,l,c,u="";const d=e.pos,f=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;const p=e.pos+2,h=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(h<0)return!1;if(o=h+1,o<f&&40===e.src.charCodeAt(o)){for(o++;o<f&&(n=e.src.charCodeAt(o),Ag(n)||10===n);o++);if(o>=f)return!1;for(c=o,s=e.md.helpers.parseLinkDestination(e.src,o,e.posMax),s.ok&&(u=e.md.normalizeLink(s.str),e.md.validateLink(u)?o=s.pos:u=""),c=o;o<f&&(n=e.src.charCodeAt(o),Ag(n)||10===n);o++);if(s=e.md.helpers.parseLinkTitle(e.src,o,e.posMax),o<f&&c!==o&&s.ok)for(l=s.str,o=s.pos;o<f&&(n=e.src.charCodeAt(o),Ag(n)||10===n);o++);else l="";if(o>=f||41!==e.src.charCodeAt(o))return e.pos=d,!1;o++}else{if(void 0===e.env.references)return!1;if(o<f&&91===e.src.charCodeAt(o)?(c=o+1,o=e.md.helpers.parseLinkLabel(e,o),o>=0?i=e.src.slice(c,o++):o=h+1):o=h+1,i||(i=e.src.slice(p,h)),a=e.env.references[Lg(i)],!a)return e.pos=d,!1;u=a.href,l=a.title}if(!t){r=e.src.slice(p,h);const t=[];e.md.inline.parse(r,e.md,e.env,t);const n=e.push("image","img",0),i=[["src",u],["alt",""]];n.attrs=i,n.children=t,n.content=r,l&&i.push(["title",l])}return e.pos=o,e.posMax=f,!0}],["autolink",function(e,t){let n=e.pos;if(60!==e.src.charCodeAt(n))return!1;const r=e.pos,i=e.posMax;for(;;){if(++n>=i)return!1;const t=e.src.charCodeAt(n);if(60===t)return!1;if(62===t)break}const o=e.src.slice(r+1,n);if(Sy.test(o)){const n=e.md.normalizeLink(o);if(!e.md.validateLink(n))return!1;if(!t){const t=e.push("link_open","a",1);t.attrs=[["href",n]],t.markup="autolink",t.info="auto";e.push("text","",0).content=e.md.normalizeLinkText(o);const r=e.push("link_close","a",-1);r.markup="autolink",r.info="auto"}return e.pos+=o.length+2,!0}if(ky.test(o)){const n=e.md.normalizeLink("mailto:"+o);if(!e.md.validateLink(n))return!1;if(!t){const t=e.push("link_open","a",1);t.attrs=[["href",n]],t.markup="autolink",t.info="auto";e.push("text","",0).content=e.md.normalizeLinkText(o);const r=e.push("link_close","a",-1);r.markup="autolink",r.info="auto"}return e.pos+=o.length+2,!0}return!1}],["html_inline",function(e,t){if(!e.md.options.html)return!1;const n=e.posMax,r=e.pos;if(60!==e.src.charCodeAt(r)||r+2>=n)return!1;const i=e.src.charCodeAt(r+1);if(33!==i&&63!==i&&47!==i&&!function(e){const t=32|e;return t>=97&&t<=122}(i))return!1;const o=e.src.slice(r).match(fy);if(!o)return!1;if(!t){const t=e.push("html_inline","",0);t.content=o[0],a=t.content,/^<a[>\s]/i.test(a)&&e.linkLevel++,function(e){return/^<\/a\s*>/i.test(e)}(t.content)&&e.linkLevel--}var a;return e.pos+=o[0].length,!0}],["entity",function(e,t){const n=e.pos,r=e.posMax;if(38!==e.src.charCodeAt(n))return!1;if(n+1>=r)return!1;if(35===e.src.charCodeAt(n+1)){const r=e.src.slice(n).match(_y);if(r){if(!t){const t="x"===r[1][0].toLowerCase()?parseInt(r[1].slice(1),16):parseInt(r[1],10),n=e.push("text_special","",0);n.content=gg(t)?yg(t):yg(65533),n.markup=r[0],n.info="entity"}return e.pos+=r[0].length,!0}}else{const r=e.src.slice(n).match(Ny);if(r){const n=fg(r[0]);if(n!==r[0]){if(!t){const t=e.push("text_special","",0);t.content=n,t.markup=r[0],t.info="entity"}return e.pos+=r[0].length,!0}}}return!1}]],Iy=[["balance_pairs",function(e){const t=e.tokens_meta,n=e.tokens_meta.length;Ay(e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&Ay(t[r].delimiters)}],["strikethrough",wy.postProcess],["emphasis",Cy.postProcess],["fragments_join",function(e){let t,n,r=0;const i=e.tokens,o=e.tokens.length;for(t=n=0;t<o;t++)i[t].nesting<0&&r--,i[t].level=r,i[t].nesting>0&&r++,"text"===i[t].type&&t+1<o&&"text"===i[t+1].type?i[t+1].content=i[t].content+i[t+1].content:(t!==n&&(i[n]=i[t]),n++);t!==n&&(i.length=n)}]];function Oy(){this.ruler=new Vg;for(let e=0;e<Dy.length;e++)this.ruler.push(Dy[e][0],Dy[e][1]);this.ruler2=new Vg;for(let e=0;e<Iy.length;e++)this.ruler2.push(Iy[e][0],Iy[e][1])}function Ly(e){return Array.prototype.slice.call(arguments,1).forEach((function(t){t&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e}function Fy(e){return Object.prototype.toString.call(e)}function Ry(e){return"[object Function]"===Fy(e)}function My(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}Oy.prototype.skipToken=function(e){const t=e.pos,n=this.ruler.getRules(""),r=n.length,i=e.md.options.maxNesting,o=e.cache;if(void 0!==o[t])return void(e.pos=o[t]);let a=!1;if(e.level<i){for(let s=0;s<r;s++)if(e.level++,a=n[s](e,!0),e.level--,a){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;a||e.pos++,o[t]=e.pos},Oy.prototype.tokenize=function(e){const t=this.ruler.getRules(""),n=t.length,r=e.posMax,i=e.md.options.maxNesting;for(;e.pos<r;){const o=e.pos;let a=!1;if(e.level<i)for(let r=0;r<n;r++)if(a=t[r](e,!1),a){if(o>=e.pos)throw new Error("inline rule didn't increment state.pos");break}if(a){if(e.pos>=r)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},Oy.prototype.parse=function(e,t,n,r){const i=new this.State(e,t,n,r);this.tokenize(i);const o=this.ruler2.getRules(""),a=o.length;for(let s=0;s<a;s++)o[s](i)},Oy.prototype.State=gy;const Py={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};const jy={"http:":{validate:function(e,t,n){const r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},Vy="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",By="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function $y(e){const t=e.re=function(e){const t={};e=e||{},t.src_Any=$v.source,t.src_Cc=Uv.source,t.src_Z=zv.source,t.src_P=Hv.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const n="[><|]";return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+"|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}(e.__opts__),n=e.__tlds__.slice();function r(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||n.push(Vy),n.push(t.src_xn),t.src_tlds=n.join("|"),t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");const i=[];function o(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){const n=e.__schemas__[t];if(null===n)return;const r={validate:null,link:null};if(e.__compiled__[t]=r,"[object Object]"===Fy(n))return!function(e){return"[object RegExp]"===Fy(e)}(n.validate)?Ry(n.validate)?r.validate=n.validate:o(t,n):r.validate=function(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}(n.validate),void(Ry(n.normalize)?r.normalize=n.normalize:n.normalize?o(t,n):r.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===Fy(e)}(n)?o(t,n):i.push(t)})),i.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:function(e,t){t.normalize(e)}};const a=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(My).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(e)}function Uy(e,t){const n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function Hy(e,t){const n=new Uy(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function qy(e,t){if(!(this instanceof qy))return new qy(e,t);var n;t||(n=e,Object.keys(n||{}).reduce((function(e,t){return e||Py.hasOwnProperty(t)}),!1)&&(t=e,e={})),this.__opts__=Ly({},Py,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=Ly({},jy,e),this.__compiled__={},this.__tlds__=By,this.__tlds_replaced__=!1,this.re={},$y(this)}qy.prototype.add=function(e,t){return this.__schemas__[e]=t,$y(this),this},qy.prototype.set=function(e){return this.__opts__=Ly(this.__opts__,e),this},qy.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let t,n,r,i,o,a,s,l,c;if(this.re.schema_test.test(e))for(s=this.re.schema_search,s.lastIndex=0;null!==(t=s.exec(e));)if(i=this.testSchemaAt(e,t[2],s.lastIndex),i){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(o=n.index+n[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,this.__last_index__=n.index+n[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(c=e.indexOf("@"),c>=0&&null!==(r=e.match(this.re.email_fuzzy))&&(o=r.index+r[1].length,a=r.index+r[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=a))),this.__index__>=0},qy.prototype.pretest=function(e){return this.re.pretest.test(e)},qy.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},qy.prototype.match=function(e){const t=[];let n=0;this.__index__>=0&&this.__text_cache__===e&&(t.push(Hy(this,n)),n=this.__last_index__);let r=n?e.slice(n):e;for(;this.test(r);)t.push(Hy(this,n)),r=r.slice(this.__last_index__),n+=this.__last_index__;return t.length?t:null},qy.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;const t=this.re.schema_at_start.exec(e);if(!t)return null;const n=this.testSchemaAt(e,t[2],t[0].length);return n?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+n,Hy(this,0)):null},qy.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,n){return e!==n[t-1]})).reverse(),$y(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,$y(this),this)},qy.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},qy.prototype.onCompile=function(){};const zy=2147483647,Wy=36,Gy=/^xn--/,Yy=/[^\0-\x7F]/,Ky=/[\x2E\u3002\uFF0E\uFF61]/g,Qy={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Xy=Math.floor,Jy=String.fromCharCode;function Zy(e){throw new RangeError(Qy[e])}function eb(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]);const i=function(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}((e=e.replace(Ky,".")).split("."),t).join(".");return r+i}function tb(e){const t=[];let n=0;const r=e.length;for(;n<r;){const i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){const r=e.charCodeAt(n++);56320==(64512&r)?t.push(((1023&i)<<10)+(1023&r)+65536):(t.push(i),n--)}else t.push(i)}return t}const nb=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},rb=function(e,t,n){let r=0;for(e=n?Xy(e/700):e>>1,e+=Xy(e/t);e>455;r+=Wy)e=Xy(e/35);return Xy(r+36*e/(e+38))},ib=function(e){const t=[],n=e.length;let r=0,i=128,o=72,a=e.lastIndexOf("-");a<0&&(a=0);for(let l=0;l<a;++l)e.charCodeAt(l)>=128&&Zy("not-basic"),t.push(e.charCodeAt(l));for(let l=a>0?a+1:0;l<n;){const a=r;for(let t=1,i=Wy;;i+=Wy){l>=n&&Zy("invalid-input");const a=(s=e.charCodeAt(l++))>=48&&s<58?s-48+26:s>=65&&s<91?s-65:s>=97&&s<123?s-97:Wy;a>=Wy&&Zy("invalid-input"),a>Xy((zy-r)/t)&&Zy("overflow"),r+=a*t;const c=i<=o?1:i>=o+26?26:i-o;if(a<c)break;const u=Wy-c;t>Xy(zy/u)&&Zy("overflow"),t*=u}const c=t.length+1;o=rb(r-a,c,0==a),Xy(r/c)>zy-i&&Zy("overflow"),i+=Xy(r/c),r%=c,t.splice(r++,0,i)}var s;return String.fromCodePoint(...t)},ob=function(e){const t=[],n=(e=tb(e)).length;let r=128,i=0,o=72;for(const l of e)l<128&&t.push(Jy(l));const a=t.length;let s=a;for(a&&t.push("-");s<n;){let n=zy;for(const t of e)t>=r&&t<n&&(n=t);const l=s+1;n-r>Xy((zy-i)/l)&&Zy("overflow"),i+=(n-r)*l,r=n;for(const c of e)if(c<r&&++i>zy&&Zy("overflow"),c===r){let e=i;for(let n=Wy;;n+=Wy){const r=n<=o?1:n>=o+26?26:n-o;if(e<r)break;const i=e-r,a=Wy-r;t.push(Jy(nb(r+i%a,0))),e=Xy(i/a)}t.push(Jy(nb(e,0))),o=rb(i,l,s===a),i=0,++s}++i,++r}return t.join("")},ab={version:"2.3.1",ucs2:{decode:tb,encode:e=>String.fromCodePoint(...e)},decode:ib,encode:ob,toASCII:function(e){return eb(e,(function(e){return Yy.test(e)?"xn--"+ob(e):e}))},toUnicode:function(e){return eb(e,(function(e){return Gy.test(e)?ib(e.slice(4).toLowerCase()):e}))}},sb={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},lb=/^(vbscript|javascript|file|data):/,cb=/^data:image\/(gif|png|jpeg|webp);/;function ub(e){const t=e.trim().toLowerCase();return!lb.test(t)||cb.test(t)}const db=["http:","https:","mailto:"];function fb(e){const t=Vv(e,!0);if(t.hostname&&(!t.protocol||db.indexOf(t.protocol)>=0))try{t.hostname=ab.toASCII(t.hostname)}catch(n){}return kv(Sv(t))}function pb(e){const t=Vv(e,!0);if(t.hostname&&(!t.protocol||db.indexOf(t.protocol)>=0))try{t.hostname=ab.toUnicode(t.hostname)}catch(n){}return Tv(Sv(t),Tv.defaultChars+"%")}function hb(e,t){if(!(this instanceof hb))return new hb(e,t);t||pg(e)||(t=e||{},e="default"),this.inline=new Oy,this.block=new vy,this.core=new iy,this.renderer=new jg,this.linkify=new qy,this.validateLink=ub,this.normalizeLink=fb,this.normalizeLinkText=pb,this.utils=Rg,this.helpers=mg({},Mg),this.options={},this.configure(e),t&&this.set(t)}hb.prototype.set=function(e){return mg(this.options,e),this},hb.prototype.configure=function(e){const t=this;if(pg(e)){const t=e;if(!(e=sb[t]))throw new Error('Wrong `markdown-it` preset "'+t+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach((function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)})),this},hb.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.enable(e,!0))}),this),n=n.concat(this.inline.ruler2.enable(e,!0));const r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},hb.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.disable(e,!0))}),this),n=n.concat(this.inline.ruler2.disable(e,!0));const r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},hb.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},hb.prototype.parse=function(e,t){if("string"!=typeof e)throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},hb.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},hb.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},hb.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var mb=("undefined"==typeof process||process.env,"production"),vb=function(e){return{isEnabled:function(t){return e.some((function(e){return!!t[e]}))}}},gb={measureLayout:vb(["layout","layoutId","drag"]),animation:vb(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:vb(["exit"]),drag:vb(["drag","dragControls"]),focus:vb(["whileFocus"]),hover:vb(["whileHover","onHoverStart","onHoverEnd"]),tap:vb(["whileTap","onTap","onTapStart","onTapCancel"]),pan:vb(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:vb(["whileInView","onViewportEnter","onViewportLeave"])};var yb=function(){},bb=e.createContext({strict:!1}),Eb=Object.keys(gb),xb=Eb.length;var wb=e.createContext({transformPagePoint:function(e){return e},isStatic:!1,reducedMotion:"never"}),Tb=e.createContext({});var Cb=e.createContext(null),kb="undefined"!=typeof document,Sb=kb?e.useLayoutEffect:e.useEffect,_b={current:null},Nb=!1;function Ab(){return!Nb&&function(){if(Nb=!0,kb)if(window.matchMedia){var e=window.matchMedia("(prefers-reduced-motion)"),t=function(){return _b.current=e.matches};e.addListener(t),t()}else _b.current=!1}(),lf(e.useState(_b.current),1)[0]}function Db(t,n,r,i){var o,a,s=e.useContext(bb),l=e.useContext(Tb).visualElement,c=e.useContext(Cb),u=(o=Ab(),"never"!==(a=e.useContext(wb).reducedMotion)&&("always"===a||o)),d=e.useRef(void 0);i||(i=s.renderer),!d.current&&i&&(d.current=i(t,{visualState:n,parent:l,props:r,presenceId:null==c?void 0:c.id,blockInitialAnimation:!1===(null==c?void 0:c.initial),shouldReduceMotion:u}));var f=d.current;return Sb((function(){null==f||f.syncRender()})),e.useEffect((function(){var e;null===(e=null==f?void 0:f.animationState)||void 0===e||e.animateChanges()})),Sb((function(){return function(){return null==f?void 0:f.notifyUnmount()}}),[]),f}function Ib(e){return"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Ob(e){return Array.isArray(e)}function Lb(e){return"string"==typeof e||Ob(e)}function Fb(e,t,n,r,i){var o;return void 0===r&&(r={}),void 0===i&&(i={}),"function"==typeof t&&(t=t(null!=n?n:e.custom,r,i)),"string"==typeof t&&(t=null===(o=e.variants)||void 0===o?void 0:o[t]),"function"==typeof t&&(t=t(null!=n?n:e.custom,r,i)),t}function Rb(e,t,n){var r=e.getProps();return Fb(r,t,null!=n?n:r.custom,function(e){var t={};return e.forEachValue((function(e,n){return t[n]=e.get()})),t}(e),function(e){var t={};return e.forEachValue((function(e,n){return t[n]=e.getVelocity()})),t}(e))}function Mb(e){var t;return"function"==typeof(null===(t=e.animate)||void 0===t?void 0:t.start)||Lb(e.initial)||Lb(e.animate)||Lb(e.whileHover)||Lb(e.whileDrag)||Lb(e.whileTap)||Lb(e.whileFocus)||Lb(e.exit)}function Pb(e){return Boolean(Mb(e)||e.variants)}function jb(t){var n=function(e,t){if(Mb(e)){var n=e.initial,r=e.animate;return{initial:!1===n||Lb(n)?n:void 0,animate:Lb(r)?r:void 0}}return!1!==e.inherit?t:{}}(t,e.useContext(Tb)),r=n.initial,i=n.animate;return e.useMemo((function(){return{initial:r,animate:i}}),[Vb(r),Vb(i)])}function Vb(e){return Array.isArray(e)?e.join(" "):e}function Bb(t){var n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}var $b={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Ub=1;var Hb=e.createContext({}),qb=e.createContext({});var zb=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return of(t,e),t.prototype.getSnapshotBeforeUpdate=function(){return this.updateProps(),null},t.prototype.componentDidUpdate=function(){},t.prototype.updateProps=function(){var e=this.props,t=e.visualElement,n=e.props;t&&t.setProps(n)},t.prototype.render=function(){return this.props.children},t}(e.Component);function Wb(t){var n=t.preloadedFeatures,r=t.createVisualElement,o=t.projectionNodeConstructor,a=t.useRender,s=t.useVisualState,l=t.Component;return n&&function(e){for(var t in e)null!==e[t]&&("projectionNodeConstructor"===t?gb.projectionNodeConstructor=e[t]:gb[t].Component=e[t])}(n),e.forwardRef((function(t,c){var u=function(t){var n,r=t.layoutId,i=null===(n=e.useContext(Hb))||void 0===n?void 0:n.id;return i&&void 0!==r?i+"-"+r:r}(t);t=af(af({},t),{layoutId:u});var d=e.useContext(wb),f=null,p=jb(t),h=d.isStatic?void 0:Bb((function(){if($b.hasEverUpdated)return Ub++})),m=s(t,d.isStatic);return!d.isStatic&&kb&&(p.visualElement=Db(l,m,af(af({},d),t),r),function(t,n,r,i){var o,a=n.layoutId,s=n.layout,l=n.drag,c=n.dragConstraints,u=n.layoutScroll,d=e.useContext(qb);i&&r&&!(null==r?void 0:r.projection)&&(r.projection=new i(t,r.getLatestValues(),null===(o=r.parent)||void 0===o?void 0:o.projection),r.projection.setOptions({layoutId:a,layout:s,alwaysMeasureLayout:Boolean(l)||c&&Ib(c),visualElement:r,scheduleRender:function(){return r.scheduleRender()},animationType:"string"==typeof s?s:"both",initialPromotionConfig:d,layoutScroll:u}))}(h,t,p.visualElement,o||gb.projectionNodeConstructor),f=function(t,n,r){var o=[],a=e.useContext(bb);if(!n)return null;"production"!==mb&&r&&a.strict;for(var s=0;s<xb;s++){var l=Eb[s],c=gb[l],u=c.isEnabled,d=c.Component;u(t)&&d&&o.push(i.createElement(d,af({key:l},t,{visualElement:n})))}return o}(t,p.visualElement,n)),i.createElement(zb,{visualElement:p.visualElement,props:af(af({},d),t)},f,i.createElement(Tb.Provider,{value:p},a(l,t,h,function(t,n,r){return e.useCallback((function(e){var i;e&&(null===(i=t.mount)||void 0===i||i.call(t,e)),n&&(e?n.mount(e):n.unmount()),r&&("function"==typeof r?r(e):Ib(r)&&(r.current=e))}),[n])}(m,p.visualElement,c),m,d.isStatic,p.visualElement)))}))}function Gb(e){function t(t,n){return void 0===n&&(n={}),Wb(e(t,n))}if("undefined"==typeof Proxy)return t;var n=new Map;return new Proxy(t,{get:function(e,r){return n.has(r)||n.set(r,t(r)),n.get(r)}})}var Yb=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function Kb(e){return"string"==typeof e&&!e.includes("-")&&!!(Yb.indexOf(e)>-1||/[A-Z]/.test(e))}var Qb={};var Xb=["","X","Y","Z"],Jb=["transformPerspective","x","y","z"];function Zb(e,t){return Jb.indexOf(e)-Jb.indexOf(t)}["translate","scale","rotate","skew"].forEach((function(e){return Xb.forEach((function(t){return Jb.push(e+t)}))}));var eE=new Set(Jb);function tE(e){return eE.has(e)}var nE=new Set(["originX","originY","originZ"]);function rE(e){return nE.has(e)}function iE(e,t){var n=t.layout,r=t.layoutId;return tE(e)||rE(e)||(n||void 0!==r)&&(!!Qb[e]||"opacity"===e)}var oE=function(e){return Boolean(null!==e&&"object"==typeof e&&e.getVelocity)},aE={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function sE(e){return e.startsWith("--")}var lE=function(e,t){return t&&"number"==typeof e?t.transform(e):e};const cE=(e,t)=>n=>Math.max(Math.min(n,t),e),uE=e=>e%1?Number(e.toFixed(5)):e,dE=/(-)?([\d]*\.?[\d])+/g,fE=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,pE=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function hE(e){return"string"==typeof e}const mE={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},vE=Object.assign(Object.assign({},mE),{transform:cE(0,1)}),gE=Object.assign(Object.assign({},mE),{default:1}),yE=e=>({test:t=>hE(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),bE=yE("deg"),EE=yE("%"),xE=yE("px"),wE=yE("vh"),TE=yE("vw"),CE=Object.assign(Object.assign({},EE),{parse:e=>EE.parse(e)/100,transform:e=>EE.transform(100*e)}),kE=(e,t)=>n=>Boolean(hE(n)&&pE.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),SE=(e,t,n)=>r=>{if(!hE(r))return r;const[i,o,a,s]=r.match(dE);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},_E={test:kE("hsl","hue"),parse:SE("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+EE.transform(uE(t))+", "+EE.transform(uE(n))+", "+uE(vE.transform(r))+")"},NE=cE(0,255),AE=Object.assign(Object.assign({},mE),{transform:e=>Math.round(NE(e))}),DE={test:kE("rgb","red"),parse:SE("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+AE.transform(e)+", "+AE.transform(t)+", "+AE.transform(n)+", "+uE(vE.transform(r))+")"};const IE={test:kE("#"),parse:function(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:DE.transform},OE={test:e=>DE.test(e)||IE.test(e)||_E.test(e),parse:e=>DE.test(e)?DE.parse(e):_E.test(e)?_E.parse(e):IE.parse(e),transform:e=>hE(e)?e:e.hasOwnProperty("red")?DE.transform(e):_E.transform(e)},LE="${c}",FE="${n}";function RE(e){"number"==typeof e&&(e=`${e}`);const t=[];let n=0;const r=e.match(fE);r&&(n=r.length,e=e.replace(fE,LE),t.push(...r.map(OE.parse)));const i=e.match(dE);return i&&(e=e.replace(dE,FE),t.push(...i.map(mE.parse))),{values:t,numColors:n,tokenised:e}}function ME(e){return RE(e).values}function PE(e){const{values:t,numColors:n,tokenised:r}=RE(e),i=t.length;return e=>{let t=r;for(let r=0;r<i;r++)t=t.replace(r<n?LE:FE,r<n?OE.transform(e[r]):uE(e[r]));return t}}const jE=e=>"number"==typeof e?0:e;const VE={test:function(e){var t,n,r,i;return isNaN(e)&&hE(e)&&(null!==(n=null===(t=e.match(dE))||void 0===t?void 0:t.length)&&void 0!==n?n:0)+(null!==(i=null===(r=e.match(fE))||void 0===r?void 0:r.length)&&void 0!==i?i:0)>0},parse:ME,createTransformer:PE,getAnimatableNone:function(e){const t=ME(e);return PE(e)(t.map(jE))}},BE=new Set(["brightness","contrast","saturate","opacity"]);function $E(e){let[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(dE)||[];if(!r)return e;const i=n.replace(r,"");let o=BE.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const UE=/([a-z-]*)\(.*?\)/g,HE=Object.assign(Object.assign({},VE),{getAnimatableNone:e=>{const t=e.match(UE);return t?t.map($E).join(" "):e}});var qE=af(af({},mE),{transform:Math.round}),zE={borderWidth:xE,borderTopWidth:xE,borderRightWidth:xE,borderBottomWidth:xE,borderLeftWidth:xE,borderRadius:xE,radius:xE,borderTopLeftRadius:xE,borderTopRightRadius:xE,borderBottomRightRadius:xE,borderBottomLeftRadius:xE,width:xE,maxWidth:xE,height:xE,maxHeight:xE,size:xE,top:xE,right:xE,bottom:xE,left:xE,padding:xE,paddingTop:xE,paddingRight:xE,paddingBottom:xE,paddingLeft:xE,margin:xE,marginTop:xE,marginRight:xE,marginBottom:xE,marginLeft:xE,rotate:bE,rotateX:bE,rotateY:bE,rotateZ:bE,scale:gE,scaleX:gE,scaleY:gE,scaleZ:gE,skew:bE,skewX:bE,skewY:bE,distance:xE,translateX:xE,translateY:xE,translateZ:xE,x:xE,y:xE,z:xE,perspective:xE,transformPerspective:xE,opacity:vE,originX:CE,originY:CE,originZ:xE,zIndex:qE,fillOpacity:vE,strokeOpacity:vE,numOctaves:qE};function WE(e,t,n,r){var i,o=e.style,a=e.vars,s=e.transform,l=e.transformKeys,c=e.transformOrigin;l.length=0;var u=!1,d=!1,f=!0;for(var p in t){var h=t[p];if(sE(p))a[p]=h;else{var m=zE[p],v=lE(h,m);if(tE(p)){if(u=!0,s[p]=v,l.push(p),!f)continue;h!==(null!==(i=m.default)&&void 0!==i?i:0)&&(f=!1)}else rE(p)?(c[p]=v,d=!0):o[p]=v}}u?o.transform=function(e,t,n,r){var i=e.transform,o=e.transformKeys,a=t.enableHardwareAcceleration,s=void 0===a||a,l=t.allowTransformNone,c=void 0===l||l,u="";o.sort(Zb);for(var d=!1,f=o.length,p=0;p<f;p++){var h=o[p];u+="".concat(aE[h]||h,"(").concat(i[h],") "),"z"===h&&(d=!0)}return!d&&s?u+="translateZ(0)":u=u.trim(),r?u=r(i,n?"":u):c&&n&&(u="none"),u}(e,n,f,r):r?o.transform=r({},""):!t.transform&&o.transform&&(o.transform="none"),d&&(o.transformOrigin=function(e){var t=e.originX,n=void 0===t?"50%":t,r=e.originY,i=void 0===r?"50%":r,o=e.originZ,a=void 0===o?0:o;return"".concat(n," ").concat(i," ").concat(a)}(c))}var GE=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function YE(e,t,n){for(var r in t)oE(t[r])||iE(r,n)||(e[r]=t[r])}function KE(t,n,r){var i={};return YE(i,t.style||{},t),Object.assign(i,function(t,n,r){var i=t.transformTemplate;return e.useMemo((function(){var e=GE();WE(e,n,{enableHardwareAcceleration:!r},i);var t=e.vars,o=e.style;return af(af({},t),o)}),[n])}(t,n,r)),t.transformValues&&(i=t.transformValues(i)),i}function QE(e,t,n){var r={},i=KE(e,t,n);return Boolean(e.drag)&&!1!==e.dragListener&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===e.drag?"none":"pan-".concat("x"===e.drag?"y":"x")),r.style=i,r}var XE=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover","whileInView","onViewportEnter","onViewportLeave","viewport","layoutScroll"]);function JE(e){return XE.has(e)}var ZE,ex=function(e){return!JE(e)};try{(ZE=require("@emotion/is-prop-valid").default)&&(ex=function(e){return e.startsWith("on")?!JE(e):ZE(e)})}catch(yR){}function tx(e,t,n){return"string"==typeof e?e:xE.transform(t+n*e)}var nx={offset:"strokeDashoffset",array:"strokeDasharray"};function rx(e,t,n,r){var i=t.attrX,o=t.attrY,a=t.originX,s=t.originY,l=t.pathLength,c=t.pathSpacing,u=void 0===c?1:c,d=t.pathOffset,f=void 0===d?0:d;WE(e,sf(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),n,r),e.attrs=e.style,e.style={};var p=e.attrs,h=e.style,m=e.dimensions;p.transform&&(m&&(h.transform=p.transform),delete p.transform),m&&(void 0!==a||void 0!==s||h.transform)&&(h.transformOrigin=function(e,t,n){var r=tx(t,e.x,e.width),i=tx(n,e.y,e.height);return"".concat(r," ").concat(i)}(m,void 0!==a?a:.5,void 0!==s?s:.5)),void 0!==i&&(p.x=i),void 0!==o&&(p.y=o),void 0!==l&&function(e,t,n,r,i){void 0===n&&(n=1),void 0===r&&(r=0),e.pathLength=1;var o=nx;e[o.offset]=xE.transform(-r);var a=xE.transform(t),s=xE.transform(n);e[o.array]="".concat(a," ").concat(s)}(p,l,u,f)}var ix=function(){return af(af({},GE()),{attrs:{}})};function ox(t,n){var r=e.useMemo((function(){var e=ix();return rx(e,n,{enableHardwareAcceleration:!1},t.transformTemplate),af(af({},e.attrs),{style:af({},e.style)})}),[n]);if(t.style){var i={};YE(i,t.style,t),r.style=af(af({},i),r.style)}return r}function ax(t){void 0===t&&(t=!1);return function(n,r,i,o,a,s){var l=a.latestValues,c=(Kb(n)?ox:QE)(r,l,s),u=function(e,t,n){var r={};for(var i in e)(ex(i)||!0===n&&JE(i)||!t&&!JE(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}(r,"string"==typeof n,t),d=af(af(af({},u),c),{ref:o});return i&&(d["data-projection-id"]=i),e.createElement(n,d)}}var sx=/([a-z])([A-Z])/g,lx=function(e){return e.replace(sx,"$1-$2").toLowerCase()};function cx(e,t,n,r){var i=t.style,o=t.vars;for(var a in Object.assign(e.style,i,r&&r.getProjectionStyles(n)),o)e.style.setProperty(a,o[a])}var ux=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function dx(e,t,n,r){for(var i in cx(e,t,void 0,r),t.attrs)e.setAttribute(ux.has(i)?i:lx(i),t.attrs[i])}function fx(e){var t=e.style,n={};for(var r in t)(oE(t[r])||iE(r,e))&&(n[r]=t[r]);return n}function px(e){var t=fx(e);for(var n in e){if(oE(e[n]))t["x"===n||"y"===n?"attr"+n.toUpperCase():n]=e[n]}return t}function hx(e){return"object"==typeof e&&"function"==typeof e.start}var mx=function(e){return Array.isArray(e)},vx=function(e){return Boolean(e&&"object"==typeof e&&e.mix&&e.toValue)},gx=function(e){return mx(e)?e[e.length-1]||0:e};function yx(e){var t=oE(e)?e.get():e;return vx(t)?t.toValue():t}function bx(e,t,n,r){var i=e.scrapeMotionValuesFromProps,o=e.createRenderState,a=e.onMount,s={latestValues:xx(t,n,r,i),renderState:o()};return a&&(s.mount=function(e){return a(t,e,s)}),s}var Ex=function(t){return function(n,r){var i=e.useContext(Tb),o=e.useContext(Cb);return r?bx(t,n,i,o):Bb((function(){return bx(t,n,i,o)}))}};function xx(e,t,n,r){var i={},o=!1===(null==n?void 0:n.initial),a=r(e);for(var s in a)i[s]=yx(a[s]);var l=e.initial,c=e.animate,u=Mb(e),d=Pb(e);t&&d&&!u&&!1!==e.inherit&&(null!=l||(l=t.initial),null!=c||(c=t.animate));var f=o||!1===l,p=f?c:l;p&&"boolean"!=typeof p&&!hx(p)&&(Array.isArray(p)?p:[p]).forEach((function(t){var n=Fb(e,t);if(n){var r=n.transitionEnd;n.transition;var o=sf(n,["transitionEnd","transition"]);for(var a in o){var s=o[a];if(Array.isArray(s))s=s[f?s.length-1:0];null!==s&&(i[a]=s)}for(var a in r)i[a]=r[a]}}));return i}var wx,Tx,Cx={useVisualState:Ex({scrapeMotionValuesFromProps:px,createRenderState:ix,onMount:function(e,t,n){var r=n.renderState,i=n.latestValues;try{r.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(aN){r.dimensions={x:0,y:0,width:0,height:0}}rx(r,i,{enableHardwareAcceleration:!1},e.transformTemplate),dx(t,r)}})},kx={useVisualState:Ex({scrapeMotionValuesFromProps:fx,createRenderState:GE})};function Sx(e,t,n,r){return void 0===r&&(r={passive:!0}),e.addEventListener(t,n,r),function(){return e.removeEventListener(t,n)}}function _x(t,n,r,i){e.useEffect((function(){var e=t.current;if(r&&e)return Sx(e,n,r,i)}),[t,n,r,i])}function Nx(e){return"undefined"!=typeof PointerEvent&&e instanceof PointerEvent?!("mouse"!==e.pointerType):e instanceof MouseEvent}function Ax(e){return!!e.touches}(Tx=wx||(wx={})).Animate="animate",Tx.Hover="whileHover",Tx.Tap="whileTap",Tx.Drag="whileDrag",Tx.Focus="whileFocus",Tx.InView="whileInView",Tx.Exit="exit";var Dx={pageX:0,pageY:0};function Ix(e,t){void 0===t&&(t="page");var n=e.touches[0]||e.changedTouches[0]||Dx;return{x:n[t+"X"],y:n[t+"Y"]}}function Ox(e,t){return void 0===t&&(t="page"),{x:e[t+"X"],y:e[t+"Y"]}}function Lx(e,t){return void 0===t&&(t="page"),{point:Ax(e)?Ix(e,t):Ox(e,t)}}var Fx=function(e,t){void 0===t&&(t=!1);var n,r=function(t){return e(t,Lx(t))};return t?(n=r,function(e){var t=e instanceof MouseEvent;(!t||t&&0===e.button)&&n(e)}):r},Rx=function(){return kb&&null===window.onpointerdown},Mx=function(){return kb&&null===window.ontouchstart},Px=function(){return kb&&null===window.onmousedown},jx={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Vx={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Bx(e){return Rx()?e:Mx()?Vx[e]:Px()?jx[e]:e}function $x(e,t,n,r){return Sx(e,Bx(t),Fx(n,"pointerdown"===t),r)}function Ux(e,t,n,r){return _x(e,Bx(t),n&&Fx(n,"pointerdown"===t),r)}function Hx(e){var t=null;return function(){return null===t&&(t=e,function(){t=null})}}var qx=Hx("dragHorizontal"),zx=Hx("dragVertical");function Wx(e){var t=!1;if("y"===e)t=zx();else if("x"===e)t=qx();else{var n=qx(),r=zx();n&&r?t=function(){n(),r()}:(n&&n(),r&&r())}return t}function Gx(){var e=Wx(!0);return!e||(e(),!1)}function Yx(e,t,n){return function(r,i){var o;Nx(r)&&!Gx()&&(null===(o=e.animationState)||void 0===o||o.setActive(wx.Hover,t),null==n||n(r,i))}}var Kx=function(e,t){return!!t&&(e===t||Kx(e,t.parentElement))};function Qx(t){return e.useEffect((function(){return function(){return t()}}),[])}const Xx=(e,t,n)=>Math.min(Math.max(n,e),t),Jx=.001,Zx=.01,ew=10,tw=.05,nw=1;function rw({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o,a=1-t;a=Xx(tw,nw,a),e=Xx(Zx,ew,e/1e3),a<1?(i=t=>{const r=t*a,i=r*e,o=r-n,s=ow(t,a),l=Math.exp(-i);return Jx-o/s*l},o=t=>{const r=t*a*e,o=r*n+n,s=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=ow(Math.pow(t,2),a);return(-i(t)+Jx>0?-1:1)*((o-s)*l)/c}):(i=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,o=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let i=1;i<iw;i++)r-=e(r)/t(r);return r}(i,o,5/e);if(e*=1e3,isNaN(s))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}const iw=12;function ow(e,t){return e*Math.sqrt(1-t*t)}const aw=["duration","bounce"],sw=["stiffness","damping","mass"];function lw(e,t){return t.some((t=>void 0!==e[t]))}function cw(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=sf(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:c,velocity:u,duration:d,isResolvedFromDuration:f}=function(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!lw(e,sw)&&lw(e,aw)){const n=rw(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}(o),p=uw,h=uw;function m(){const e=u?-u/1e3:0,r=n-t,o=l/(2*Math.sqrt(s*c)),a=Math.sqrt(s/c)/1e3;if(void 0===i&&(i=Math.min(Math.abs(n-t)/100,.4)),o<1){const t=ow(a,o);p=i=>{const s=Math.exp(-o*a*i);return n-s*((e+o*a*r)/t*Math.sin(t*i)+r*Math.cos(t*i))},h=n=>{const i=Math.exp(-o*a*n);return o*a*i*(Math.sin(t*n)*(e+o*a*r)/t+r*Math.cos(t*n))-i*(Math.cos(t*n)*(e+o*a*r)-t*r*Math.sin(t*n))}}else if(1===o)p=t=>n-Math.exp(-a*t)*(r+(e+a*r)*t);else{const t=a*Math.sqrt(o*o-1);p=i=>{const s=Math.exp(-o*a*i),l=Math.min(t*i,300);return n-s*((e+o*a*r)*Math.sinh(l)+t*r*Math.cosh(l))/t}}}return m(),{next:e=>{const t=p(e);if(f)a.done=e>=d;else{const o=1e3*h(e),s=Math.abs(o)<=r,l=Math.abs(n-t)<=i;a.done=s&&l}return a.value=a.done?n:t,a},flipTarget:()=>{u=-u,[t,n]=[n,t],m()}}}cw.needsInterpolation=(e,t)=>"string"==typeof e||"string"==typeof t;const uw=e=>0,dw=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},fw=(e,t,n)=>-n*e+n*t+e;function pw(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function hw({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let i=0,o=0,a=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=pw(s,r,e+1/3),o=pw(s,r,e),a=pw(s,r,e-1/3)}else i=o=a=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*a),alpha:r}}const mw=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},vw=[IE,DE,_E],gw=e=>vw.find((t=>t.test(e))),yw=(e,t)=>{let n=gw(e),r=gw(t),i=n.parse(e),o=r.parse(t);n===_E&&(i=hw(i),n=DE),r===_E&&(o=hw(o),r=DE);const a=Object.assign({},i);return e=>{for(const t in a)"alpha"!==t&&(a[t]=mw(i[t],o[t],e));return a.alpha=fw(i.alpha,o.alpha,e),n.transform(a)}},bw=e=>"number"==typeof e,Ew=(e,t)=>n=>t(e(n)),xw=(...e)=>e.reduce(Ew);function ww(e,t){return bw(e)?n=>fw(e,t,n):OE.test(e)?yw(e,t):Sw(e,t)}const Tw=(e,t)=>{const n=[...e],r=n.length,i=e.map(((e,n)=>ww(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}},Cw=(e,t)=>{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=ww(e[i],t[i]));return e=>{for(const t in r)n[t]=r[t](e);return n}};function kw(e){const t=VE.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a<n;a++)r||"number"==typeof t[a]?r++:void 0!==t[a].hue?o++:i++;return{parsed:t,numNumbers:r,numRGB:i,numHSL:o}}const Sw=(e,t)=>{const n=VE.createTransformer(t),r=kw(e),i=kw(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?xw(Tw(r.parsed,i.parsed),n):n=>`${n>0?t:e}`},_w=(e,t)=>n=>fw(e,t,n);function Nw(e,t,n){const r=[],i=n||("number"==typeof(o=e[0])?_w:"string"==typeof o?OE.test(o)?yw:Sw:Array.isArray(o)?Tw:"object"==typeof o?Cw:void 0);var o;const a=e.length-1;for(let s=0;s<a;s++){let n=i(e[s],e[s+1]);if(t){const e=Array.isArray(t)?t[s]:t;n=xw(e,n)}r.push(n)}return r}function Aw(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;yb(o===t.length),yb(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=Nw(t,r,i),s=2===o?function([e,t],[n]){return r=>n(dw(e,t,r))}(e,a):function(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let t=1;for(;t<n&&!(e[t]>i||t===r);t++);o=t-1}const s=dw(e[o],e[o+1],i);return t[o](s)}}(e,a);return n?t=>s(Xx(e[0],e[o-1],t)):s}const Dw=e=>t=>1-e(1-t),Iw=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ow=e=>t=>t*t*((e+1)*t-e),Lw=e=>e,Fw=(Rw=2,e=>Math.pow(e,Rw));var Rw;const Mw=Dw(Fw),Pw=Iw(Fw),jw=e=>1-Math.sin(Math.acos(e)),Vw=Dw(jw),Bw=Iw(Vw),$w=Ow(1.525),Uw=Dw($w),Hw=Iw($w),qw=(e=>{const t=Ow(e);return e=>(e*=2)<1?.5*t(e):.5*(2-Math.pow(2,-10*(e-1)))})(1.525),zw=e=>{if(1===e||0===e)return e;const t=e*e;return e<.36363636363636365?7.5625*t:e<.7272727272727273?9.075*t-9.9*e+3.4:e<.9?12.066481994459833*t-19.63545706371191*e+8.898060941828255:10.8*e*e-20.52*e+10.72},Ww=Dw(zw);function Gw(e,t){return e.map((()=>t||Pw)).splice(0,e.length-1)}function Yw({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=function(e,t){return e.map((e=>e*t))}(r&&r.length===a.length?r:function(e){const t=e.length;return e.map(((e,n)=>0!==n?n/(t-1):0))}(a),i);function l(){return Aw(s,a,{ease:Array.isArray(n)?n:Gw(a,n)})}let c=l();return{next:e=>(o.value=c(e),o.done=e>=i,o),flipTarget:()=>{a.reverse(),c=l()}}}const Kw={keyframes:Yw,spring:cw,decay:function({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,c=void 0===o?l:o(l);return c!==l&&(s=c-t),{next:e=>{const t=-s*Math.exp(-e/r);return a.done=!(t>i||t<-i),a.value=a.done?c:c+t,a},flipTarget:()=>{}}}};const Qw=1/60*1e3,Xw="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),Jw="undefined"!=typeof window?e=>window.requestAnimationFrame(e):e=>setTimeout((()=>e(Xw())),Qw);let Zw=!0,eT=!1,tT=!1;const nT={delta:0,timestamp:0},rT=["read","update","preRender","render","postRender"],iT=rT.reduce(((e,t)=>(e[t]=function(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(e,o=!1,s=!1)=>{const l=s&&i,c=l?t:n;return o&&a.add(e),-1===c.indexOf(e)&&(c.push(e),l&&i&&(r=t.length)),e},cancel:e=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1),a.delete(e)},process:l=>{if(i)o=!0;else{if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let n=0;n<r;n++){const r=t[n];r(l),a.has(r)&&(s.schedule(r),e())}i=!1,o&&(o=!1,s.process(l))}}};return s}((()=>eT=!0)),e)),{}),oT=rT.reduce(((e,t)=>{const n=iT[t];return e[t]=(e,t=!1,r=!1)=>(eT||uT(),n.schedule(e,t,r)),e}),{}),aT=rT.reduce(((e,t)=>(e[t]=iT[t].cancel,e)),{}),sT=rT.reduce(((e,t)=>(e[t]=()=>iT[t].process(nT),e)),{}),lT=e=>iT[e].process(nT),cT=e=>{eT=!1,nT.delta=Zw?Qw:Math.max(Math.min(e-nT.timestamp,40),1),nT.timestamp=e,tT=!0,rT.forEach(lT),tT=!1,eT&&(Zw=!1,Jw(cT))},uT=()=>{eT=!0,Zw=!0,tT||Jw(cT)},dT=()=>nT;function fT(e,t,n=0){return e-t-n}const pT=e=>{const t=({delta:t})=>e(t);return{start:()=>oT.update(t,!0),stop:()=>aT.update(t)}};function hT(e){var t,n,{from:r,autoplay:i=!0,driver:o=pT,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:c=0,onPlay:u,onStop:d,onComplete:f,onRepeat:p,onUpdate:h}=e,m=sf(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let v,g,y,{to:b}=m,E=0,x=m.duration,w=!1,T=!0;const C=function(e){if(Array.isArray(e.to))return Yw;if(Kw[e.type])return Kw[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?Yw:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?cw:Yw}(m);(null===(n=(t=C).needsInterpolation)||void 0===n?void 0:n.call(t,r,b))&&(y=Aw([0,100],[r,b],{clamp:!1}),r=0,b=100);const k=C(Object.assign(Object.assign({},m),{from:r,to:b}));function S(){E++,"reverse"===l?(T=E%2==0,a=function(e,t,n=0,r=!0){return r?fT(t+-e,t,n):t-(e-t)+n}(a,x,c,T)):(a=fT(a,x,c),"mirror"===l&&k.flipTarget()),w=!1,p&&p()}function _(e){if(T||(e=-e),a+=e,!w){const e=k.next(Math.max(0,a));g=e.value,y&&(g=y(g)),w=T?e.done:a<=0}null==h||h(g),w&&(0===E&&(null!=x||(x=a)),E<s?function(e,t,n,r){return r?e>=t+n:e<=-n}(a,x,c,T)&&S():(v.stop(),f&&f()))}return i&&(null==u||u(),v=o(_),v.start()),{stop:()=>{null==d||d(),v.stop()}}}function mT(e,t){return t?e*(1e3/t):0}const vT=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),gT=e=>vT(e)&&e.hasOwnProperty("z"),yT=(e,t)=>Math.abs(e-t);function bT(e,t){if(bw(e)&&bw(t))return yT(e,t);if(vT(e)&&vT(t)){const n=yT(e.x,t.x),r=yT(e.y,t.y),i=gT(e)&&gT(t)?yT(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const ET=(e,t)=>1-3*t+3*e,xT=(e,t)=>3*t-6*e,wT=e=>3*e,TT=(e,t,n)=>((ET(t,n)*e+xT(t,n))*e+wT(t))*e,CT=(e,t,n)=>3*ET(t,n)*e*e+2*xT(t,n)*e+wT(t),kT=1e-7,ST=10;const _T=8;const NT=.1;function AT(e,t,n,r){if(e===t&&n===r)return Lw;const i=new Float32Array(11);for(let a=0;a<11;++a)i[a]=TT(a*NT,e,n);function o(t){let r=0,o=1;for(;10!==o&&i[o]<=t;++o)r+=NT;--o;const a=r+(t-i[o])/(i[o+1]-i[o])*NT,s=CT(a,e,n);return s>=.001?function(e,t,n,r){for(let i=0;i<_T;++i){const i=CT(t,n,r);if(0===i)return t;t-=(TT(t,n,r)-e)/i}return t}(t,a,e,n):0===s?a:function(e,t,n,r,i){let o,a,s=0;do{a=t+(n-t)/2,o=TT(a,r,i)-e,o>0?n=a:t=a}while(Math.abs(o)>kT&&++s<ST);return a}(t,r,r+NT,e,n)}return e=>0===e||1===e?e:TT(o(e),t,r)}var DT=new Set;var IT=new WeakMap,OT=new WeakMap,LT=function(e){var t;null===(t=IT.get(e.target))||void 0===t||t(e)},FT=function(e){e.forEach(LT)};function RT(e,t,n){var r=function(e){var t=e.root,n=sf(e,["root"]),r=t||document;OT.has(r)||OT.set(r,{});var i=OT.get(r),o=JSON.stringify(n);return i[o]||(i[o]=new IntersectionObserver(FT,af({root:t},n))),i[o]}(t);return IT.set(e,n),r.observe(e),function(){IT.delete(e),r.unobserve(e)}}var MT={some:0,all:1};function PT(t,n,r,i){var o=i.root,a=i.margin,s=i.amount,l=void 0===s?"some":s,c=i.once;e.useEffect((function(){if(t){var e={root:null==o?void 0:o.current,rootMargin:a,threshold:"number"==typeof l?l:MT[l]};return RT(r.getInstance(),e,(function(e){var t,i=e.isIntersecting;if(n.isInView!==i&&(n.isInView=i,!c||i||!n.hasEnteredView)){i&&(n.hasEnteredView=!0),null===(t=r.animationState)||void 0===t||t.setActive(wx.InView,i);var o=r.getProps(),a=i?o.onViewportEnter:o.onViewportLeave;null==a||a(e)}}))}}),[t,o,a,l])}function jT(t,n,r,i){var o=i.fallback,a=void 0===o||o;e.useEffect((function(){var e;t&&a&&("production"!==mb&&(e="IntersectionObserver not available on this device. whileInView animations will trigger on mount.",DT.has(e)||(console.warn(e),DT.add(e))),requestAnimationFrame((function(){var e;n.hasEnteredView=!0;var t=r.getProps().onViewportEnter;null==t||t(null),null===(e=r.animationState)||void 0===e||e.setActive(wx.InView,!0)})))}),[t])}var VT=function(e){return function(t){return e(t),null}},BT={inView:VT((function(t){var n=t.visualElement,r=t.whileInView,i=t.onViewportEnter,o=t.onViewportLeave,a=t.viewport,s=void 0===a?{}:a,l=e.useRef({hasEnteredView:!1,isInView:!1}),c=Boolean(r||i||o);s.once&&l.current.hasEnteredView&&(c=!1),("undefined"==typeof IntersectionObserver?jT:PT)(c,l.current,n,s)})),tap:VT((function(t){var n=t.onTap,r=t.onTapStart,i=t.onTapCancel,o=t.whileTap,a=t.visualElement,s=n||r||i||o,l=e.useRef(!1),c=e.useRef(null),u={passive:!(r||n||i||m)};function d(){var e;null===(e=c.current)||void 0===e||e.call(c),c.current=null}function f(){var e;return d(),l.current=!1,null===(e=a.animationState)||void 0===e||e.setActive(wx.Tap,!1),!Gx()}function p(e,t){f()&&(Kx(a.getInstance(),e.target)?null==n||n(e,t):null==i||i(e,t))}function h(e,t){f()&&(null==i||i(e,t))}function m(e,t){var n;d(),l.current||(l.current=!0,c.current=xw($x(window,"pointerup",p,u),$x(window,"pointercancel",h,u)),null===(n=a.animationState)||void 0===n||n.setActive(wx.Tap,!0),null==r||r(e,t))}Ux(a,"pointerdown",s?m:void 0,u),Qx(d)})),focus:VT((function(e){var t=e.whileFocus,n=e.visualElement;_x(n,"focus",t?function(){var e;null===(e=n.animationState)||void 0===e||e.setActive(wx.Focus,!0)}:void 0),_x(n,"blur",t?function(){var e;null===(e=n.animationState)||void 0===e||e.setActive(wx.Focus,!1)}:void 0)})),hover:VT((function(e){var t=e.onHoverStart,n=e.onHoverEnd,r=e.whileHover,i=e.visualElement;Ux(i,"pointerenter",t||r?Yx(i,!0,t):void 0,{passive:!t}),Ux(i,"pointerleave",n||r?Yx(i,!1,n):void 0,{passive:!n})}))},$T=0,UT=function(){return $T++},HT=function(){return Bb(UT)};function qT(){var t=e.useContext(Cb);if(null===t)return[!0,null];var n=t.isPresent,r=t.onExitComplete,i=t.register,o=HT();e.useEffect((function(){return i(o)}),[]);return!n&&r?[!1,function(){return null==r?void 0:r(o)}]:[!0]}function zT(e,t){if(!Array.isArray(t))return!1;var n=t.length;if(n!==e.length)return!1;for(var r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var WT=function(e){return 1e3*e},GT={linear:Lw,easeIn:Fw,easeInOut:Pw,easeOut:Mw,circIn:jw,circInOut:Bw,circOut:Vw,backIn:$w,backInOut:Hw,backOut:Uw,anticipate:qw,bounceIn:Ww,bounceInOut:e=>e<.5?.5*(1-zw(1-2*e)):.5*zw(2*e-1)+.5,bounceOut:zw},YT=function(e){if(Array.isArray(e)){yb(4===e.length);var t=lf(e,4);return AT(t[0],t[1],t[2],t[3])}return"string"==typeof e?GT[e]:e},KT=function(e){return Array.isArray(e)&&"number"!=typeof e[0]},QT=function(e,t){return"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!VE.test(t)||t.startsWith("url(")))},XT=function(){return{type:"spring",stiffness:500,damping:25,restSpeed:10}},JT=function(e){return{type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restSpeed:10}},ZT=function(){return{type:"keyframes",ease:"linear",duration:.3}},eC=function(e){return{type:"keyframes",duration:.8,values:e}},tC={x:XT,y:XT,z:XT,rotate:XT,rotateX:XT,rotateY:XT,rotateZ:XT,scaleX:JT,scaleY:JT,scale:JT,opacity:ZT,backgroundColor:ZT,color:ZT,default:JT},nC=function(e,t){var n;return n=mx(t)?eC:tC[e]||tC.default,af({to:t},n(t))},rC=af(af({},zE),{color:OE,backgroundColor:OE,outlineColor:OE,fill:OE,stroke:OE,borderColor:OE,borderTopColor:OE,borderRightColor:OE,borderBottomColor:OE,borderLeftColor:OE,filter:HE,WebkitFilter:HE}),iC=function(e){return rC[e]};function oC(e,t){var n,r=iC(e);return r!==HE&&(r=VE),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,t)}function aC(e,t,n){var r;return Array.isArray(t.to)&&(null!==(r=e.duration)&&void 0!==r||(e.duration=.8)),function(e){Array.isArray(e.to)&&null===e.to[0]&&(e.to=cf([],lf(e.to),!1),e.to[0]=e.from)}(t),function(e){e.when,e.delay,e.delayChildren,e.staggerChildren,e.staggerDirection,e.repeat,e.repeatType,e.repeatDelay,e.from;var t=sf(e,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(t).length}(e)||(e=af(af({},e),nC(n,t.to))),af(af({},t),function(e){var t=e.ease,n=e.times,r=e.yoyo,i=e.flip,o=e.loop,a=sf(e,["ease","times","yoyo","flip","loop"]),s=af({},a);return n&&(s.offset=n),a.duration&&(s.duration=WT(a.duration)),a.repeatDelay&&(s.repeatDelay=WT(a.repeatDelay)),t&&(s.ease=KT(t)?t.map(YT):YT(t)),"tween"===a.type&&(s.type="keyframes"),(r||o||i)&&(r?s.repeatType="reverse":o?s.repeatType="loop":i&&(s.repeatType="mirror"),s.repeat=o||r||i||a.repeat),"spring"!==a.type&&(s.type="keyframes"),s}(e))}function sC(e,t,n,r,i){var o,a=uC(r,e),s=null!==(o=a.from)&&void 0!==o?o:t.get(),l=QT(e,n);return"none"===s&&l&&"string"==typeof n?s=oC(e,n):lC(s)&&"string"==typeof n?s=cC(n):!Array.isArray(n)&&lC(n)&&"string"==typeof s&&(n=cC(s)),QT(e,s)&&l&&!1!==a.type?function(){var r={from:s,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:function(e){return t.set(e)}};return"inertia"===a.type||"decay"===a.type?function({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:c,driver:u,onUpdate:d,onComplete:f,onStop:p}){let h;function m(e){return void 0!==n&&e<n||void 0!==r&&e>r}function v(e){return void 0===n?r:void 0===r||Math.abs(n-e)<Math.abs(r-e)?n:r}function g(e){null==h||h.stop(),h=hT(Object.assign(Object.assign({},e),{driver:u,onUpdate:t=>{var n;null==d||d(t),null===(n=e.onUpdate)||void 0===n||n.call(e,t)},onComplete:f,onStop:p}))}function y(e){g(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},e))}if(m(e))y({from:e,velocity:t,to:v(e)});else{let r=i*t+e;void 0!==c&&(r=c(r));const a=v(r),s=a===n?-1:1;let u,d;const f=e=>{u=d,d=e,t=mT(e-u,dT().delta),(1===s&&e>a||-1===s&&e<a)&&y({from:e,to:a,velocity:t})};g({type:"decay",from:e,velocity:t,timeConstant:o,power:i,restDelta:l,modifyTarget:c,onUpdate:m(r)?f:void 0})}return{stop:()=>null==h?void 0:h.stop()}}(af(af({},r),a)):hT(af(af({},aC(a,r,e)),{onUpdate:function(e){var t;r.onUpdate(e),null===(t=a.onUpdate)||void 0===t||t.call(a,e)},onComplete:function(){var e;r.onComplete(),null===(e=a.onComplete)||void 0===e||e.call(a)}}))}:function(){var e,r,o=gx(n);return t.set(o),i(),null===(e=null==a?void 0:a.onUpdate)||void 0===e||e.call(a,o),null===(r=null==a?void 0:a.onComplete)||void 0===r||r.call(a),{stop:function(){}}}}function lC(e){return 0===e||"string"==typeof e&&0===parseFloat(e)&&-1===e.indexOf(" ")}function cC(e){return"number"==typeof e?0:oC("",e)}function uC(e,t){return e[t]||e.default||e}function dC(e,t,n,r){return void 0===r&&(r={}),t.start((function(i){var o,a,s=sC(e,t,n,r,i),l=function(e,t){var n,r;return null!==(r=null!==(n=(uC(e,t)||{}).delay)&&void 0!==n?n:e.delay)&&void 0!==r?r:0}(r,e),c=function(){return a=s()};return l?o=window.setTimeout(c,WT(l)):c(),function(){clearTimeout(o),null==a||a.stop()}}))}var fC=function(e){return/^0[^.\s]+$/.test(e)};function pC(e,t){-1===e.indexOf(t)&&e.push(t)}function hC(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var mC=function(){function e(){this.subscriptions=[]}return e.prototype.add=function(e){var t=this;return pC(this.subscriptions,e),function(){return hC(t.subscriptions,e)}},e.prototype.notify=function(e,t,n){var r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(var i=0;i<r;i++){var o=this.subscriptions[i];o&&o(e,t,n)}},e.prototype.getSize=function(){return this.subscriptions.length},e.prototype.clear=function(){this.subscriptions.length=0},e}(),vC=function(){function e(e){var t,n=this;this.version="6.5.1",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new mC,this.velocityUpdateSubscribers=new mC,this.renderSubscribers=new mC,this.canTrackVelocity=!1,this.updateAndNotify=function(e,t){void 0===t&&(t=!0),n.prev=n.current,n.current=e;var r=dT(),i=r.delta,o=r.timestamp;n.lastUpdated!==o&&(n.timeDelta=i,n.lastUpdated=o,oT.postRender(n.scheduleVelocityCheck)),n.prev!==n.current&&n.updateSubscribers.notify(n.current),n.velocityUpdateSubscribers.getSize()&&n.velocityUpdateSubscribers.notify(n.getVelocity()),t&&n.renderSubscribers.notify(n.current)},this.scheduleVelocityCheck=function(){return oT.postRender(n.velocityCheck)},this.velocityCheck=function(e){e.timestamp!==n.lastUpdated&&(n.prev=n.current,n.velocityUpdateSubscribers.notify(n.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t)))}return e.prototype.onChange=function(e){return this.updateSubscribers.add(e)},e.prototype.clearListeners=function(){this.updateSubscribers.clear()},e.prototype.onRenderRequest=function(e){return e(this.get()),this.renderSubscribers.add(e)},e.prototype.attach=function(e){this.passiveEffect=e},e.prototype.set=function(e,t){void 0===t&&(t=!0),t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)},e.prototype.get=function(){return this.current},e.prototype.getPrevious=function(){return this.prev},e.prototype.getVelocity=function(){return this.canTrackVelocity?mT(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},e.prototype.start=function(e){var t=this;return this.stop(),new Promise((function(n){t.hasAnimated=!0,t.stopAnimation=e(n)})).then((function(){return t.clearAnimation()}))},e.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},e.prototype.isAnimating=function(){return!!this.stopAnimation},e.prototype.clearAnimation=function(){this.stopAnimation=null},e.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},e}();function gC(e){return new vC(e)}var yC=function(e){return function(t){return t.test(e)}},bC=[mE,xE,EE,bE,TE,wE,{test:function(e){return"auto"===e},parse:function(e){return e}}],EC=function(e){return bC.find(yC(e))},xC=cf(cf([],lf(bC),!1),[OE,VE],!1),wC=function(e){return xC.find(yC(e))};function TC(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,gC(n))}function CC(e,t){if(t)return(t[e]||t.default||t).from}function kC(e,t,n){var r;void 0===n&&(n={});var i=Rb(e,t,n.custom),o=(i||{}).transition,a=void 0===o?e.getDefaultTransition()||{}:o;n.transitionOverride&&(a=n.transitionOverride);var s=i?function(){return SC(e,i,n)}:function(){return Promise.resolve()},l=(null===(r=e.variantChildren)||void 0===r?void 0:r.size)?function(r){void 0===r&&(r=0);var i=a.delayChildren,o=void 0===i?0:i,s=a.staggerChildren,l=a.staggerDirection;return function(e,t,n,r,i,o){void 0===n&&(n=0);void 0===r&&(r=0);void 0===i&&(i=1);var a=[],s=(e.variantChildren.size-1)*r,l=1===i?function(e){return void 0===e&&(e=0),e*r}:function(e){return void 0===e&&(e=0),s-e*r};return Array.from(e.variantChildren).sort(_C).forEach((function(e,r){a.push(kC(e,t,af(af({},o),{delay:n+l(r)})).then((function(){return e.notifyAnimationComplete(t)})))})),Promise.all(a)}(e,t,o+r,s,l,n)}:function(){return Promise.resolve()},c=a.when;if(c){var u=lf("beforeChildren"===c?[s,l]:[l,s],2),d=u[0],f=u[1];return d().then(f)}return Promise.all([s(),l(n.delay)])}function SC(e,t,n){var r,i=void 0===n?{}:n,o=i.delay,a=void 0===o?0:o,s=i.transitionOverride,l=i.type,c=e.makeTargetAnimatable(t),u=c.transition,d=void 0===u?e.getDefaultTransition():u,f=c.transitionEnd,p=sf(c,["transition","transitionEnd"]);s&&(d=s);var h=[],m=l&&(null===(r=e.animationState)||void 0===r?void 0:r.getState()[l]);for(var v in p){var g=e.getValue(v),y=p[v];if(!(!g||void 0===y||m&&NC(m,v))){var b=af({delay:a},d);e.shouldReduceMotion&&tE(v)&&(b=af(af({},b),{type:!1,delay:0}));var E=dC(v,g,y,b);h.push(E)}}return Promise.all(h).then((function(){f&&function(e,t){var n=Rb(e,t),r=n?e.makeTargetAnimatable(n,!1):{},i=r.transitionEnd,o=void 0===i?{}:i;r.transition;var a=sf(r,["transitionEnd","transition"]);for(var s in a=af(af({},a),o))TC(e,s,gx(a[s]))}(e,f)}))}function _C(e,t){return e.sortNodePosition(t)}function NC(e,t){var n=e.protectedKeys,r=e.needsAnimating,i=n.hasOwnProperty(t)&&!0!==r[t];return r[t]=!1,i}var AC=[wx.Animate,wx.InView,wx.Focus,wx.Hover,wx.Tap,wx.Drag,wx.Exit],DC=cf([],lf(AC),!1).reverse(),IC=AC.length;function OC(e){return function(t){return Promise.all(t.map((function(t){var n=t.animation,r=t.options;return function(e,t,n){var r;if(void 0===n&&(n={}),e.notifyAnimationStart(t),Array.isArray(t)){var i=t.map((function(t){return kC(e,t,n)}));r=Promise.all(i)}else if("string"==typeof t)r=kC(e,t,n);else{var o="function"==typeof t?Rb(e,t,n.custom):t;r=SC(e,o,n)}return r.then((function(){return e.notifyAnimationComplete(t)}))}(e,n,r)})))}}function LC(e){var t,n=OC(e),r=((t={})[wx.Animate]=FC(!0),t[wx.InView]=FC(),t[wx.Hover]=FC(),t[wx.Tap]=FC(),t[wx.Drag]=FC(),t[wx.Focus]=FC(),t[wx.Exit]=FC(),t),i={},o=!0,a=function(t,n){var r=Rb(e,n);if(r){r.transition;var i=r.transitionEnd,o=sf(r,["transition","transitionEnd"]);t=af(af(af({},t),o),i)}return t};function s(t,s){for(var l,c=e.getProps(),u=e.getVariantContext(!0)||{},d=[],f=new Set,p={},h=1/0,m=function(n){var i=DC[n],m=r[i],v=null!==(l=c[i])&&void 0!==l?l:u[i],g=Lb(v),y=i===s?m.isActive:null;!1===y&&(h=n);var b=v===u[i]&&v!==c[i]&&g;if(b&&o&&e.manuallyAnimateOnMount&&(b=!1),m.protectedKeys=af({},p),!m.isActive&&null===y||!v&&!m.prevProp||hx(v)||"boolean"==typeof v)return"continue";var E=function(e,t){if("string"==typeof t)return t!==e;if(Ob(t))return!zT(t,e);return!1}(m.prevProp,v),x=E||i===s&&m.isActive&&!b&&g||n>h&&g,w=Array.isArray(v)?v:[v],T=w.reduce(a,{});!1===y&&(T={});var C=m.prevResolvedValues,k=void 0===C?{}:C,S=af(af({},k),T),_=function(e){x=!0,f.delete(e),m.needsAnimating[e]=!0};for(var N in S){var A=T[N],D=k[N];p.hasOwnProperty(N)||(A!==D?mx(A)&&mx(D)?!zT(A,D)||E?_(N):m.protectedKeys[N]=!0:void 0!==A?_(N):f.add(N):void 0!==A&&f.has(N)?_(N):m.protectedKeys[N]=!0)}m.prevProp=v,m.prevResolvedValues=T,m.isActive&&(p=af(af({},p),T)),o&&e.blockInitialAnimation&&(x=!1),x&&!b&&d.push.apply(d,cf([],lf(w.map((function(e){return{animation:e,options:af({type:i},t)}}))),!1))},v=0;v<IC;v++)m(v);if(i=af({},p),f.size){var g={};f.forEach((function(t){var n=e.getBaseTarget(t);void 0!==n&&(g[t]=n)})),d.push({animation:g})}var y=Boolean(d.length);return o&&!1===c.initial&&!e.manuallyAnimateOnMount&&(y=!1),o=!1,y?n(d):Promise.resolve()}return{isAnimated:function(e){return void 0!==i[e]},animateChanges:s,setActive:function(t,n,i){var o;if(r[t].isActive===n)return Promise.resolve();null===(o=e.variantChildren)||void 0===o||o.forEach((function(e){var r;return null===(r=e.animationState)||void 0===r?void 0:r.setActive(t,n)})),r[t].isActive=n;var a=s(i,t);for(var l in r)r[l].protectedKeys={};return a},setAnimateFunction:function(t){n=t(e)},getState:function(){return r}}}function FC(e){return void 0===e&&(e=!1),{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}var RC={animation:VT((function(t){var n=t.visualElement,r=t.animate;n.animationState||(n.animationState=LC(n)),hx(r)&&e.useEffect((function(){return r.subscribe(n)}),[r])})),exit:VT((function(t){var n=t.custom,r=t.visualElement,i=lf(qT(),2),o=i[0],a=i[1],s=e.useContext(Cb);e.useEffect((function(){var e,t;r.isPresent=o;var i=null===(e=r.animationState)||void 0===e?void 0:e.setActive(wx.Exit,!o,{custom:null!==(t=null==s?void 0:s.custom)&&void 0!==t?t:n});!o&&(null==i||i.then(a))}),[o])}))},MC=function(){function e(e,t,n){var r=this,i=(void 0===n?{}:n).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(r.lastMoveEvent&&r.lastMoveEventInfo){var e=VC(r.lastMoveEventInfo,r.history),t=null!==r.startEvent,n=bT(e.offset,{x:0,y:0})>=3;if(t||n){var i=e.point,o=dT().timestamp;r.history.push(af(af({},i),{timestamp:o}));var a=r.handlers,s=a.onStart,l=a.onMove;t||(s&&s(r.lastMoveEvent,e),r.startEvent=r.lastMoveEvent),l&&l(r.lastMoveEvent,e)}}},this.handlePointerMove=function(e,t){r.lastMoveEvent=e,r.lastMoveEventInfo=PC(t,r.transformPagePoint),Nx(e)&&0===e.buttons?r.handlePointerUp(e,t):oT.update(r.updatePoint,!0)},this.handlePointerUp=function(e,t){r.end();var n=r.handlers,i=n.onEnd,o=n.onSessionEnd,a=VC(PC(t,r.transformPagePoint),r.history);r.startEvent&&i&&i(e,a),o&&o(e,a)},!(Ax(e)&&e.touches.length>1)){this.handlers=t,this.transformPagePoint=i;var o=PC(Lx(e),this.transformPagePoint),a=o.point,s=dT().timestamp;this.history=[af(af({},a),{timestamp:s})];var l=t.onSessionStart;l&&l(e,VC(o,this.history)),this.removeListeners=xw($x(window,"pointermove",this.handlePointerMove),$x(window,"pointerup",this.handlePointerUp),$x(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(e){this.handlers=e},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),aT.update(this.updatePoint)},e}();function PC(e,t){return t?{point:t(e.point)}:e}function jC(e,t){return{x:e.x-t.x,y:e.y-t.y}}function VC(e,t){var n=e.point;return{point:n,delta:jC(n,$C(t)),offset:jC(n,BC(t)),velocity:UC(t,.1)}}function BC(e){return e[0]}function $C(e){return e[e.length-1]}function UC(e,t){if(e.length<2)return{x:0,y:0};for(var n=e.length-1,r=null,i=$C(e);n>=0&&(r=e[n],!(i.timestamp-r.timestamp>WT(t)));)n--;if(!r)return{x:0,y:0};var o=(i.timestamp-r.timestamp)/1e3;if(0===o)return{x:0,y:0};var a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function HC(e){return e.max-e.min}function qC(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=.01),bT(e,t)<n}function zC(e,t,n,r){void 0===r&&(r=.5),e.origin=r,e.originPoint=fw(t.min,t.max,e.origin),e.scale=HC(n)/HC(t),(qC(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=fw(n.min,n.max,e.origin)-e.originPoint,(qC(e.translate)||isNaN(e.translate))&&(e.translate=0)}function WC(e,t,n,r){zC(e.x,t.x,n.x,null==r?void 0:r.originX),zC(e.y,t.y,n.y,null==r?void 0:r.originY)}function GC(e,t,n){e.min=n.min+t.min,e.max=e.min+HC(t)}function YC(e,t,n){e.min=t.min-n.min,e.max=e.min+HC(t)}function KC(e,t,n){YC(e.x,t.x,n.x),YC(e.y,t.y,n.y)}function QC(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function XC(e,t){var n,r=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&(r=(n=lf([i,r],2))[0],i=n[1]),{min:r,max:i}}var JC=.35;function ZC(e,t,n){return{min:ek(e,t),max:ek(e,n)}}function ek(e,t){var n;return"number"==typeof e?e:null!==(n=e[t])&&void 0!==n?n:0}var tk=function(){return{x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}},nk=function(){return{x:{min:0,max:0},y:{min:0,max:0}}};function rk(e){return[e("x"),e("y")]}function ik(e){var t=e.top;return{x:{min:e.left,max:e.right},y:{min:t,max:e.bottom}}}function ok(e){return void 0===e||1===e}function ak(e){var t=e.scale,n=e.scaleX,r=e.scaleY;return!ok(t)||!ok(n)||!ok(r)}function sk(e){return ak(e)||lk(e.x)||lk(e.y)||e.z||e.rotate||e.rotateX||e.rotateY}function lk(e){return e&&"0%"!==e}function ck(e,t,n){return n+t*(e-n)}function uk(e,t,n,r,i){return void 0!==i&&(e=ck(e,i,r)),ck(e,n,r)+t}function dk(e,t,n,r,i){void 0===t&&(t=0),void 0===n&&(n=1),e.min=uk(e.min,t,n,r,i),e.max=uk(e.max,t,n,r,i)}function fk(e,t){var n=t.x,r=t.y;dk(e.x,n.translate,n.scale,n.originPoint),dk(e.y,r.translate,r.scale,r.originPoint)}function pk(e,t){e.min=e.min+t,e.max=e.max+t}function hk(e,t,n){var r=lf(n,3),i=r[0],o=r[1],a=r[2],s=void 0!==t[a]?t[a]:.5,l=fw(e.min,e.max,s);dk(e,t[i],t[o],l,t.scale)}var mk=["x","scaleX","originX"],vk=["y","scaleY","originY"];function gk(e,t){hk(e.x,t,mk),hk(e.y,t,vk)}function yk(e,t){return ik(function(e,t){if(!t)return e;var n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}var bk=new WeakMap,Ek=function(){function e(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=nk(),this.visualElement=e}return e.prototype.start=function(e,t){var n=this,r=(void 0===t?{}:t).snapToCursor,i=void 0!==r&&r;if(!1!==this.visualElement.isPresent){this.panSession=new MC(e,{onSessionStart:function(e){n.stopAnimation(),i&&n.snapToCursor(Lx(e,"page").point)},onStart:function(e,t){var r,i=n.getProps(),o=i.drag,a=i.dragPropagation,s=i.onDragStart;(!o||a||(n.openGlobalLock&&n.openGlobalLock(),n.openGlobalLock=Wx(o),n.openGlobalLock))&&(n.isDragging=!0,n.currentDirection=null,n.resolveConstraints(),n.visualElement.projection&&(n.visualElement.projection.isAnimationBlocked=!0,n.visualElement.projection.target=void 0),rk((function(e){var t,r,i=n.getAxisMotionValue(e).get()||0;if(EE.test(i)){var o=null===(r=null===(t=n.visualElement.projection)||void 0===t?void 0:t.layout)||void 0===r?void 0:r.actual[e];if(o)i=HC(o)*(parseFloat(i)/100)}n.originPoint[e]=i})),null==s||s(e,t),null===(r=n.visualElement.animationState)||void 0===r||r.setActive(wx.Drag,!0))},onMove:function(e,t){var r=n.getProps(),i=r.dragPropagation,o=r.dragDirectionLock,a=r.onDirectionLock,s=r.onDrag;if(i||n.openGlobalLock){var l=t.offset;if(o&&null===n.currentDirection)return n.currentDirection=function(e,t){void 0===t&&(t=10);var n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(l),void(null!==n.currentDirection&&(null==a||a(n.currentDirection)));n.updateAxis("x",t.point,l),n.updateAxis("y",t.point,l),n.visualElement.syncRender(),null==s||s(e,t)}},onSessionEnd:function(e,t){return n.stop(e,t)}},{transformPagePoint:this.visualElement.getTransformPagePoint()})}},e.prototype.stop=function(e,t){var n=this.isDragging;if(this.cancel(),n){var r=t.velocity;this.startAnimation(r);var i=this.getProps().onDragEnd;null==i||i(e,t)}},e.prototype.cancel=function(){var e,t;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),null===(e=this.panSession)||void 0===e||e.end(),this.panSession=void 0,!this.getProps().dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(t=this.visualElement.animationState)||void 0===t||t.setActive(wx.Drag,!1)},e.prototype.updateAxis=function(e,t,n){var r=this.getProps().drag;if(n&&xk(e,r,this.currentDirection)){var i,o,a,s,l,c=this.getAxisMotionValue(e),u=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=u,o=this.constraints[e],a=this.elastic[e],s=o.min,l=o.max,void 0!==s&&i<s?i=a?fw(s,i,a.min):Math.max(i,s):void 0!==l&&i>l&&(i=a?fw(l,i,a.max):Math.min(i,l)),u=i),c.set(u)}},e.prototype.resolveConstraints=function(){var e=this,t=this.getProps(),n=t.dragConstraints,r=t.dragElastic,i=(this.visualElement.projection||{}).layout,o=this.constraints;n&&Ib(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!n||!i)&&function(e,t){var n=t.top,r=t.left,i=t.bottom,o=t.right;return{x:QC(e.x,r,o),y:QC(e.y,n,i)}}(i.actual,n),this.elastic=function(e){return void 0===e&&(e=JC),!1===e?e=0:!0===e&&(e=JC),{x:ZC(e,"left","right"),y:ZC(e,"top","bottom")}}(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&rk((function(t){e.getAxisMotionValue(t)&&(e.constraints[t]=function(e,t){var n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(i.actual[t],e.constraints[t]))}))},e.prototype.resolveRefConstraints=function(){var e=this.getProps(),t=e.dragConstraints,n=e.onMeasureDragConstraints;if(!t||!Ib(t))return!1;var r=t.current,i=this.visualElement.projection;if(!i||!i.layout)return!1;var o,a,s,l,c,u=(o=r,a=i.root,s=this.visualElement.getTransformPagePoint(),l=yk(o,s),(c=a.scroll)&&(pk(l.x,c.x),pk(l.y,c.y)),l),d=function(e,t){return{x:XC(e.x,t.x),y:XC(e.y,t.y)}}(i.layout.actual,u);if(n){var f=n(function(e){var t=e.x,n=e.y;return{top:n.min,right:t.max,bottom:n.max,left:t.min}}(d));this.hasMutatedConstraints=!!f,f&&(d=ik(f))}return d},e.prototype.startAnimation=function(e){var t=this,n=this.getProps(),r=n.drag,i=n.dragMomentum,o=n.dragElastic,a=n.dragTransition,s=n.dragSnapToOrigin,l=n.onDragTransitionEnd,c=this.constraints||{},u=rk((function(n){var l;if(xk(n,r,t.currentDirection)){var u=null!==(l=null==c?void 0:c[n])&&void 0!==l?l:{};s&&(u={min:0,max:0});var d=o?200:1e6,f=o?40:1e7,p=af(af({type:"inertia",velocity:i?e[n]:0,bounceStiffness:d,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10},a),u);return t.startAxisValueAnimation(n,p)}}));return Promise.all(u).then(l)},e.prototype.startAxisValueAnimation=function(e,t){return dC(e,this.getAxisMotionValue(e),0,t)},e.prototype.stopAnimation=function(){var e=this;rk((function(t){return e.getAxisMotionValue(t).stop()}))},e.prototype.getAxisMotionValue=function(e){var t,n,r="_drag"+e.toUpperCase(),i=this.visualElement.getProps()[r];return i||this.visualElement.getValue(e,null!==(n=null===(t=this.visualElement.getProps().initial)||void 0===t?void 0:t[e])&&void 0!==n?n:0)},e.prototype.snapToCursor=function(e){var t=this;rk((function(n){if(xk(n,t.getProps().drag,t.currentDirection)){var r=t.visualElement.projection,i=t.getAxisMotionValue(n);if(r&&r.layout){var o=r.layout.actual[n],a=o.min,s=o.max;i.set(e[n]-fw(a,s,.5))}}}))},e.prototype.scalePositionWithinConstraints=function(){var e,t=this,n=this.getProps(),r=n.drag,i=n.dragConstraints,o=this.visualElement.projection;if(Ib(i)&&o&&this.constraints){this.stopAnimation();var a={x:0,y:0};rk((function(e){var n,r,i,o,s,l=t.getAxisMotionValue(e);if(l){var c=l.get();a[e]=(n={min:c,max:c},r=t.constraints[e],i=.5,o=HC(n),(s=HC(r))>o?i=dw(r.min,r.max-o,n.min):o>s&&(i=dw(n.min,n.max-s,r.min)),Xx(0,1,i))}}));var s=this.visualElement.getProps().transformTemplate;this.visualElement.getInstance().style.transform=s?s({},""):"none",null===(e=o.root)||void 0===e||e.updateScroll(),o.updateLayout(),this.resolveConstraints(),rk((function(e){if(xk(e,r,null)){var n=t.getAxisMotionValue(e),i=t.constraints[e],o=i.min,s=i.max;n.set(fw(o,s,a[e]))}}))}},e.prototype.addListeners=function(){var e,t=this;bk.set(this.visualElement,this);var n=$x(this.visualElement.getInstance(),"pointerdown",(function(e){var n=t.getProps(),r=n.drag,i=n.dragListener;r&&(void 0===i||i)&&t.start(e)})),r=function(){Ib(t.getProps().dragConstraints)&&(t.constraints=t.resolveRefConstraints())},i=this.visualElement.projection,o=i.addEventListener("measure",r);i&&!i.layout&&(null===(e=i.root)||void 0===e||e.updateScroll(),i.updateLayout()),r();var a=Sx(window,"resize",(function(){return t.scalePositionWithinConstraints()}));return i.addEventListener("didUpdate",(function(e){var n=e.delta,r=e.hasLayoutChanged;t.isDragging&&r&&(rk((function(e){var r=t.getAxisMotionValue(e);r&&(t.originPoint[e]+=n[e].translate,r.set(r.get()+n[e].translate))})),t.visualElement.syncRender())})),function(){a(),n(),o()}},e.prototype.getProps=function(){var e=this.visualElement.getProps(),t=e.drag,n=void 0!==t&&t,r=e.dragDirectionLock,i=void 0!==r&&r,o=e.dragPropagation,a=void 0!==o&&o,s=e.dragConstraints,l=void 0!==s&&s,c=e.dragElastic,u=void 0===c?JC:c,d=e.dragMomentum,f=void 0===d||d;return af(af({},e),{drag:n,dragDirectionLock:i,dragPropagation:a,dragConstraints:l,dragElastic:u,dragMomentum:f})},e}();function xk(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}var wk={pan:VT((function(t){var n=t.onPan,r=t.onPanStart,i=t.onPanEnd,o=t.onPanSessionStart,a=t.visualElement,s=n||r||i||o,l=e.useRef(null),c=e.useContext(wb).transformPagePoint,u={onSessionStart:o,onStart:r,onMove:n,onEnd:function(e,t){l.current=null,i&&i(e,t)}};e.useEffect((function(){null!==l.current&&l.current.updateHandlers(u)})),Ux(a,"pointerdown",s&&function(e){l.current=new MC(e,u,{transformPagePoint:c})}),Qx((function(){return l.current&&l.current.end()}))})),drag:VT((function(t){var n=t.dragControls,r=t.visualElement,i=Bb((function(){return new Ek(r)}));e.useEffect((function(){return n&&n.subscribe(i)}),[i,n]),e.useEffect((function(){return i.addListeners()}),[i])}))},Tk=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];var Ck=function(e){var t=e.treeType,n=void 0===t?"":t,r=e.build,i=e.getBaseTarget,o=e.makeTargetAnimatable,a=e.measureViewportBox,s=e.render,l=e.readValueFromInstance,c=e.removeValueFromRenderState,u=e.sortNodePosition,d=e.scrapeMotionValuesFromProps;return function(e,t){var f=e.parent,p=e.props,h=e.presenceId,m=e.blockInitialAnimation,v=e.visualState,g=e.shouldReduceMotion;void 0===t&&(t={});var y,b,E=!1,x=v.latestValues,w=v.renderState,T=function(){var e=Tk.map((function(){return new mC})),t={},n={clearAllListeners:function(){return e.forEach((function(e){return e.clear()}))},updatePropListeners:function(e){Tk.forEach((function(r){var i,o="on"+r,a=e[o];null===(i=t[r])||void 0===i||i.call(t),a&&(t[r]=n[o](a))}))}};return e.forEach((function(e,t){n["on"+Tk[t]]=function(t){return e.add(t)},n["notify"+Tk[t]]=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.notify.apply(e,cf([],lf(t),!1))}})),n}(),C=new Map,k=new Map,S={},_=af({},x);function N(){y&&E&&(A(),s(y,w,p.style,P.projection))}function A(){r(P,w,x,t,p)}function D(){T.notifyUpdate(x)}function I(e,t){var n=t.onChange((function(t){x[e]=t,p.onUpdate&&oT.update(D,!1,!0)})),r=t.onRenderRequest(P.scheduleRender);k.set(e,(function(){n(),r()}))}var O=d(p);for(var L in O){var F=O[L];void 0!==x[L]&&oE(F)&&F.set(x[L],!1)}var R=Mb(p),M=Pb(p),P=af(af({treeType:n,current:null,depth:f?f.depth+1:0,parent:f,children:new Set,presenceId:h,shouldReduceMotion:g,variantChildren:M?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null==f?void 0:f.isMounted()),blockInitialAnimation:m,isMounted:function(){return Boolean(y)},mount:function(e){E=!0,y=P.current=e,P.projection&&P.projection.mount(e),M&&f&&!R&&(b=null==f?void 0:f.addVariantChild(P)),C.forEach((function(e,t){return I(t,e)})),null==f||f.children.add(P),P.setProps(p)},unmount:function(){var e;null===(e=P.projection)||void 0===e||e.unmount(),aT.update(D),aT.render(N),k.forEach((function(e){return e()})),null==b||b(),null==f||f.children.delete(P),T.clearAllListeners(),y=void 0,E=!1},addVariantChild:function(e){var t,n=P.getClosestVariantNode();if(n)return null===(t=n.variantChildren)||void 0===t||t.add(e),function(){return n.variantChildren.delete(e)}},sortNodePosition:function(e){return u&&n===e.treeType?u(P.getInstance(),e.getInstance()):0},getClosestVariantNode:function(){return M?P:null==f?void 0:f.getClosestVariantNode()},getLayoutId:function(){return p.layoutId},getInstance:function(){return y},getStaticValue:function(e){return x[e]},setStaticValue:function(e,t){return x[e]=t},getLatestValues:function(){return x},setVisibility:function(e){P.isVisible!==e&&(P.isVisible=e,P.scheduleRender())},makeTargetAnimatable:function(e,t){return void 0===t&&(t=!0),o(P,e,p,t)},measureViewportBox:function(){return a(y,p)},addValue:function(e,t){P.hasValue(e)&&P.removeValue(e),C.set(e,t),x[e]=t.get(),I(e,t)},removeValue:function(e){var t;C.delete(e),null===(t=k.get(e))||void 0===t||t(),k.delete(e),delete x[e],c(e,w)},hasValue:function(e){return C.has(e)},getValue:function(e,t){var n=C.get(e);return void 0===n&&void 0!==t&&(n=gC(t),P.addValue(e,n)),n},forEachValue:function(e){return C.forEach(e)},readValue:function(e){var n;return null!==(n=x[e])&&void 0!==n?n:l(y,e,t)},setBaseTarget:function(e,t){_[e]=t},getBaseTarget:function(e){if(i){var t=i(p,e);if(void 0!==t&&!oE(t))return t}return _[e]}},T),{build:function(){return A(),w},scheduleRender:function(){oT.render(N,!1,!0)},syncRender:N,setProps:function(e){(e.transformTemplate||p.transformTemplate)&&P.scheduleRender(),p=e,T.updatePropListeners(e),S=function(e,t,n){var r;for(var i in t){var o=t[i],a=n[i];if(oE(o))e.addValue(i,o);else if(oE(a))e.addValue(i,gC(o));else if(a!==o)if(e.hasValue(i)){var s=e.getValue(i);!s.hasAnimated&&s.set(o)}else e.addValue(i,gC(null!==(r=e.getStaticValue(i))&&void 0!==r?r:o))}for(var i in n)void 0===t[i]&&e.removeValue(i);return t}(P,d(p),S)},getProps:function(){return p},getVariant:function(e){var t;return null===(t=p.variants)||void 0===t?void 0:t[e]},getDefaultTransition:function(){return p.transition},getTransformPagePoint:function(){return p.transformPagePoint},getVariantContext:function(e){if(void 0===e&&(e=!1),e)return null==f?void 0:f.getVariantContext();if(!R){var t=(null==f?void 0:f.getVariantContext())||{};return void 0!==p.initial&&(t.initial=p.initial),t}for(var n={},r=0;r<Sk;r++){var i=kk[r],o=p[i];(Lb(o)||!1===o)&&(n[i]=o)}return n}});return P}},kk=cf(["initial"],lf(AC),!1),Sk=kk.length;function _k(e){return"string"==typeof e&&e.startsWith("var(--")}var Nk=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Ak(e,t,n){var r=lf(function(e){var t=Nk.exec(e);if(!t)return[,];var n=lf(t,3);return[n[1],n[2]]}(e),2),i=r[0],o=r[1];if(i){var a=window.getComputedStyle(t).getPropertyValue(i);return a?a.trim():_k(o)?Ak(o,t):o}}var Dk,Ik,Ok=new Set(["width","height","top","left","right","bottom","x","y"]),Lk=function(e){return Ok.has(e)},Fk=function(e,t){e.set(t,!1),e.set(t)},Rk=function(e){return e===mE||e===xE};(Ik=Dk||(Dk={})).width="width",Ik.height="height",Ik.left="left",Ik.right="right",Ik.top="top",Ik.bottom="bottom";var Mk=function(e,t){return parseFloat(e.split(", ")[t])},Pk=function(e,t){return function(n,r){var i=r.transform;if("none"===i||!i)return 0;var o=i.match(/^matrix3d\((.+)\)$/);if(o)return Mk(o[1],t);var a=i.match(/^matrix\((.+)\)$/);return a?Mk(a[1],e):0}},jk=new Set(["x","y","z"]),Vk=Jb.filter((function(e){return!jk.has(e)}));var Bk={width:function(e,t){var n=e.x,r=t.paddingLeft,i=void 0===r?"0":r,o=t.paddingRight,a=void 0===o?"0":o;return n.max-n.min-parseFloat(i)-parseFloat(a)},height:function(e,t){var n=e.y,r=t.paddingTop,i=void 0===r?"0":r,o=t.paddingBottom,a=void 0===o?"0":o;return n.max-n.min-parseFloat(i)-parseFloat(a)},top:function(e,t){var n=t.top;return parseFloat(n)},left:function(e,t){var n=t.left;return parseFloat(n)},bottom:function(e,t){var n=e.y,r=t.top;return parseFloat(r)+(n.max-n.min)},right:function(e,t){var n=e.x,r=t.left;return parseFloat(r)+(n.max-n.min)},x:Pk(4,13),y:Pk(5,14)},$k=function(e,t,n,r){void 0===n&&(n={}),void 0===r&&(r={}),t=af({},t),r=af({},r);var i=Object.keys(t).filter(Lk),o=[],a=!1,s=[];if(i.forEach((function(i){var l=e.getValue(i);if(e.hasValue(i)){var c,u=n[i],d=EC(u),f=t[i];if(mx(f)){var p=f.length,h=null===f[0]?1:0;u=f[h],d=EC(u);for(var m=h;m<p;m++)c?yb(EC(f[m])===c):c=EC(f[m])}else c=EC(f);if(d!==c)if(Rk(d)&&Rk(c)){var v=l.get();"string"==typeof v&&l.set(parseFloat(v)),"string"==typeof f?t[i]=parseFloat(f):Array.isArray(f)&&c===xE&&(t[i]=f.map(parseFloat))}else(null==d?void 0:d.transform)&&(null==c?void 0:c.transform)&&(0===u||0===f)?0===u?l.set(c.transform(u)):t[i]=d.transform(f):(a||(o=function(e){var t=[];return Vk.forEach((function(n){var r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t.length&&e.syncRender(),t}(e),a=!0),s.push(i),r[i]=void 0!==r[i]?r[i]:t[i],Fk(l,f))}})),s.length){var l=s.indexOf("height")>=0?window.pageYOffset:null,c=function(e,t,n){var r=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),a=o.display,s={};"none"===a&&t.setStaticValue("display",e.display||"block"),n.forEach((function(e){s[e]=Bk[e](r,o)})),t.syncRender();var l=t.measureViewportBox();return n.forEach((function(n){var r=t.getValue(n);Fk(r,s[n]),e[n]=Bk[n](l,o)})),e}(t,e,s);return o.length&&o.forEach((function(t){var n=lf(t,2),r=n[0],i=n[1];e.getValue(r).set(i)})),e.syncRender(),null!==l&&window.scrollTo({top:l}),{target:c,transitionEnd:r}}return{target:t,transitionEnd:r}};function Uk(e,t,n,r){return function(e){return Object.keys(e).some(Lk)}(t)?$k(e,t,n,r):{target:t,transitionEnd:r}}var Hk=function(e,t,n,r){var i=function(e,t,n){var r,i=sf(t,[]),o=e.getInstance();if(!(o instanceof Element))return{target:i,transitionEnd:n};for(var a in n&&(n=af({},n)),e.forEachValue((function(e){var t=e.get();if(_k(t)){var n=Ak(t,o);n&&e.set(n)}})),i){var s=i[a];if(_k(s)){var l=Ak(s,o);l&&(i[a]=l,n&&(null!==(r=n[a])&&void 0!==r||(n[a]=s)))}}return{target:i,transitionEnd:n}}(e,t,r);return Uk(e,t=i.target,n,r=i.transitionEnd)};var qk={treeType:"dom",readValueFromInstance:function(e,t){if(tE(t)){var n=iC(t);return n&&n.default||0}var r,i=(r=e,window.getComputedStyle(r));return(sE(t)?i.getPropertyValue(t):i[t])||0},sortNodePosition:function(e,t){return 2&e.compareDocumentPosition(t)?1:-1},getBaseTarget:function(e,t){var n;return null===(n=e.style)||void 0===n?void 0:n[t]},measureViewportBox:function(e,t){return yk(e,t.transformPagePoint)},resetTransform:function(e,t,n){var r=n.transformTemplate;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform:function(e,t){e.style.transform=t.style.transform},removeValueFromRenderState:function(e,t){var n=t.vars,r=t.style;delete n[e],delete r[e]},makeTargetAnimatable:function(e,t,n,r){var i=n.transformValues;void 0===r&&(r=!0);var o=t.transition,a=t.transitionEnd,s=sf(t,["transition","transitionEnd"]),l=function(e,t,n){var r,i,o={};for(var a in e)o[a]=null!==(r=CC(a,t))&&void 0!==r?r:null===(i=n.getValue(a))||void 0===i?void 0:i.get();return o}(s,o||{},e);if(i&&(a&&(a=i(a)),s&&(s=i(s)),l&&(l=i(l))),r){!function(e,t,n){var r,i,o,a,s=Object.keys(t).filter((function(t){return!e.hasValue(t)})),l=s.length;if(l)for(var c=0;c<l;c++){var u=s[c],d=t[u],f=null;Array.isArray(d)&&(f=d[0]),null===f&&(f=null!==(i=null!==(r=n[u])&&void 0!==r?r:e.readValue(u))&&void 0!==i?i:t[u]),null!=f&&("string"==typeof f&&(/^\-?\d*\.?\d+$/.test(f)||fC(f))?f=parseFloat(f):!wC(f)&&VE.test(d)&&(f=oC(u,d)),e.addValue(u,gC(f)),null!==(o=(a=n)[u])&&void 0!==o||(a[u]=f),e.setBaseTarget(u,f))}}(e,s,l);var c=Hk(e,s,l,a);a=c.transitionEnd,s=c.target}return af({transition:o,transitionEnd:a},s)},scrapeMotionValuesFromProps:fx,build:function(e,t,n,r,i){void 0!==e.isVisible&&(t.style.visibility=e.isVisible?"visible":"hidden"),WE(t,n,r,i.transformTemplate)},render:cx},zk=Ck(qk),Wk=Ck(af(af({},qk),{getBaseTarget:function(e,t){return e[t]},readValueFromInstance:function(e,t){var n;return tE(t)?(null===(n=iC(t))||void 0===n?void 0:n.default)||0:(t=ux.has(t)?t:lx(t),e.getAttribute(t))},scrapeMotionValuesFromProps:px,build:function(e,t,n,r,i){rx(t,n,r,i.transformTemplate)},render:dx})),Gk=function(e,t){return Kb(e)?Wk(t,{enableHardwareAcceleration:!1}):zk(t,{enableHardwareAcceleration:!0})};function Yk(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Kk={correct:function(e,t){if(!t.target)return e;if("string"==typeof e){if(!xE.test(e))return e;e=parseFloat(e)}var n=Yk(e,t.target.x),r=Yk(e,t.target.y);return"".concat(n,"% ").concat(r,"%")}},Qk="_$css",Xk={correct:function(e,t){var n=t.treeScale,r=t.projectionDelta,i=e,o=e.includes("var("),a=[];o&&(e=e.replace(Nk,(function(e){return a.push(e),Qk})));var s=VE.parse(e);if(s.length>5)return i;var l=VE.createTransformer(e),c="number"!=typeof s[0]?1:0,u=r.x.scale*n.x,d=r.y.scale*n.y;s[0+c]/=u,s[1+c]/=d;var f=fw(u,d,.5);"number"==typeof s[2+c]&&(s[2+c]/=f),"number"==typeof s[3+c]&&(s[3+c]/=f);var p=l(s);if(o){var h=0;p=p.replace(Qk,(function(){var e=a[h];return h++,e}))}return p}},Jk=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return of(t,e),t.prototype.componentDidMount=function(){var e,t=this,n=this.props,r=n.visualElement,i=n.layoutGroup,o=n.switchLayoutGroup,a=n.layoutId,s=r.projection;e=Zk,Object.assign(Qb,e),s&&((null==i?void 0:i.group)&&i.group.add(s),(null==o?void 0:o.register)&&a&&o.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",(function(){t.safeToRemove()})),s.setOptions(af(af({},s.options),{onExitComplete:function(){return t.safeToRemove()}}))),$b.hasEverUpdated=!0},t.prototype.getSnapshotBeforeUpdate=function(e){var t=this,n=this.props,r=n.layoutDependency,i=n.visualElement,o=n.drag,a=n.isPresent,s=i.projection;return s?(s.isPresent=a,o||e.layoutDependency!==r||void 0===r?s.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?s.promote():s.relegate()||oT.postRender((function(){var e;(null===(e=s.getStack())||void 0===e?void 0:e.members.length)||t.safeToRemove()}))),null):null},t.prototype.componentDidUpdate=function(){var e=this.props.visualElement.projection;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.visualElement,n=e.layoutGroup,r=e.switchLayoutGroup,i=t.projection;i&&(i.scheduleCheckAfterUnmount(),(null==n?void 0:n.group)&&n.group.remove(i),(null==r?void 0:r.deregister)&&r.deregister(i))},t.prototype.safeToRemove=function(){var e=this.props.safeToRemove;null==e||e()},t.prototype.render=function(){return null},t}(e.Component);var Zk={borderRadius:af(af({},Kk),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Kk,borderTopRightRadius:Kk,borderBottomLeftRadius:Kk,borderBottomRightRadius:Kk,boxShadow:Xk},eS={measureLayout:function(t){var n=lf(qT(),2),r=n[0],i=n[1],o=e.useContext(Hb);return e.createElement(Jk,af({},t,{layoutGroup:o,switchLayoutGroup:e.useContext(qb),isPresent:r,safeToRemove:i}))}};var tS=["TopLeft","TopRight","BottomLeft","BottomRight"],nS=tS.length,rS=function(e){return"string"==typeof e?parseFloat(e):e},iS=function(e){return"number"==typeof e||xE.test(e)};function oS(e,t){var n;return null!==(n=e[t])&&void 0!==n?n:e.borderRadius}var aS=lS(0,.5,Vw),sS=lS(.5,.95,Lw);function lS(e,t,n){return function(r){return r<e?0:r>t?1:n(dw(e,t,r))}}function cS(e,t){e.min=t.min,e.max=t.max}function uS(e,t){cS(e.x,t.x),cS(e.y,t.y)}function dS(e,t,n,r,i){return e=ck(e-=t,1/n,r),void 0!==i&&(e=ck(e,1/i,r)),e}function fS(e,t,n,r,i){var o=lf(n,3),a=o[0],s=o[1],l=o[2];!function(e,t,n,r,i,o,a){if(void 0===t&&(t=0),void 0===n&&(n=1),void 0===r&&(r=.5),void 0===o&&(o=e),void 0===a&&(a=e),EE.test(t)&&(t=parseFloat(t),t=fw(a.min,a.max,t/100)-a.min),"number"==typeof t){var s=fw(o.min,o.max,r);e===o&&(s-=t),e.min=dS(e.min,t,n,s,i),e.max=dS(e.max,t,n,s,i)}}(e,t[a],t[s],t[l],t.scale,r,i)}var pS=["x","scaleX","originX"],hS=["y","scaleY","originY"];function mS(e,t,n,r){fS(e.x,t,pS,null==n?void 0:n.x,null==r?void 0:r.x),fS(e.y,t,hS,null==n?void 0:n.y,null==r?void 0:r.y)}function vS(e){return 0===e.translate&&1===e.scale}function gS(e){return vS(e.x)&&vS(e.y)}function yS(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}var bS=function(){function e(){this.members=[]}return e.prototype.add=function(e){pC(this.members,e),e.scheduleRender()},e.prototype.remove=function(e){if(hC(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){var t=this.members[this.members.length-1];t&&this.promote(t)}},e.prototype.relegate=function(e){var t,n=this.members.findIndex((function(t){return e===t}));if(0===n)return!1;for(var r=n;r>=0;r--){var i=this.members[r];if(!1!==i.isPresent){t=i;break}}return!!t&&(this.promote(t),!0)},e.prototype.promote=function(e,t){var n,r=this.lead;e!==r&&(this.prevLead=r,this.lead=e,e.show(),r&&(r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,t&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues,e.snapshot.isShared=!0),(null===(n=e.root)||void 0===n?void 0:n.isUpdating)&&(e.isLayoutDirty=!0),!1===e.options.crossfade&&r.hide()))},e.prototype.exitAnimationComplete=function(){this.members.forEach((function(e){var t,n,r,i,o;null===(n=(t=e.options).onExitComplete)||void 0===n||n.call(t),null===(o=null===(r=e.resumingFrom)||void 0===r?void 0:(i=r.options).onExitComplete)||void 0===o||o.call(i)}))},e.prototype.scheduleRender=function(){this.members.forEach((function(e){e.instance&&e.scheduleRender(!1)}))},e.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},e}(),ES="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function xS(e,t,n){var r=e.x.translate/t.x,i=e.y.translate/t.y,o="translate3d(".concat(r,"px, ").concat(i,"px, 0) ");if(o+="scale(".concat(1/t.x,", ").concat(1/t.y,") "),n){var a=n.rotate,s=n.rotateX,l=n.rotateY;a&&(o+="rotate(".concat(a,"deg) ")),s&&(o+="rotateX(".concat(s,"deg) ")),l&&(o+="rotateY(".concat(l,"deg) "))}var c=e.x.scale*t.x,u=e.y.scale*t.y;return(o+="scale(".concat(c,", ").concat(u,")"))===ES?"none":o}var wS=function(e,t){return e.depth-t.depth},TS=function(){function e(){this.children=[],this.isDirty=!1}return e.prototype.add=function(e){pC(this.children,e),this.isDirty=!0},e.prototype.remove=function(e){hC(this.children,e),this.isDirty=!0},e.prototype.forEach=function(e){this.isDirty&&this.children.sort(wS),this.isDirty=!1,this.children.forEach(e)},e}();function CS(e){var t=e.attachResizeListener,n=e.defaultParent,r=e.measureScroll,i=e.checkIsScrollRoot,o=e.resetTransform;return function(){function e(e,t,r){var i=this;void 0===t&&(t={}),void 0===r&&(r=null==n?void 0:n()),this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=function(){i.isUpdating&&(i.isUpdating=!1,i.clearAllSnapshots())},this.updateProjection=function(){i.nodes.forEach(IS),i.nodes.forEach(OS)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=e,this.latestValues=t,this.root=r?r.root||r:this,this.path=r?cf(cf([],lf(r.path),!1),[r],!1):[],this.parent=r,this.depth=r?r.depth+1:0,e&&this.root.registerPotentialNode(e,this);for(var o=0;o<this.path.length;o++)this.path[o].shouldResetTransform=!0;this.root===this&&(this.nodes=new TS)}return e.prototype.addEventListener=function(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new mC),this.eventHandlers.get(e).add(t)},e.prototype.notifyListeners=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=this.eventHandlers.get(e);null==r||r.notify.apply(r,cf([],lf(t),!1))},e.prototype.hasListeners=function(e){return this.eventHandlers.has(e)},e.prototype.registerPotentialNode=function(e,t){this.potentialNodes.set(e,t)},e.prototype.mount=function(e,n){var r,i=this;if(void 0===n&&(n=!1),!this.instance){this.isSVG=e instanceof SVGElement&&"svg"!==e.tagName,this.instance=e;var o=this.options,a=o.layoutId,s=o.layout,l=o.visualElement;if(l&&!l.getInstance()&&l.mount(e),this.root.nodes.add(this),null===(r=this.parent)||void 0===r||r.children.add(this),this.id&&this.root.potentialNodes.delete(this.id),n&&(s||a)&&(this.isLayoutDirty=!0),t){var c,u=function(){return i.root.updateBlockedByResize=!1};t(e,(function(){i.root.updateBlockedByResize=!0,clearTimeout(c),c=window.setTimeout(u,250),$b.hasAnimatedSinceResize&&($b.hasAnimatedSinceResize=!1,i.nodes.forEach(DS))}))}a&&this.root.registerSharedNode(a,this),!1!==this.options.animate&&l&&(a||s)&&this.addEventListener("didUpdate",(function(e){var t,n,r,o,a,s=e.delta,c=e.hasLayoutChanged,u=e.hasRelativeTargetChanged,d=e.layout;if(i.isTreeAnimationBlocked())return i.target=void 0,void(i.relativeTarget=void 0);var f=null!==(n=null!==(t=i.options.transition)&&void 0!==t?t:l.getDefaultTransition())&&void 0!==n?n:jS,p=l.getProps(),h=p.onLayoutAnimationStart,m=p.onLayoutAnimationComplete,v=!i.targetLayout||!yS(i.targetLayout,d)||u,g=!c&&u;if((null===(r=i.resumeFrom)||void 0===r?void 0:r.instance)||g||c&&(v||!i.currentAnimation)){i.resumeFrom&&(i.resumingFrom=i.resumeFrom,i.resumingFrom.resumingFrom=void 0),i.setAnimationOrigin(s,g);var y=af(af({},uC(f,"layout")),{onPlay:h,onComplete:m});l.shouldReduceMotion&&(y.delay=0,y.type=!1),i.startAnimation(y)}else c||0!==i.animationProgress||i.finishAnimation(),i.isLead()&&(null===(a=(o=i.options).onExitComplete)||void 0===a||a.call(o));i.targetLayout=d}))}},e.prototype.unmount=function(){var e,t;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),null===(e=this.getStack())||void 0===e||e.remove(this),null===(t=this.parent)||void 0===t||t.children.delete(this),this.instance=void 0,aT.preRender(this.updateProjection)},e.prototype.blockUpdate=function(){this.updateManuallyBlocked=!0},e.prototype.unblockUpdate=function(){this.updateManuallyBlocked=!1},e.prototype.isUpdateBlocked=function(){return this.updateManuallyBlocked||this.updateBlockedByResize},e.prototype.isTreeAnimationBlocked=function(){var e;return this.isAnimationBlocked||(null===(e=this.parent)||void 0===e?void 0:e.isTreeAnimationBlocked())||!1},e.prototype.startUpdate=function(){var e;this.isUpdateBlocked()||(this.isUpdating=!0,null===(e=this.nodes)||void 0===e||e.forEach(LS))},e.prototype.willUpdate=function(e){var t,n,r;if(void 0===e&&(e=!0),this.root.isUpdateBlocked())null===(n=(t=this.options).onExitComplete)||void 0===n||n.call(t);else if(!this.root.isUpdating&&this.root.startUpdate(),!this.isLayoutDirty){this.isLayoutDirty=!0;for(var i=0;i<this.path.length;i++){var o=this.path[i];o.shouldResetTransform=!0,o.updateScroll()}var a=this.options,s=a.layoutId,l=a.layout;if(void 0!==s||l){var c=null===(r=this.options.visualElement)||void 0===r?void 0:r.getProps().transformTemplate;this.prevTransformTemplateValue=null==c?void 0:c(this.latestValues,""),this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}}},e.prototype.didUpdate=function(){if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(NS);this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(VS),this.potentialNodes.clear()),this.nodes.forEach(AS),this.nodes.forEach(kS),this.nodes.forEach(SS),this.clearAllSnapshots(),sT.update(),sT.preRender(),sT.render())},e.prototype.clearAllSnapshots=function(){this.nodes.forEach(_S),this.sharedNodes.forEach(FS)},e.prototype.scheduleUpdateProjection=function(){oT.preRender(this.updateProjection,!1,!0)},e.prototype.scheduleCheckAfterUnmount=function(){var e=this;oT.postRender((function(){e.isLayoutDirty?e.root.didUpdate():e.root.checkUpdateFailed()}))},e.prototype.updateSnapshot=function(){if(!this.snapshot&&this.instance){var e=this.measure(),t=this.removeTransform(this.removeElementScroll(e));$S(t),this.snapshot={measured:e,layout:t,latestValues:{}}}},e.prototype.updateLayout=function(){var e;if(this.instance&&(this.updateScroll(),this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty)){if(this.resumeFrom&&!this.resumeFrom.instance)for(var t=0;t<this.path.length;t++){this.path[t].updateScroll()}var n=this.measure();$S(n);var r=this.layout;this.layout={measured:n,actual:this.removeElementScroll(n)},this.layoutCorrected=nk(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.actual),null===(e=this.options.visualElement)||void 0===e||e.notifyLayoutMeasure(this.layout.actual,null==r?void 0:r.actual)}},e.prototype.updateScroll=function(){this.options.layoutScroll&&this.instance&&(this.isScrollRoot=i(this.instance),this.scroll=r(this.instance))},e.prototype.resetTransform=function(){var e;if(o){var t=this.isLayoutDirty||this.shouldResetTransform,n=this.projectionDelta&&!gS(this.projectionDelta),r=null===(e=this.options.visualElement)||void 0===e?void 0:e.getProps().transformTemplate,i=null==r?void 0:r(this.latestValues,""),a=i!==this.prevTransformTemplateValue;t&&(n||sk(this.latestValues)||a)&&(o(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}},e.prototype.measure=function(){var e=this.options.visualElement;if(!e)return nk();var t=e.measureViewportBox(),n=this.root.scroll;return n&&(pk(t.x,n.x),pk(t.y,n.y)),t},e.prototype.removeElementScroll=function(e){var t=nk();uS(t,e);for(var n=0;n<this.path.length;n++){var r=this.path[n],i=r.scroll,o=r.options,a=r.isScrollRoot;if(r!==this.root&&i&&o.layoutScroll){if(a){uS(t,e);var s=this.root.scroll;s&&(pk(t.x,-s.x),pk(t.y,-s.y))}pk(t.x,i.x),pk(t.y,i.y)}}return t},e.prototype.applyTransform=function(e,t){void 0===t&&(t=!1);var n=nk();uS(n,e);for(var r=0;r<this.path.length;r++){var i=this.path[r];!t&&i.options.layoutScroll&&i.scroll&&i!==i.root&&gk(n,{x:-i.scroll.x,y:-i.scroll.y}),sk(i.latestValues)&&gk(n,i.latestValues)}return sk(this.latestValues)&&gk(n,this.latestValues),n},e.prototype.removeTransform=function(e){var t,n=nk();uS(n,e);for(var r=0;r<this.path.length;r++){var i=this.path[r];if(i.instance&&sk(i.latestValues)){ak(i.latestValues)&&i.updateSnapshot();var o=nk();uS(o,i.measure()),mS(n,i.latestValues,null===(t=i.snapshot)||void 0===t?void 0:t.layout,o)}}return sk(this.latestValues)&&mS(n,this.latestValues),n},e.prototype.setTargetDelta=function(e){this.targetDelta=e,this.root.scheduleUpdateProjection()},e.prototype.setOptions=function(e){var t;this.options=af(af(af({},this.options),e),{crossfade:null===(t=e.crossfade)||void 0===t||t})},e.prototype.clearMeasurements=function(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1},e.prototype.resolveTargetDelta=function(){var e,t,n,r,i=this.options,o=i.layout,a=i.layoutId;this.layout&&(o||a)&&(this.targetDelta||this.relativeTarget||(this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&this.relativeParent.layout&&(this.relativeTarget=nk(),this.relativeTargetOrigin=nk(),KC(this.relativeTargetOrigin,this.layout.actual,this.relativeParent.layout.actual),uS(this.relativeTarget,this.relativeTargetOrigin))),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=nk(),this.targetWithTransforms=nk()),this.relativeTarget&&this.relativeTargetOrigin&&(null===(e=this.relativeParent)||void 0===e?void 0:e.target)?(t=this.target,n=this.relativeTarget,r=this.relativeParent.target,GC(t.x,n.x,r.x),GC(t.y,n.y,r.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.actual):uS(this.target,this.layout.actual),fk(this.target,this.targetDelta)):uS(this.target,this.layout.actual),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&Boolean(this.relativeParent.resumingFrom)===Boolean(this.resumingFrom)&&!this.relativeParent.options.layoutScroll&&this.relativeParent.target&&(this.relativeTarget=nk(),this.relativeTargetOrigin=nk(),KC(this.relativeTargetOrigin,this.target,this.relativeParent.target),uS(this.relativeTarget,this.relativeTargetOrigin)))))},e.prototype.getClosestProjectingParent=function(){if(this.parent&&!sk(this.parent.latestValues))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()},e.prototype.calcProjection=function(){var e,t=this.options,n=t.layout,r=t.layoutId;if(this.isTreeAnimating=Boolean((null===(e=this.parent)||void 0===e?void 0:e.isTreeAnimating)||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),this.layout&&(n||r)){var i=this.getLead();uS(this.layoutCorrected,this.layout.actual),function(e,t,n,r){var i,o;void 0===r&&(r=!1);var a=n.length;if(a){var s,l;t.x=t.y=1;for(var c=0;c<a;c++)l=(s=n[c]).projectionDelta,"contents"!==(null===(o=null===(i=s.instance)||void 0===i?void 0:i.style)||void 0===o?void 0:o.display)&&(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&gk(e,{x:-s.scroll.x,y:-s.scroll.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,fk(e,l)),r&&sk(s.latestValues)&&gk(e,s.latestValues))}}(this.layoutCorrected,this.treeScale,this.path,Boolean(this.resumingFrom)||this!==i);var o=i.target;if(o){this.projectionDelta||(this.projectionDelta=tk(),this.projectionDeltaWithTransform=tk());var a=this.treeScale.x,s=this.treeScale.y,l=this.projectionTransform;WC(this.projectionDelta,this.layoutCorrected,o,this.latestValues),this.projectionTransform=xS(this.projectionDelta,this.treeScale),this.projectionTransform===l&&this.treeScale.x===a&&this.treeScale.y===s||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",o))}}},e.prototype.hide=function(){this.isVisible=!1},e.prototype.show=function(){this.isVisible=!0},e.prototype.scheduleRender=function(e){var t,n,r;void 0===e&&(e=!0),null===(n=(t=this.options).scheduleRender)||void 0===n||n.call(t),e&&(null===(r=this.getStack())||void 0===r||r.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)},e.prototype.setAnimationOrigin=function(e,t){var n,r=this;void 0===t&&(t=!1);var i=this.snapshot,o=(null==i?void 0:i.latestValues)||{},a=af({},this.latestValues),s=tk();this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!t;var l=nk(),c=null==i?void 0:i.isShared,u=((null===(n=this.getStack())||void 0===n?void 0:n.members.length)||0)<=1,d=Boolean(c&&!u&&!0===this.options.crossfade&&!this.path.some(PS));this.animationProgress=0,this.mixTargetDelta=function(t){var n,i,f,p,h,m=t/1e3;RS(s.x,e.x,m),RS(s.y,e.y,m),r.setTargetDelta(s),r.relativeTarget&&r.relativeTargetOrigin&&r.layout&&(null===(n=r.relativeParent)||void 0===n?void 0:n.layout)&&(KC(l,r.layout.actual,r.relativeParent.layout.actual),i=r.relativeTarget,f=r.relativeTargetOrigin,p=l,h=m,MS(i.x,f.x,p.x,h),MS(i.y,f.y,p.y,h)),c&&(r.animationValues=a,function(e,t,n,r,i,o){var a,s,l,c;i?(e.opacity=fw(0,null!==(a=n.opacity)&&void 0!==a?a:1,aS(r)),e.opacityExit=fw(null!==(s=t.opacity)&&void 0!==s?s:1,0,sS(r))):o&&(e.opacity=fw(null!==(l=t.opacity)&&void 0!==l?l:1,null!==(c=n.opacity)&&void 0!==c?c:1,r));for(var u=0;u<nS;u++){var d="border".concat(tS[u],"Radius"),f=oS(t,d),p=oS(n,d);void 0===f&&void 0===p||(f||(f=0),p||(p=0),0===f||0===p||iS(f)===iS(p)?(e[d]=Math.max(fw(rS(f),rS(p),r),0),(EE.test(p)||EE.test(f))&&(e[d]+="%")):e[d]=p)}(t.rotate||n.rotate)&&(e.rotate=fw(t.rotate||0,n.rotate||0,r))}(a,o,r.latestValues,m,d,u)),r.root.scheduleUpdateProjection(),r.scheduleRender(),r.animationProgress=m},this.mixTargetDelta(0)},e.prototype.startAnimation=function(e){var t,n,r=this;this.notifyListeners("animationStart"),null===(t=this.currentAnimation)||void 0===t||t.stop(),this.resumingFrom&&(null===(n=this.resumingFrom.currentAnimation)||void 0===n||n.stop()),this.pendingAnimation&&(aT.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=oT.update((function(){$b.hasAnimatedSinceResize=!0,r.currentAnimation=function(e,t,n){void 0===n&&(n={});var r=oE(e)?e:gC(e);return dC("",r,t,n),{stop:function(){return r.stop()},isAnimating:function(){return r.isAnimating()}}}(0,1e3,af(af({},e),{onUpdate:function(t){var n;r.mixTargetDelta(t),null===(n=e.onUpdate)||void 0===n||n.call(e,t)},onComplete:function(){var t;null===(t=e.onComplete)||void 0===t||t.call(e),r.completeAnimation()}})),r.resumingFrom&&(r.resumingFrom.currentAnimation=r.currentAnimation),r.pendingAnimation=void 0}))},e.prototype.completeAnimation=function(){var e;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),null===(e=this.getStack())||void 0===e||e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")},e.prototype.finishAnimation=function(){var e;this.currentAnimation&&(null===(e=this.mixTargetDelta)||void 0===e||e.call(this,1e3),this.currentAnimation.stop()),this.completeAnimation()},e.prototype.applyTransformsToTarget=function(){var e=this.getLead(),t=e.targetWithTransforms,n=e.target,r=e.layout,i=e.latestValues;t&&n&&r&&(uS(t,n),gk(t,i),WC(this.projectionDeltaWithTransform,this.layoutCorrected,t,i))},e.prototype.registerSharedNode=function(e,t){var n,r,i;this.sharedNodes.has(e)||this.sharedNodes.set(e,new bS),this.sharedNodes.get(e).add(t),t.promote({transition:null===(n=t.options.initialPromotionConfig)||void 0===n?void 0:n.transition,preserveFollowOpacity:null===(i=null===(r=t.options.initialPromotionConfig)||void 0===r?void 0:r.shouldPreserveFollowOpacity)||void 0===i?void 0:i.call(r,t)})},e.prototype.isLead=function(){var e=this.getStack();return!e||e.lead===this},e.prototype.getLead=function(){var e;return this.options.layoutId&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this},e.prototype.getPrevLead=function(){var e;return this.options.layoutId?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0},e.prototype.getStack=function(){var e=this.options.layoutId;if(e)return this.root.sharedNodes.get(e)},e.prototype.promote=function(e){var t=void 0===e?{}:e,n=t.needsReset,r=t.transition,i=t.preserveFollowOpacity,o=this.getStack();o&&o.promote(this,i),n&&(this.projectionDelta=void 0,this.needsReset=!0),r&&this.setOptions({transition:r})},e.prototype.relegate=function(){var e=this.getStack();return!!e&&e.relegate(this)},e.prototype.resetRotation=function(){var e=this.options.visualElement;if(e){for(var t=!1,n={},r=0;r<Xb.length;r++){var i="rotate"+Xb[r];e.getStaticValue(i)&&(t=!0,n[i]=e.getStaticValue(i),e.setStaticValue(i,0))}if(t){for(var i in null==e||e.syncRender(),n)e.setStaticValue(i,n[i]);e.scheduleRender()}}},e.prototype.getProjectionStyles=function(e){var t,n,r,i,o,a;void 0===e&&(e={});var s={};if(!this.instance||this.isSVG)return s;if(!this.isVisible)return{visibility:"hidden"};s.visibility="";var l=null===(t=this.options.visualElement)||void 0===t?void 0:t.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,s.opacity="",s.pointerEvents=yx(e.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none",s;var c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){var u={};return this.options.layoutId&&(u.opacity=null!==(n=this.latestValues.opacity)&&void 0!==n?n:1,u.pointerEvents=yx(e.pointerEvents)||""),this.hasProjected&&!sk(this.latestValues)&&(u.transform=l?l({},""):"none",this.hasProjected=!1),u}var d=c.animationValues||c.latestValues;this.applyTransformsToTarget(),s.transform=xS(this.projectionDeltaWithTransform,this.treeScale,d),l&&(s.transform=l(d,s.transform));var f=this.projectionDelta,p=f.x,h=f.y;for(var m in s.transformOrigin="".concat(100*p.origin,"% ").concat(100*h.origin,"% 0"),c.animationValues?s.opacity=c===this?null!==(i=null!==(r=d.opacity)&&void 0!==r?r:this.latestValues.opacity)&&void 0!==i?i:1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:s.opacity=c===this?null!==(o=d.opacity)&&void 0!==o?o:"":null!==(a=d.opacityExit)&&void 0!==a?a:0,Qb)if(void 0!==d[m]){var v=Qb[m],g=v.correct,y=v.applyTo,b=g(d[m],c);if(y)for(var E=y.length,x=0;x<E;x++)s[y[x]]=b;else s[m]=b}return this.options.layoutId&&(s.pointerEvents=c===this?yx(e.pointerEvents)||"":"none"),s},e.prototype.clearSnapshot=function(){this.resumeFrom=this.snapshot=void 0},e.prototype.resetTree=function(){this.root.nodes.forEach((function(e){var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(NS),this.root.sharedNodes.clear()},e}()}function kS(e){e.updateLayout()}function SS(e){var t,n,r,i,o=null!==(n=null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)&&void 0!==n?n:e.snapshot;if(e.isLead()&&e.layout&&o&&e.hasListeners("didUpdate")){var a=e.layout,s=a.actual,l=a.measured;"size"===e.options.animationType?rk((function(e){var t=o.isShared?o.measured[e]:o.layout[e],n=HC(t);t.min=s[e].min,t.max=t.min+n})):"position"===e.options.animationType&&rk((function(e){var t=o.isShared?o.measured[e]:o.layout[e],n=HC(s[e]);t.max=t.min+n}));var c=tk();WC(c,s,o.layout);var u=tk();o.isShared?WC(u,e.applyTransform(l,!0),o.measured):WC(u,s,o.layout);var d=!gS(c),f=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){var p=e.relativeParent,h=p.snapshot,m=p.layout;if(h&&m){var v=nk();KC(v,o.layout,h.layout);var g=nk();KC(g,s,m.actual),yS(v,g)||(f=!0)}}e.notifyListeners("didUpdate",{layout:s,snapshot:o,delta:u,layoutDelta:c,hasLayoutChanged:d,hasRelativeTargetChanged:f})}else e.isLead()&&(null===(i=(r=e.options).onExitComplete)||void 0===i||i.call(r));e.options.transition=void 0}function _S(e){e.clearSnapshot()}function NS(e){e.clearMeasurements()}function AS(e){var t=e.options.visualElement;(null==t?void 0:t.getProps().onBeforeLayoutMeasure)&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function DS(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function IS(e){e.resolveTargetDelta()}function OS(e){e.calcProjection()}function LS(e){e.resetRotation()}function FS(e){e.removeLeadSnapshot()}function RS(e,t,n){e.translate=fw(t.translate,0,n),e.scale=fw(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function MS(e,t,n,r){e.min=fw(t.min,n.min,r),e.max=fw(t.max,n.max,r)}function PS(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}var jS={duration:.45,ease:[.4,0,.1,1]};function VS(e,t){for(var n=e.root,r=e.path.length-1;r>=0;r--)if(Boolean(e.path[r].instance)){n=e.path[r];break}var i=(n&&n!==e.root?n.instance:document).querySelector('[data-projection-id="'.concat(t,'"]'));i&&e.mount(i,!0)}function BS(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function $S(e){BS(e.x),BS(e.y)}var US=CS({attachResizeListener:function(e,t){return Sx(e,"resize",t)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),HS={current:void 0},qS=CS({measureScroll:function(e){return{x:e.scrollLeft,y:e.scrollTop}},defaultParent:function(){if(!HS.current){var e=new US(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),HS.current=e}return HS.current},resetTransform:function(e,t){e.style.transform=null!=t?t:"none"},checkIsScrollRoot:function(e){return Boolean("fixed"===window.getComputedStyle(e).position)}}),zS=af(af(af(af({},RC),BT),wk),eS),WS=Gb((function(e,t){return function(e,t,n,r,i){var o=t.forwardMotionProps,a=void 0!==o&&o,s=Kb(e)?Cx:kx;return af(af({},s),{preloadedFeatures:n,useRender:ax(a),createVisualElement:r,projectionNodeConstructor:i,Component:e})}(e,t,zS,Gk,qS)})),GS=e.createContext(null);function YS(e,t,n,r){if(!r)return e;var i=e.findIndex((function(e){return e.value===t}));if(-1===i)return e;var o=r>0?1:-1,a=e[i+o];if(!a)return e;var s=e[i],l=a.layout,c=fw(l.min,l.max,.5);return 1===o&&s.layout.max+n>c||-1===o&&s.layout.min+n<c?function(e,t,n){var r=lf(e).slice(0),i=t<0?r.length+t:t;if(i>=0&&i<r.length){var o=n<0?r.length+n:n,a=lf(r.splice(t,1),1)[0];r.splice(o,0,a)}return r}(e,i,i+o):e}var KS=e.forwardRef((function(t,n){var r=t.children,o=t.as,a=void 0===o?"ul":o,s=t.axis,l=void 0===s?"y":s,c=t.onReorder,u=t.values,d=sf(t,["children","as","axis","onReorder","values"]),f=Bb((function(){return WS(a)})),p=[],h=e.useRef(!1),m={axis:l,registerItem:function(e,t){t&&-1===p.findIndex((function(t){return e===t.value}))&&(p.push({value:e,layout:t[l]}),p.sort(XS))},updateOrder:function(e,t,n){if(!h.current){var r=YS(p,e,t,n);p!==r&&(h.current=!0,c(r.map(QS).filter((function(e){return-1!==u.indexOf(e)}))))}}};return e.useEffect((function(){h.current=!1})),i.createElement(f,af({},d,{ref:n}),i.createElement(GS.Provider,{value:m},r))}));function QS(e){return e.value}function XS(e,t){return e.layout.min-t.layout.min}function JS(t){var n=Bb((function(){return gC(t)}));if(e.useContext(wb).isStatic){var r=lf(e.useState(t),2)[1];e.useEffect((function(){return n.onChange(r)}),[])}return n}var ZS=function(e){return function(e){return"object"==typeof e&&e.mix}(e)?e.mix:void 0};function e_(e,t){var n=JS(t()),r=function(){return n.set(t())};return r(),function(e,t){Sb((function(){var n=e.map((function(e){return e.onChange(t)}));return function(){return n.forEach((function(e){return e()}))}}))}(e,(function(){return oT.update(r,!1,!0)})),n}function t_(e,t,n,r){var i="function"==typeof t?t:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=!Array.isArray(e[0]),r=n?0:-1,i=e[0+r],o=e[1+r],a=e[2+r],s=e[3+r],l=Aw(o,a,af({mixer:ZS(a[0])},s));return n?l(i):l}(t,n,r);return Array.isArray(e)?n_(e,i):n_([e],(function(e){var t=lf(e,1)[0];return i(t)}))}function n_(e,t){var n=Bb((function(){return[]}));return e_(e,(function(){n.length=0;for(var r=e.length,i=0;i<r;i++)n[i]=e[i].get();return t(n)}))}function r_(e,t){return void 0===t&&(t=0),oE(e)?e:JS(t)}var i_=e.forwardRef((function(t,n){var r=t.children,o=t.style,a=t.value,s=t.as,l=void 0===s?"li":s,c=t.onDrag,u=t.layout,d=void 0===u||u,f=sf(t,["children","style","value","as","onDrag","layout"]),p=Bb((function(){return WS(l)})),h=e.useContext(GS),m={x:r_(null==o?void 0:o.x),y:r_(null==o?void 0:o.y)},v=t_([m.x,m.y],(function(e){var t=lf(e,2),n=t[0],r=t[1];return n||r?1:"unset"})),g=e.useRef(null),y=h,b=y.axis,E=y.registerItem,x=y.updateOrder;return e.useEffect((function(){E(a,g.current)}),[h]),i.createElement(p,af({drag:b},f,{dragSnapToOrigin:!0,style:af(af({},o),{x:m.x,y:m.y,zIndex:v}),layout:d,onDrag:function(e,t){var n=t.velocity;n[b]&&x(a,m[b].get(),n[b]),null==c||c(e,t)},onLayoutMeasure:function(e){g.current=e},ref:n}),r)})),o_={Group:KS,Item:i_};const[a_,s_]=yd("Tooltip",[Wh]),l_=Wh(),c_=700,u_="tooltip.open",[d_,f_]=a_("TooltipProvider"),p_="Tooltip",[h_,m_]=a_(p_),v_="TooltipTrigger",g_=e.forwardRef(((t,n)=>{const{__scopeTooltip:r,...i}=t,o=m_(v_,r),a=f_(v_,r),s=l_(r),l=gd(n,e.useRef(null),o.onTriggerChange),c=e.useRef(!1),u=e.useRef(!1),d=e.useCallback((()=>c.current=!1),[]);return e.useEffect((()=>()=>document.removeEventListener("pointerup",d)),[d]),e.createElement(im,hd({asChild:!0},s),e.createElement(Id.button,hd({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},i,{ref:l,onPointerMove:md(t.onPointerMove,(e=>{"touch"!==e.pointerType&&(u.current||a.isPointerInTransitRef.current||(o.onTriggerEnter(),u.current=!0))})),onPointerLeave:md(t.onPointerLeave,(()=>{o.onTriggerLeave(),u.current=!1})),onPointerDown:md(t.onPointerDown,(()=>{c.current=!0,document.addEventListener("pointerup",d,{once:!0})})),onFocus:md(t.onFocus,(()=>{c.current||o.onOpen()})),onBlur:md(t.onBlur,o.onClose),onClick:md(t.onClick,o.onClose)})))})),y_="TooltipPortal",[b_,E_]=a_(y_,{forceMount:void 0}),x_="TooltipContent",w_=e.forwardRef(((t,n)=>{const r=E_(x_,t.__scopeTooltip),{forceMount:i=r.forceMount,side:o="top",...a}=t,s=m_(x_,t.__scopeTooltip);return e.createElement(Jd,{present:i||s.open},s.disableHoverableContent?e.createElement(S_,hd({side:o},a,{ref:n})):e.createElement(T_,hd({side:o},a,{ref:n})))})),T_=e.forwardRef(((t,n)=>{const r=m_(x_,t.__scopeTooltip),i=f_(x_,t.__scopeTooltip),o=e.useRef(null),a=gd(n,o),[s,l]=e.useState(null),{trigger:c,onClose:u}=r,d=o.current,{onPointerInTransitChange:f}=i,p=e.useCallback((()=>{l(null),f(!1)}),[f]),h=e.useCallback(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=function(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(r,n.getBoundingClientRect())),o=function(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),function(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const n=e[r];for(;t.length>=2;){const e=t[t.length-1],r=t[t.length-2];if(!((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x)))break;t.pop()}t.push(n)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const t=e[r];for(;n.length>=2;){const e=n[n.length-1],r=n[n.length-2];if(!((e.x-r.x)*(t.y-r.y)>=(e.y-r.y)*(t.x-r.x)))break;n.pop()}n.push(t)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...i,...function(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}(t.getBoundingClientRect())]);l(o),f(!0)}),[f]);return e.useEffect((()=>()=>p()),[p]),e.useEffect((()=>{if(c&&d){const e=e=>h(e,d),t=e=>h(e,c);return c.addEventListener("pointerleave",e),d.addEventListener("pointerleave",t),()=>{c.removeEventListener("pointerleave",e),d.removeEventListener("pointerleave",t)}}}),[c,d,h,p]),e.useEffect((()=>{if(s){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=(null==c?void 0:c.contains(t))||(null==d?void 0:d.contains(t)),i=!function(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const e=t[o].x,s=t[o].y,l=t[a].x,c=t[a].y;s>r!=c>r&&n<(l-e)*(r-s)/(c-s)+e&&(i=!i)}return i}(n,s);r?p():i&&(p(),u())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[c,d,s,u,p]),e.createElement(S_,hd({},t,{ref:a}))})),[C_,k_]=a_(p_,{isInside:!1}),S_=e.forwardRef(((t,n)=>{const{__scopeTooltip:r,children:i,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...l}=t,c=m_(x_,r),u=l_(r),{onClose:d}=c;return e.useEffect((()=>(document.addEventListener(u_,d),()=>document.removeEventListener(u_,d))),[d]),e.useEffect((()=>{if(c.trigger){const e=e=>{const t=e.target;null!=t&&t.contains(c.trigger)&&d()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[c.trigger,d]),e.createElement(jd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d},e.createElement(om,hd({"data-state":c.stateAttribute},u,l,{ref:n,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),e.createElement(Nd,null,i),e.createElement(C_,{scope:r,isInside:!0},e.createElement(Np,{id:c.contentId,role:"tooltip"},o||i))))}));const __=t=>{const{__scopeTooltip:n,delayDuration:r=c_,skipDelayDuration:i=300,disableHoverableContent:o=!1,children:a}=t,[s,l]=e.useState(!0),c=e.useRef(!1),u=e.useRef(0);return e.useEffect((()=>{const e=u.current;return()=>window.clearTimeout(e)}),[]),e.createElement(d_,{scope:n,isOpenDelayed:s,delayDuration:r,onOpen:e.useCallback((()=>{window.clearTimeout(u.current),l(!1)}),[]),onClose:e.useCallback((()=>{window.clearTimeout(u.current),u.current=window.setTimeout((()=>l(!0)),i)}),[i]),isPointerInTransitRef:c,onPointerInTransitChange:e.useCallback((e=>{c.current=e}),[]),disableHoverableContent:o},a)},N_=t=>{const{__scopeTooltip:n,children:r,open:i,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:l}=t,c=f_(p_,t.__scopeTooltip),u=l_(n),[d,f]=e.useState(null),p=Td(),h=e.useRef(0),m=null!=s?s:c.disableHoverableContent,v=null!=l?l:c.delayDuration,g=e.useRef(!1),[y=!1,b]=kd({prop:i,defaultProp:o,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(u_))):c.onClose(),null==a||a(e)}}),E=e.useMemo((()=>y?g.current?"delayed-open":"instant-open":"closed"),[y]),x=e.useCallback((()=>{window.clearTimeout(h.current),g.current=!1,b(!0)}),[b]),w=e.useCallback((()=>{window.clearTimeout(h.current),b(!1)}),[b]),T=e.useCallback((()=>{window.clearTimeout(h.current),h.current=window.setTimeout((()=>{g.current=!0,b(!0)}),v)}),[v,b]);return e.useEffect((()=>()=>window.clearTimeout(h.current)),[]),e.createElement(rm,u,e.createElement(h_,{scope:n,contentId:p,open:y,stateAttribute:E,trigger:d,onTriggerChange:f,onTriggerEnter:e.useCallback((()=>{c.isOpenDelayed?T():x()}),[c.isOpenDelayed,T,x]),onTriggerLeave:e.useCallback((()=>{m?w():window.clearTimeout(h.current)}),[w,m]),onOpen:x,onClose:w,disableHoverableContent:m},r))},A_=g_,D_=t=>{const{__scopeTooltip:n,forceMount:r,children:i,container:o}=t,a=m_(y_,n);return e.createElement(b_,{scope:n,forceMount:r},e.createElement(Jd,{present:r||a.open},e.createElement(Xd,{asChild:!0,container:o},i)))},I_=w_;var O_=Object.defineProperty,L_=(e,t,n)=>(((e,t,n)=>{t in e?O_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);let F_=new class{constructor(){L_(this,"current",this.detect()),L_(this,"handoffState","pending"),L_(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}},R_=(t,n)=>{F_.isServer?e.useEffect(t,n):e.useLayoutEffect(t,n)};function M_(t){let n=e.useRef(t);return R_((()=>{n.current=t}),[t]),n}function P_(t,n){let[r,i]=e.useState(t),o=M_(t);return R_((()=>i(o.current)),[o,i,...n]),r}function j_(){let e=[],t={addEventListener:(e,n,r,i)=>(e.addEventListener(n,r,i),t.add((()=>e.removeEventListener(n,r,i)))),requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(n)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let n=setTimeout(...e);return t.add((()=>clearTimeout(n)))},microTask(...e){let n={current:!0};return function(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}((()=>{n.current&&e[0]()})),t.add((()=>{n.current=!1}))},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add((()=>{Object.assign(e.style,{[t]:r})}))},group(e){let t=j_();return e(t),this.add((()=>t.dispose()))},add:t=>(e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function V_(){let[t]=e.useState(j_);return e.useEffect((()=>()=>t.dispose()),[t]),t}let B_=function(t){let n=M_(t);return e.useCallback(((...e)=>n.current(...e)),[n])};var $_;let U_=null!=($_=e.useId)?$_:function(){let t=function(){let[t,n]=e.useState(F_.isHandoffComplete);return t&&!1===F_.isHandoffComplete&&n(!1),e.useEffect((()=>{!0!==t&&n(!0)}),[t]),e.useEffect((()=>F_.handoff()),[]),t}(),[n,r]=e.useState(t?()=>F_.nextId():null);return R_((()=>{null===n&&r(F_.nextId())}),[n]),null!=n?""+n:void 0};function H_(e,t,...n){if(e in t){let r=t[e];return"function"==typeof r?r(...n):r}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,H_),r}function q_(e){return F_.isServer?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let z_=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((e=>`${e}:not([tabindex='-1'])`)).join(",");var W_,G_,Y_,K_=((Y_=K_||{})[Y_.First=1]="First",Y_[Y_.Previous=2]="Previous",Y_[Y_.Next=4]="Next",Y_[Y_.Last=8]="Last",Y_[Y_.WrapAround=16]="WrapAround",Y_[Y_.NoScroll=32]="NoScroll",Y_),Q_=((G_=Q_||{})[G_.Error=0]="Error",G_[G_.Overflow=1]="Overflow",G_[G_.Success=2]="Success",G_[G_.Underflow=3]="Underflow",G_),X_=((W_=X_||{})[W_.Previous=-1]="Previous",W_[W_.Next=1]="Next",W_),J_=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(J_||{});var Z_=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Z_||{});function eN(t,n,r){let i=M_(n);e.useEffect((()=>{function e(e){i.current(e)}return document.addEventListener(t,e,r),()=>document.removeEventListener(t,e,r)}),[t,r])}function tN(t,n,r=!0){let i=e.useRef(!1);function o(e,r){if(!i.current||e.defaultPrevented)return;let o=r(e);if(null===o||!o.getRootNode().contains(o))return;let a=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(t);for(let t of a){if(null===t)continue;let n=t instanceof HTMLElement?t:t.current;if(null!=n&&n.contains(o)||e.composed&&e.composedPath().includes(n))return}return!function(e,t=0){var n;return e!==(null==(n=q_(e))?void 0:n.body)&&H_(t,{0:()=>e.matches(z_),1(){let t=e;for(;null!==t;){if(t.matches(z_))return!0;t=t.parentElement}return!1}})}(o,J_.Loose)&&-1!==o.tabIndex&&e.preventDefault(),n(e,o)}e.useEffect((()=>{requestAnimationFrame((()=>{i.current=r}))}),[r]);let a=e.useRef(null);eN("mousedown",(e=>{var t,n;i.current&&(a.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target)}),!0),eN("click",(e=>{a.current&&(o(e,(()=>a.current)),a.current=null)}),!0),function(t,n,r){let i=M_(n);e.useEffect((()=>{function e(e){i.current(e)}return window.addEventListener(t,e,r),()=>window.removeEventListener(t,e,r)}),[t,r])}("blur",(e=>o(e,(()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null))),!0)}function nN(e){var t;if(e.type)return e.type;let n=null!=(t=e.as)?t:"button";return"string"==typeof n&&"button"===n.toLowerCase()?"button":void 0}function rN(t,n){let[r,i]=e.useState((()=>nN(t)));return R_((()=>{i(nN(t))}),[t.type,t.as]),R_((()=>{r||n.current&&n.current instanceof HTMLButtonElement&&!n.current.hasAttribute("type")&&i("button")}),[r,n]),r}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",(e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")}),!0),document.addEventListener("click",(e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")}),!0));let iN=Symbol();function oN(...t){let n=e.useRef(t);e.useEffect((()=>{n.current=t}),[t]);let r=B_((e=>{for(let t of n.current)null!=t&&("function"==typeof t?t(e):t.current=e)}));return t.every((e=>null==e||(null==e?void 0:e[iN])))?void 0:r}var aN,sN=((aN=sN||{})[aN.First=0]="First",aN[aN.Previous=1]="Previous",aN[aN.Next=2]="Next",aN[aN.Last=3]="Last",aN[aN.Specific=4]="Specific",aN[aN.Nothing=5]="Nothing",aN);function lN(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=null!=r?r:-1,o=(()=>{switch(e.focus){case 0:return n.findIndex((e=>!t.resolveDisabled(e)));case 1:{let e=n.slice().reverse().findIndex(((e,n,r)=>!(-1!==i&&r.length-n-1>=i)&&!t.resolveDisabled(e)));return-1===e?e:n.length-1-e}case 2:return n.findIndex(((e,n)=>!(n<=i)&&!t.resolveDisabled(e)));case 3:{let e=n.slice().reverse().findIndex((e=>!t.resolveDisabled(e)));return-1===e?e:n.length-1-e}case 4:return n.findIndex((n=>t.resolveId(n)===e.id));case 5:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}})();return-1===o?r:o}function cN(...e){return e.filter(Boolean).join(" ")}var uN,dN=((uN=dN||{})[uN.None=0]="None",uN[uN.RenderStrategy=1]="RenderStrategy",uN[uN.Static=2]="Static",uN),fN=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(fN||{});function pN({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:o=!0,name:a}){let s=mN(t,e);if(o)return hN(s,n,r,a);let l=null!=i?i:0;if(2&l){let{static:e=!1,...t}=s;if(e)return hN(t,n,r,a)}if(1&l){let{unmount:e=!0,...t}=s;return H_(e?0:1,{0:()=>null,1:()=>hN({...t,hidden:!0,style:{display:"none"}},n,r,a)})}return hN(s,n,r,a)}function hN(t,n={},r,i){let{as:o=r,children:a,refName:s="ref",...l}=yN(t,["unmount","static"]),c=void 0!==t.ref?{[s]:t.ref}:{},u="function"==typeof a?a(n):a;"className"in l&&l.className&&"function"==typeof l.className&&(l.className=l.className(n));let d={};if(n){let e=!1,t=[];for(let[r,i]of Object.entries(n))"boolean"==typeof i&&(e=!0),!0===i&&t.push(r);e&&(d["data-headlessui-state"]=t.join(" "))}if(o===e.Fragment&&Object.keys(gN(l)).length>0){if(!e.isValidElement(u)||Array.isArray(u)&&u.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${i} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(l).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"));let t=u.props,n="function"==typeof(null==t?void 0:t.className)?(...e)=>cN(null==t?void 0:t.className(...e),l.className):cN(null==t?void 0:t.className,l.className),r=n?{className:n}:{};return e.cloneElement(u,Object.assign({},mN(u.props,gN(yN(l,["ref"]))),d,c,function(...e){return{ref:e.every((e=>null==e))?void 0:t=>{for(let n of e)null!=n&&("function"==typeof n?n(t):n.current=t)}}}(u.ref,c.ref),r))}return e.createElement(o,Object.assign({},yN(l,["ref"]),o!==e.Fragment&&c,o!==e.Fragment&&d),u)}function mN(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map((e=>[e,void 0]))));for(let r in n)Object.assign(t,{[r](e,...t){let i=n[r];for(let n of i){if((e instanceof Event||(null==e?void 0:e.nativeEvent)instanceof Event)&&e.defaultPrevented)return;n(e,...t)}}});return t}function vN(t){var n;return Object.assign(e.forwardRef(t),{displayName:null!=(n=t.displayName)?n:t.name})}function gN(e){let t=Object.assign({},e);for(let n in t)void 0===t[n]&&delete t[n];return t}function yN(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function bN(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=""===(null==t?void 0:t.getAttribute("disabled"));return(!r||!function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&r}function EN(e={},t=null,n=[]){for(let[r,i]of Object.entries(e))wN(n,xN(t,r),i);return n}function xN(e,t){return e?e+"["+t+"]":t}function wN(e,t,n){if(Array.isArray(n))for(let[r,i]of n.entries())wN(e,xN(t,r.toString()),i);else n instanceof Date?e.push([t,n.toISOString()]):"boolean"==typeof n?e.push([t,n?"1":"0"]):"string"==typeof n?e.push([t,n]):"number"==typeof n?e.push([t,`${n}`]):null==n?e.push([t,""]):EN(n,t,e)}var TN=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(TN||{});let CN=vN((function(e,t){let{features:n=1,...r}=e;return pN({ourProps:{ref:t,"aria-hidden":2==(2&n)||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...4==(4&n)&&2!=(2&n)&&{display:"none"}}},theirProps:r,slot:{},defaultTag:"div",name:"Hidden"})})),kN=e.createContext(null);kN.displayName="OpenClosedContext";var SN=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(SN||{});function _N({value:t,children:n}){return e.createElement(kN.Provider,{value:t},n)}var NN,AN=((NN=AN||{}).Space=" ",NN.Enter="Enter",NN.Escape="Escape",NN.Backspace="Backspace",NN.Delete="Delete",NN.ArrowLeft="ArrowLeft",NN.ArrowUp="ArrowUp",NN.ArrowRight="ArrowRight",NN.ArrowDown="ArrowDown",NN.Home="Home",NN.End="End",NN.PageUp="PageUp",NN.PageDown="PageDown",NN.Tab="Tab",NN);function DN(t,n){let r=e.useRef([]),i=B_(t);e.useEffect((()=>{let e=[...r.current];for(let[t,o]of n.entries())if(r.current[t]!==o){let t=i(n,e);return r.current=n,t}}),[i,...n])}function IN(e){return[e.screenX,e.screenY]}function ON(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0||/Android/gi.test(window.navigator.userAgent)}var LN=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(LN||{}),FN=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(FN||{}),RN=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(RN||{}),MN=(e=>(e[e.OpenCombobox=0]="OpenCombobox",e[e.CloseCombobox=1]="CloseCombobox",e[e.GoToOption=2]="GoToOption",e[e.RegisterOption=3]="RegisterOption",e[e.UnregisterOption=4]="UnregisterOption",e[e.RegisterLabel=5]="RegisterLabel",e))(MN||{});function PN(e,t=(e=>e)){let n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,r=function(e,t=(e=>e)){return e.slice().sort(((e,n)=>{let r=t(e),i=t(n);if(null===r||null===i)return 0;let o=r.compareDocumentPosition(i);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}(t(e.options.slice()),(e=>e.dataRef.current.domRef.current)),i=n?r.indexOf(n):null;return-1===i&&(i=null),{options:r,activeOptionIndex:i}}let jN={1(e){var t;return null!=(t=e.dataRef.current)&&t.disabled||1===e.comboboxState?e:{...e,activeOptionIndex:null,comboboxState:1}},0(e){var t;if(null!=(t=e.dataRef.current)&&t.disabled||0===e.comboboxState)return e;let n=e.activeOptionIndex;if(e.dataRef.current){let{isSelected:t}=e.dataRef.current,r=e.options.findIndex((e=>t(e.dataRef.current.value)));-1!==r&&(n=r)}return{...e,comboboxState:0,activeOptionIndex:n}},2(e,t){var n,r,i,o;if(null!=(n=e.dataRef.current)&&n.disabled||null!=(r=e.dataRef.current)&&r.optionsRef.current&&(null==(i=e.dataRef.current)||!i.optionsPropsRef.current.static)&&1===e.comboboxState)return e;let a=PN(e);if(null===a.activeOptionIndex){let e=a.options.findIndex((e=>!e.dataRef.current.disabled));-1!==e&&(a.activeOptionIndex=e)}let s=lN(t,{resolveItems:()=>a.options,resolveActiveIndex:()=>a.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...e,...a,activeOptionIndex:s,activationTrigger:null!=(o=t.trigger)?o:1}},3:(e,t)=>{var n,r;let i={id:t.id,dataRef:t.dataRef},o=PN(e,(e=>[...e,i]));null===e.activeOptionIndex&&null!=(n=e.dataRef.current)&&n.isSelected(t.dataRef.current.value)&&(o.activeOptionIndex=o.options.indexOf(i));let a={...e,...o,activationTrigger:1};return null!=(r=e.dataRef.current)&&r.__demoMode&&void 0===e.dataRef.current.value&&(a.activeOptionIndex=0),a},4:(e,t)=>{let n=PN(e,(e=>{let n=e.findIndex((e=>e.id===t.id));return-1!==n&&e.splice(n,1),e}));return{...e,...n,activationTrigger:1}},5:(e,t)=>({...e,labelId:t.id})},VN=e.createContext(null);function BN(t){let n=e.useContext(VN);if(null===n){let e=new Error(`<${t} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,BN),e}return n}VN.displayName="ComboboxActionsContext";let $N=e.createContext(null);function UN(t){let n=e.useContext($N);if(null===n){let e=new Error(`<${t} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,UN),e}return n}function HN(e,t){return H_(t.type,jN,e,t)}$N.displayName="ComboboxDataContext";let qN=e.Fragment;let zN=dN.RenderStrategy|dN.Static;let WN=vN((function(t,n){let{value:r,defaultValue:i,onChange:o,form:a,name:s,by:l=((e,t)=>e===t),disabled:c=!1,__demoMode:u=!1,nullable:d=!1,multiple:f=!1,...p}=t,[h=(f?[]:void 0),m]=function(t,n,r){let[i,o]=e.useState(r),a=void 0!==t,s=e.useRef(a),l=e.useRef(!1),c=e.useRef(!1);return!a||s.current||l.current?!a&&s.current&&!c.current&&(c.current=!0,s.current=a,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(l.current=!0,s.current=a,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[a?t:i,B_((e=>(a||o(e),null==n?void 0:n(e))))]}(r,o,i),[v,g]=e.useReducer(HN,{dataRef:e.createRef(),comboboxState:u?0:1,options:[],activeOptionIndex:null,activationTrigger:1,labelId:null}),y=e.useRef(!1),b=e.useRef({static:!1,hold:!1}),E=e.useRef(null),x=e.useRef(null),w=e.useRef(null),T=e.useRef(null),C=B_("string"==typeof l?(e,t)=>{let n=l;return(null==e?void 0:e[n])===(null==t?void 0:t[n])}:l),k=e.useCallback((e=>H_(S.mode,{1:()=>h.some((t=>C(t,e))),0:()=>C(h,e)})),[h]),S=e.useMemo((()=>({...v,optionsPropsRef:b,labelRef:E,inputRef:x,buttonRef:w,optionsRef:T,value:h,defaultValue:i,disabled:c,mode:f?1:0,get activeOptionIndex(){if(y.current&&null===v.activeOptionIndex&&v.options.length>0){let e=v.options.findIndex((e=>!e.dataRef.current.disabled));if(-1!==e)return e}return v.activeOptionIndex},compare:C,isSelected:k,nullable:d,__demoMode:u})),[h,i,c,f,d,u,v]),_=e.useRef(null!==S.activeOptionIndex?S.options[S.activeOptionIndex]:null);e.useEffect((()=>{let e=null!==S.activeOptionIndex?S.options[S.activeOptionIndex]:null;_.current!==e&&(_.current=e)})),R_((()=>{v.dataRef.current=S}),[S]),tN([S.buttonRef,S.inputRef,S.optionsRef],(()=>P.closeCombobox()),0===S.comboboxState);let N=e.useMemo((()=>({open:0===S.comboboxState,disabled:c,activeIndex:S.activeOptionIndex,activeOption:null===S.activeOptionIndex?null:S.options[S.activeOptionIndex].dataRef.current.value,value:h})),[S,c,h]),A=B_((e=>{let t=S.options.find((t=>t.id===e));t&&M(t.dataRef.current.value)})),D=B_((()=>{if(null!==S.activeOptionIndex){let{dataRef:e,id:t}=S.options[S.activeOptionIndex];M(e.current.value),P.goToOption(sN.Specific,t)}})),I=B_((()=>{g({type:0}),y.current=!0})),O=B_((()=>{g({type:1}),y.current=!1})),L=B_(((e,t,n)=>(y.current=!1,e===sN.Specific?g({type:2,focus:sN.Specific,id:t,trigger:n}):g({type:2,focus:e,trigger:n})))),F=B_(((e,t)=>(g({type:3,id:e,dataRef:t}),()=>{var t;(null==(t=_.current)?void 0:t.id)===e&&(y.current=!0),g({type:4,id:e})}))),R=B_((e=>(g({type:5,id:e}),()=>g({type:5,id:null})))),M=B_((e=>H_(S.mode,{0:()=>null==m?void 0:m(e),1(){let t=S.value.slice(),n=t.findIndex((t=>C(t,e)));return-1===n?t.push(e):t.splice(n,1),null==m?void 0:m(t)}}))),P=e.useMemo((()=>({onChange:M,registerOption:F,registerLabel:R,goToOption:L,closeCombobox:O,openCombobox:I,selectActiveOption:D,selectOption:A})),[]),j=null===n?{}:{ref:n},V=e.useRef(null),B=V_();return e.useEffect((()=>{V.current&&void 0!==i&&B.addEventListener(V.current,"reset",(()=>{M(i)}))}),[V,M]),e.createElement(VN.Provider,{value:P},e.createElement($N.Provider,{value:S},e.createElement(_N,{value:H_(S.comboboxState,{0:SN.Open,1:SN.Closed})},null!=s&&null!=h&&EN({[s]:h}).map((([t,n],r)=>e.createElement(CN,{features:TN.Hidden,ref:0===r?e=>{var t;V.current=null!=(t=null==e?void 0:e.closest("form"))?t:null}:void 0,...gN({key:t,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:a,name:t,value:n})}))),pN({ourProps:j,theirProps:p,slot:N,defaultTag:qN,name:"Combobox"}))))})),GN=vN((function(t,n){var r;let i=UN("Combobox.Button"),o=BN("Combobox.Button"),a=oN(i.buttonRef,n),s=U_(),{id:l=`headlessui-combobox-button-${s}`,...c}=t,u=V_(),d=B_((e=>{switch(e.key){case AN.ArrowDown:return e.preventDefault(),e.stopPropagation(),1===i.comboboxState&&o.openCombobox(),u.nextFrame((()=>{var e;return null==(e=i.inputRef.current)?void 0:e.focus({preventScroll:!0})}));case AN.ArrowUp:return e.preventDefault(),e.stopPropagation(),1===i.comboboxState&&(o.openCombobox(),u.nextFrame((()=>{i.value||o.goToOption(sN.Last)}))),u.nextFrame((()=>{var e;return null==(e=i.inputRef.current)?void 0:e.focus({preventScroll:!0})}));case AN.Escape:return 0!==i.comboboxState?void 0:(e.preventDefault(),i.optionsRef.current&&!i.optionsPropsRef.current.static&&e.stopPropagation(),o.closeCombobox(),u.nextFrame((()=>{var e;return null==(e=i.inputRef.current)?void 0:e.focus({preventScroll:!0})})));default:return}})),f=B_((e=>{if(bN(e.currentTarget))return e.preventDefault();0===i.comboboxState?o.closeCombobox():(e.preventDefault(),o.openCombobox()),u.nextFrame((()=>{var e;return null==(e=i.inputRef.current)?void 0:e.focus({preventScroll:!0})}))})),p=P_((()=>{if(i.labelId)return[i.labelId,l].join(" ")}),[i.labelId,l]),h=e.useMemo((()=>({open:0===i.comboboxState,disabled:i.disabled,value:i.value})),[i]);return pN({ourProps:{ref:a,id:l,type:rN(t,i.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":null==(r=i.optionsRef.current)?void 0:r.id,"aria-expanded":i.disabled?void 0:0===i.comboboxState,"aria-labelledby":p,disabled:i.disabled,onClick:f,onKeyDown:d},theirProps:c,slot:h,defaultTag:"button",name:"Combobox.Button"})})),YN=vN((function(t,n){var r,i,o,a;let s=U_(),{id:l=`headlessui-combobox-input-${s}`,onChange:c,displayValue:u,type:d="text",...f}=t,p=UN("Combobox.Input"),h=BN("Combobox.Input"),m=oN(p.inputRef,n),v=e.useRef(!1),g=V_();var y;DN((([e,t],[n,r])=>{v.current||p.inputRef.current&&(0===r&&1===t||e!==n)&&(p.inputRef.current.value=e)}),["function"==typeof u&&void 0!==p.value?null!=(y=u(p.value))?y:"":"string"==typeof p.value?p.value:"",p.comboboxState]),DN((([e],[t])=>{if(0===e&&1===t){let e=p.inputRef.current;if(!e)return;let t=e.value,{selectionStart:n,selectionEnd:r,selectionDirection:i}=e;e.value="",e.value=t,null!==i?e.setSelectionRange(n,r,i):e.setSelectionRange(n,r)}}),[p.comboboxState]);let b=e.useRef(!1),E=e.useRef(null),x=B_((()=>{b.current=!0})),w=B_((()=>{g.nextFrame((()=>{b.current=!1,E.current&&(h.openCombobox(),null==c||c(E.current),E.current=null)}))})),T=B_((e=>{switch(v.current=!0,e.key){case AN.Backspace:case AN.Delete:if(0!==p.mode||!p.nullable)return;let t=e.currentTarget;g.requestAnimationFrame((()=>{""===t.value&&(h.onChange(null),p.optionsRef.current&&(p.optionsRef.current.scrollTop=0),h.goToOption(sN.Nothing))}));break;case AN.Enter:if(v.current=!1,0!==p.comboboxState||b.current)return;if(e.preventDefault(),e.stopPropagation(),null===p.activeOptionIndex)return void h.closeCombobox();h.selectActiveOption(),0===p.mode&&h.closeCombobox();break;case AN.ArrowDown:return v.current=!1,e.preventDefault(),e.stopPropagation(),H_(p.comboboxState,{0:()=>{h.goToOption(sN.Next)},1:()=>{h.openCombobox()}});case AN.ArrowUp:return v.current=!1,e.preventDefault(),e.stopPropagation(),H_(p.comboboxState,{0:()=>{h.goToOption(sN.Previous)},1:()=>{h.openCombobox(),g.nextFrame((()=>{p.value||h.goToOption(sN.Last)}))}});case AN.Home:if(e.shiftKey)break;return v.current=!1,e.preventDefault(),e.stopPropagation(),h.goToOption(sN.First);case AN.PageUp:return v.current=!1,e.preventDefault(),e.stopPropagation(),h.goToOption(sN.First);case AN.End:if(e.shiftKey)break;return v.current=!1,e.preventDefault(),e.stopPropagation(),h.goToOption(sN.Last);case AN.PageDown:return v.current=!1,e.preventDefault(),e.stopPropagation(),h.goToOption(sN.Last);case AN.Escape:return v.current=!1,0!==p.comboboxState?void 0:(e.preventDefault(),p.optionsRef.current&&!p.optionsPropsRef.current.static&&e.stopPropagation(),h.closeCombobox());case AN.Tab:if(v.current=!1,0!==p.comboboxState)return;0===p.mode&&h.selectActiveOption(),h.closeCombobox()}})),C=B_((e=>{b.current?E.current=e:(h.openCombobox(),null==c||c(e))})),k=B_((()=>{v.current=!1})),S=P_((()=>{if(p.labelId)return[p.labelId].join(" ")}),[p.labelId]),_=e.useMemo((()=>({open:0===p.comboboxState,disabled:p.disabled})),[p]);return pN({ourProps:{ref:m,id:l,role:"combobox",type:d,"aria-controls":null==(r=p.optionsRef.current)?void 0:r.id,"aria-expanded":p.disabled?void 0:0===p.comboboxState,"aria-activedescendant":null===p.activeOptionIndex||null==(i=p.options[p.activeOptionIndex])?void 0:i.id,"aria-labelledby":S,"aria-autocomplete":"list",defaultValue:null!=(a=null!=(o=t.defaultValue)?o:void 0!==p.defaultValue?null==u?void 0:u(p.defaultValue):null)?a:p.defaultValue,disabled:p.disabled,onCompositionStart:x,onCompositionEnd:w,onKeyDown:T,onChange:C,onBlur:k},theirProps:f,slot:_,defaultTag:"input",name:"Combobox.Input"})})),KN=vN((function(t,n){let r=U_(),{id:i=`headlessui-combobox-label-${r}`,...o}=t,a=UN("Combobox.Label"),s=BN("Combobox.Label"),l=oN(a.labelRef,n);R_((()=>s.registerLabel(i)),[i]);let c=B_((()=>{var e;return null==(e=a.inputRef.current)?void 0:e.focus({preventScroll:!0})})),u=e.useMemo((()=>({open:0===a.comboboxState,disabled:a.disabled})),[a]);return pN({ourProps:{ref:l,id:i,onClick:c},theirProps:o,slot:u,defaultTag:"label",name:"Combobox.Label"})})),QN=vN((function(t,n){let r=U_(),{id:i=`headlessui-combobox-options-${r}`,hold:o=!1,...a}=t,s=UN("Combobox.Options"),l=oN(s.optionsRef,n),c=e.useContext(kN),u=null!==c?(c&SN.Open)===SN.Open:0===s.comboboxState;R_((()=>{var e;s.optionsPropsRef.current.static=null!=(e=t.static)&&e}),[s.optionsPropsRef,t.static]),R_((()=>{s.optionsPropsRef.current.hold=o}),[s.optionsPropsRef,o]),function({container:t,accept:n,walk:r,enabled:i=!0}){let o=e.useRef(n),a=e.useRef(r);e.useEffect((()=>{o.current=n,a.current=r}),[n,r]),R_((()=>{if(!t||!i)return;let e=q_(t);if(!e)return;let n=o.current,r=a.current,s=Object.assign((e=>n(e)),{acceptNode:n}),l=e.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,s,!1);for(;l.nextNode();)r(l.currentNode)}),[t,i,o,a])}({container:s.optionsRef.current,enabled:0===s.comboboxState,accept:e=>"option"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let d=P_((()=>{var e,t;return null!=(t=s.labelId)?t:null==(e=s.buttonRef.current)?void 0:e.id}),[s.labelId,s.buttonRef.current]),f=e.useMemo((()=>({open:0===s.comboboxState})),[s]);return pN({ourProps:{"aria-labelledby":d,role:"listbox","aria-multiselectable":1===s.mode||void 0,id:i,ref:l},theirProps:a,slot:f,defaultTag:"ul",features:zN,visible:u,name:"Combobox.Options"})})),XN=vN((function(t,n){var r,i;let o=U_(),{id:a=`headlessui-combobox-option-${o}`,disabled:s=!1,value:l,...c}=t,u=UN("Combobox.Option"),d=BN("Combobox.Option"),f=null!==u.activeOptionIndex&&u.options[u.activeOptionIndex].id===a,p=u.isSelected(l),h=e.useRef(null),m=M_({disabled:s,value:l,domRef:h,textValue:null==(i=null==(r=h.current)?void 0:r.textContent)?void 0:i.toLowerCase()}),v=oN(n,h),g=B_((()=>d.selectOption(a)));R_((()=>d.registerOption(a,m)),[m,a]);let y=e.useRef(!u.__demoMode);R_((()=>{if(!u.__demoMode)return;let e=j_();return e.requestAnimationFrame((()=>{y.current=!0})),e.dispose}),[]),R_((()=>{if(0!==u.comboboxState||!f||!y.current||0===u.activationTrigger)return;let e=j_();return e.requestAnimationFrame((()=>{var e,t;null==(t=null==(e=h.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})),e.dispose}),[h,f,u.comboboxState,u.activationTrigger,u.activeOptionIndex]);let b=B_((e=>{if(s)return e.preventDefault();g(),0===u.mode&&d.closeCombobox(),ON()||requestAnimationFrame((()=>{var e;return null==(e=u.inputRef.current)?void 0:e.focus()}))})),E=B_((()=>{if(s)return d.goToOption(sN.Nothing);d.goToOption(sN.Specific,a)})),x=function(){let t=e.useRef([-1,-1]);return{wasMoved(e){let n=IN(e);return(t.current[0]!==n[0]||t.current[1]!==n[1])&&(t.current=n,!0)},update(e){t.current=IN(e)}}}(),w=B_((e=>x.update(e))),T=B_((e=>{x.wasMoved(e)&&(s||f||d.goToOption(sN.Specific,a,0))})),C=B_((e=>{x.wasMoved(e)&&(s||f&&(u.optionsPropsRef.current.hold||d.goToOption(sN.Nothing)))})),k=e.useMemo((()=>({active:f,selected:p,disabled:s})),[f,p,s]);return pN({ourProps:{id:a,ref:v,role:"option",tabIndex:!0===s?void 0:-1,"aria-disabled":!0===s||void 0,"aria-selected":p,disabled:void 0,onClick:b,onFocus:E,onPointerEnter:w,onMouseEnter:w,onPointerMove:T,onMouseMove:T,onPointerLeave:C,onMouseLeave:C},theirProps:c,slot:k,defaultTag:"li",name:"Combobox.Option"})})),JN=Object.assign(WN,{Input:YN,Button:GN,Label:KN,Options:QN,Option:XN});function ZN(t){const n=e.createContext(null);return n.displayName=t,n}function eA(t){function n(n){var r;const i=e.useContext(t);if(null===i&&(null==n?void 0:n.nonNull))throw new Error(`Tried to use \`${(null==(r=n.caller)?void 0:r.name)||"a component"}\` without the necessary context. Make sure to render the \`${t.displayName}Provider\` component higher up the tree.`);return i}return Object.defineProperty(n,"name",{value:`use${t.displayName}`}),n}const tA=ZN("StorageContext");function nA(t){const n=N.c(8),r=e.useRef(!0);let i;n[0]!==t.storage?(i=()=>new vs(t.storage),n[0]=t.storage,n[1]=i):i=n[1];const[o,a]=e.useState(i);let s,l,c;return n[2]!==t.storage?(s=()=>{r.current?r.current=!1:a(new vs(t.storage))},l=[t.storage],n[2]=t.storage,n[3]=s,n[4]=l):(s=n[3],l=n[4]),e.useEffect(s,l),n[5]!==t.children||n[6]!==o?(c=v.jsx(tA.Provider,{value:o,children:t.children}),n[5]=t.children,n[6]=o,n[7]=c):c=n[7],c}const rA=eA(tA),iA=RA((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M5.0484 1.40838C6.12624 0.33054 7.87376 0.330541 8.9516 1.40838L12.5916 5.0484C13.6695 6.12624 13.6695 7.87376 12.5916 8.9516L8.9516 12.5916C7.87376 13.6695 6.12624 13.6695 5.0484 12.5916L1.40838 8.9516C0.33054 7.87376 0.330541 6.12624 1.40838 5.0484L5.0484 1.40838Z",stroke:"currentColor",strokeWidth:1.2}),i.createElement("rect",{x:6,y:6,width:2,height:2,rx:1,fill:"currentColor"})))),oA=RA((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 14 9",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M1 1L7 7L13 1",stroke:"currentColor",strokeWidth:1.5})))),aA=RA((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 7 10",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M6 1.04819L2 5.04819L6 9.04819",stroke:"currentColor",strokeWidth:1.75})))),sA=RA((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 14 9",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M13 8L7 2L1 8",stroke:"currentColor",strokeWidth:1.5})))),lA=RA((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 14 14",stroke:"currentColor",strokeWidth:3,xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M1 1L12.9998 12.9997"}),i.createElement("path",{d:"M13 1L1.00079 13.0003"})))),cA=RA((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"-2 -2 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M11.25 14.2105V15.235C11.25 16.3479 10.3479 17.25 9.23501 17.25H2.76499C1.65214 17.25 0.75 16.3479 0.75 15.235L0.75 8.76499C0.75 7.65214 1.65214 6.75 2.76499 6.75L3.78947 6.75",stroke:"currentColor",strokeWidth:1.5}),i.createElement("rect",{x:6.75,y:.75,width:10.5,height:10.5,rx:2.2069,stroke:"currentColor",strokeWidth:1.5})))),uA=RA((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M5.0484 1.40838C6.12624 0.33054 7.87376 0.330541 8.9516 1.40838L12.5916 5.0484C13.6695 6.12624 13.6695 7.87376 12.5916 8.9516L8.9516 12.5916C7.87376 13.6695 6.12624 13.6695 5.0484 12.5916L1.40838 8.9516C0.33054 7.87376 0.330541 6.12624 1.40838 5.0484L5.0484 1.40838Z",stroke:"currentColor",strokeWidth:1.2}),i.createElement("path",{d:"M5 9L9 5",stroke:"currentColor",strokeWidth:1.2}),i.createElement("path",{d:"M5 5L9 9",stroke:"currentColor",strokeWidth:1.2})))),dA=RA((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M4 8L8 4",stroke:"currentColor",strokeWidth:1.2}),i.createElement("path",{d:"M4 4L8 8",stroke:"currentColor",strokeWidth:1.2}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.5 1.2H9C9.99411 1.2 10.8 2.00589 10.8 3V9C10.8 9.99411 9.99411 10.8 9 10.8H8.5V12H9C10.6569 12 12 10.6569 12 9V3C12 1.34315 10.6569 0 9 0H8.5V1.2ZM3.5 1.2V0H3C1.34315 0 0 1.34315 0 3V9C0 10.6569 1.34315 12 3 12H3.5V10.8H3C2.00589 10.8 1.2 9.99411 1.2 9V3C1.2 2.00589 2.00589 1.2 3 1.2H3.5Z",fill:"currentColor"})))),fA=RA((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("rect",{x:.6,y:.6,width:10.8,height:10.8,rx:3.4,stroke:"currentColor",strokeWidth:1.2}),i.createElement("path",{d:"M4 8L8 4",stroke:"currentColor",strokeWidth:1.2}),i.createElement("path",{d:"M4 4L8 8",stroke:"currentColor",strokeWidth:1.2})))),pA=RA((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0.5 12 12",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("rect",{x:7,y:5.5,width:2,height:2,rx:1,transform:"rotate(90 7 5.5)",fill:"currentColor"}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.8 9L10.8 9.5C10.8 10.4941 9.99411 11.3 9 11.3L3 11.3C2.00589 11.3 1.2 10.4941 1.2 9.5L1.2 9L-3.71547e-07 9L-3.93402e-07 9.5C-4.65826e-07 11.1569 1.34314 12.5 3 12.5L9 12.5C10.6569 12.5 12 11.1569 12 9.5L12 9L10.8 9ZM10.8 4L12 4L12 3.5C12 1.84315 10.6569 0.5 9 0.5L3 0.5C1.34315 0.5 -5.87117e-08 1.84315 -1.31135e-07 3.5L-1.5299e-07 4L1.2 4L1.2 3.5C1.2 2.50589 2.00589 1.7 3 1.7L9 1.7C9.99411 1.7 10.8 2.50589 10.8 3.5L10.8 4Z",fill:"currentColor"})))),hA=RA((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 20 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M0.75 3C0.75 1.75736 1.75736 0.75 3 0.75H17.25C17.8023 0.75 18.25 1.19772 18.25 1.75V5.25",stroke:"currentColor",strokeWidth:1.5}),i.createElement("path",{d:"M0.75 3C0.75 4.24264 1.75736 5.25 3 5.25H18.25C18.8023 5.25 19.25 5.69771 19.25 6.25V22.25C19.25 22.8023 18.8023 23.25 18.25 23.25H3C1.75736 23.25 0.75 22.2426 0.75 21V3Z",stroke:"currentColor",strokeWidth:1.5}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 5.25C1.75736 5.25 0.75 4.24264 0.75 3V21C0.75 22.2426 1.75736 23.25 3 23.25H18.25C18.8023 23.25 19.25 22.8023 19.25 22.25V6.25C19.25 5.69771 18.8023 5.25 18.25 5.25H3ZM13 11L6 11V12.5L13 12.5V11Z",fill:"currentColor"})))),mA=RA((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 20 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M0.75 3C0.75 4.24264 1.75736 5.25 3 5.25H17.25M0.75 3C0.75 1.75736 1.75736 0.75 3 0.75H16.25C16.8023 0.75 17.25 1.19772 17.25 1.75V5.25M0.75 3V21C0.75 22.2426 1.75736 23.25 3 23.25H18.25C18.8023 23.25 19.25 22.8023 19.25 22.25V6.25C19.25 5.69771 18.8023 5.25 18.25 5.25H17.25",stroke:"currentColor",strokeWidth:1.5}),i.createElement("line",{x1:13,y1:11.75,x2:6,y2:11.75,stroke:"currentColor",strokeWidth:1.5})))),vA=RA((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("rect",{x:5,y:5,width:2,height:2,rx:1,fill:"currentColor"}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.5 1.2H9C9.99411 1.2 10.8 2.00589 10.8 3V9C10.8 9.99411 9.99411 10.8 9 10.8H8.5V12H9C10.6569 12 12 10.6569 12 9V3C12 1.34315 10.6569 0 9 0H8.5V1.2ZM3.5 1.2V0H3C1.34315 0 0 1.34315 0 3V9C0 10.6569 1.34315 12 3 12H3.5V10.8H3C2.00589 10.8 1.2 9.99411 1.2 9V3C1.2 2.00589 2.00589 1.2 3 1.2H3.5Z",fill:"currentColor"})))),gA=RA((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("rect",{x:.6,y:1.1,width:10.8,height:10.8,rx:2.4,stroke:"currentColor",strokeWidth:1.2}),i.createElement("rect",{x:5,y:5.5,width:2,height:2,rx:1,fill:"currentColor"})))),yA=RA((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 24 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M1.59375 9.52344L4.87259 12.9944L8.07872 9.41249",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"square"}),i.createElement("path",{d:"M13.75 5.25V10.75H18.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"square"}),i.createElement("path",{d:"M4.95427 11.9332C4.55457 10.0629 4.74441 8.11477 5.49765 6.35686C6.25089 4.59894 7.5305 3.11772 9.16034 2.11709C10.7902 1.11647 12.6901 0.645626 14.5986 0.769388C16.5071 0.893151 18.3303 1.60543 19.8172 2.80818C21.3042 4.01093 22.3818 5.64501 22.9017 7.48548C23.4216 9.32595 23.3582 11.2823 22.7203 13.0853C22.0824 14.8883 20.9013 16.4492 19.3396 17.5532C17.778 18.6572 15.9125 19.25 14 19.25",stroke:"currentColor",strokeWidth:1.5})))),bA=RA((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("circle",{cx:6,cy:6,r:5.4,stroke:"currentColor",strokeWidth:1.2,strokeDasharray:"4.241025 4.241025",transform:"rotate(22.5)","transform-origin":"center"}),i.createElement("circle",{cx:6,cy:6,r:1,fill:"currentColor"})))),EA=RA((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 19 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M1.5 14.5653C1.5 15.211 1.75652 15.8303 2.21314 16.2869C2.66975 16.7435 3.28905 17 3.9348 17C4.58054 17 5.19984 16.7435 5.65646 16.2869C6.11307 15.8303 6.36959 15.211 6.36959 14.5653V12.1305H3.9348C3.28905 12.1305 2.66975 12.387 2.21314 12.8437C1.75652 13.3003 1.5 13.9195 1.5 14.5653Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M3.9348 1.00063C3.28905 1.00063 2.66975 1.25715 2.21314 1.71375C1.75652 2.17035 1.5 2.78964 1.5 3.43537C1.5 4.0811 1.75652 4.70038 2.21314 5.15698C2.66975 5.61358 3.28905 5.8701 3.9348 5.8701H6.36959V3.43537C6.36959 2.78964 6.11307 2.17035 5.65646 1.71375C5.19984 1.25715 4.58054 1.00063 3.9348 1.00063Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M15.0652 12.1305H12.6304V14.5653C12.6304 15.0468 12.7732 15.5175 13.0407 15.9179C13.3083 16.3183 13.6885 16.6304 14.1334 16.8147C14.5783 16.9989 15.0679 17.0472 15.5402 16.9532C16.0125 16.8593 16.4464 16.6274 16.7869 16.2869C17.1274 15.9464 17.3593 15.5126 17.4532 15.0403C17.5472 14.568 17.4989 14.0784 17.3147 13.6335C17.1304 13.1886 16.8183 12.8084 16.4179 12.5409C16.0175 12.2733 15.5468 12.1305 15.0652 12.1305Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M12.6318 5.86775H6.36955V12.1285H12.6318V5.86775Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M17.5 3.43473C17.5 2.789 17.2435 2.16972 16.7869 1.71312C16.3303 1.25652 15.711 1 15.0652 1C14.4195 1 13.8002 1.25652 13.3435 1.71312C12.8869 2.16972 12.6304 2.789 12.6304 3.43473V5.86946H15.0652C15.711 5.86946 16.3303 5.61295 16.7869 5.15635C17.2435 4.69975 17.5 4.08046 17.5 3.43473Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"})))),xA=RA((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("circle",{cx:5,cy:5,r:4.35,stroke:"currentColor",strokeWidth:1.3}),i.createElement("line",{x1:8.45962,y1:8.54038,x2:11.7525,y2:11.8333,stroke:"currentColor",strokeWidth:1.3})))),wA=RA((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"-2 -2 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M17.2492 6V2.9569C17.2492 1.73806 16.2611 0.75 15.0423 0.75L2.9569 0.75C1.73806 0.75 0.75 1.73806 0.75 2.9569L0.75 6",stroke:"currentColor",strokeWidth:1.5}),i.createElement("path",{d:"M0.749873 12V15.0431C0.749873 16.2619 1.73794 17.25 2.95677 17.25H15.0421C16.261 17.25 17.249 16.2619 17.249 15.0431V12",stroke:"currentColor",strokeWidth:1.5}),i.createElement("path",{d:"M6 4.5L9 7.5L12 4.5",stroke:"currentColor",strokeWidth:1.5}),i.createElement("path",{d:"M12 13.5L9 10.5L6 13.5",stroke:"currentColor",strokeWidth:1.5})))),TA=RA((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M0.75 13.25L0.0554307 12.967C-0.0593528 13.2488 0.00743073 13.5719 0.224488 13.7851C0.441545 13.9983 0.765869 14.0592 1.04549 13.9393L0.75 13.25ZM12.8214 1.83253L12.2911 2.36286L12.2911 2.36286L12.8214 1.83253ZM12.8214 3.90194L13.3517 4.43227L12.8214 3.90194ZM10.0981 1.17859L9.56773 0.648259L10.0981 1.17859ZM12.1675 1.17859L12.6978 0.648258L12.6978 0.648257L12.1675 1.17859ZM2.58049 8.75697L3.27506 9.03994L2.58049 8.75697ZM2.70066 8.57599L3.23099 9.10632L2.70066 8.57599ZM5.2479 11.4195L4.95355 10.7297L5.2479 11.4195ZM5.42036 11.303L4.89003 10.7727L5.42036 11.303ZM4.95355 10.7297C4.08882 11.0987 3.41842 11.362 2.73535 11.6308C2.05146 11.9 1.35588 12.1743 0.454511 12.5607L1.04549 13.9393C1.92476 13.5624 2.60256 13.2951 3.28469 13.0266C3.96762 12.7578 4.65585 12.4876 5.54225 12.1093L4.95355 10.7297ZM1.44457 13.533L3.27506 9.03994L1.88592 8.474L0.0554307 12.967L1.44457 13.533ZM3.23099 9.10632L10.6284 1.70892L9.56773 0.648259L2.17033 8.04566L3.23099 9.10632ZM11.6371 1.70892L12.2911 2.36286L13.3517 1.3022L12.6978 0.648258L11.6371 1.70892ZM12.2911 3.37161L4.89003 10.7727L5.95069 11.8333L13.3517 4.43227L12.2911 3.37161ZM12.2911 2.36286C12.5696 2.64142 12.5696 3.09305 12.2911 3.37161L13.3517 4.43227C14.2161 3.56792 14.2161 2.16654 13.3517 1.3022L12.2911 2.36286ZM10.6284 1.70892C10.9069 1.43036 11.3586 1.43036 11.6371 1.70892L12.6978 0.648257C11.8335 -0.216088 10.4321 -0.216084 9.56773 0.648259L10.6284 1.70892ZM3.27506 9.03994C3.26494 9.06479 3.24996 9.08735 3.23099 9.10632L2.17033 8.04566C2.04793 8.16806 1.95123 8.31369 1.88592 8.474L3.27506 9.03994ZM5.54225 12.1093C5.69431 12.0444 5.83339 11.9506 5.95069 11.8333L4.89003 10.7727C4.90863 10.7541 4.92988 10.7398 4.95355 10.7297L5.54225 12.1093Z",fill:"currentColor"}),i.createElement("path",{d:"M11.5 4.5L9.5 2.5",stroke:"currentColor",strokeWidth:1.4026,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M5.5 10.5L3.5 8.5",stroke:"currentColor",strokeWidth:1.4026,strokeLinecap:"round",strokeLinejoin:"round"})))),CA=RA((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 16 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M1.32226e-07 1.6609C7.22332e-08 0.907329 0.801887 0.424528 1.46789 0.777117L15.3306 8.11621C16.0401 8.49182 16.0401 9.50818 15.3306 9.88379L1.46789 17.2229C0.801886 17.5755 1.36076e-06 17.0927 1.30077e-06 16.3391L1.32226e-07 1.6609Z",fill:"currentColor"})))),kA=RA((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 10 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.25 9.25V13.5H5.75V9.25L10 9.25V7.75L5.75 7.75V3.5H4.25V7.75L0 7.75V9.25L4.25 9.25Z"})))),SA=RA((({title:e,titleId:t,...n})=>i.createElement("svg",{width:25,height:25,viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M10.2852 24.0745L13.7139 18.0742",stroke:"currentColor",strokeWidth:1.5625}),i.createElement("path",{d:"M14.5742 24.0749L17.1457 19.7891",stroke:"currentColor",strokeWidth:1.5625}),i.createElement("path",{d:"M19.4868 24.0735L20.7229 21.7523C21.3259 20.6143 21.5457 19.3122 21.3496 18.0394C21.1535 16.7666 20.5519 15.591 19.6342 14.6874L23.7984 6.87853C24.0123 6.47728 24.0581 6.00748 23.9256 5.57249C23.7932 5.1375 23.4933 4.77294 23.0921 4.55901C22.6908 4.34509 22.221 4.29932 21.7861 4.43178C21.3511 4.56424 20.9865 4.86408 20.7726 5.26533L16.6084 13.0742C15.3474 12.8142 14.0362 12.9683 12.8699 13.5135C11.7035 14.0586 10.7443 14.9658 10.135 16.1L6 24.0735",stroke:"currentColor",strokeWidth:1.5625}),i.createElement("path",{d:"M4 15L5 13L7 12L5 11L4 9L3 11L1 12L3 13L4 15Z",stroke:"currentColor",strokeWidth:1.5625,strokeLinejoin:"round"}),i.createElement("path",{d:"M11.5 8L12.6662 5.6662L15 4.5L12.6662 3.3338L11.5 1L10.3338 3.3338L8 4.5L10.3338 5.6662L11.5 8Z",stroke:"currentColor",strokeWidth:1.5625,strokeLinejoin:"round"})))),_A=RA((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M4.75 9.25H1.25V12.75",stroke:"currentColor",strokeWidth:1,strokeLinecap:"square"}),i.createElement("path",{d:"M11.25 6.75H14.75V3.25",stroke:"currentColor",strokeWidth:1,strokeLinecap:"square"}),i.createElement("path",{d:"M14.1036 6.65539C13.8 5.27698 13.0387 4.04193 11.9437 3.15131C10.8487 2.26069 9.48447 1.76694 8.0731 1.75043C6.66173 1.73392 5.28633 2.19563 4.17079 3.0604C3.05526 3.92516 2.26529 5.14206 1.92947 6.513",stroke:"currentColor",strokeWidth:1}),i.createElement("path",{d:"M1.89635 9.34461C2.20001 10.723 2.96131 11.9581 4.05631 12.8487C5.15131 13.7393 6.51553 14.2331 7.9269 14.2496C9.33827 14.2661 10.7137 13.8044 11.8292 12.9396C12.9447 12.0748 13.7347 10.8579 14.0705 9.487",stroke:"currentColor",strokeWidth:1})))),NA=RA((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("rect",{x:.6,y:.6,width:11.8,height:11.8,rx:5.9,stroke:"currentColor",strokeWidth:1.2}),i.createElement("path",{d:"M4.25 7.5C4.25 6 5.75 5 6.5 6.5C7.25 8 8.75 7 8.75 5.5",stroke:"currentColor",strokeWidth:1.2})))),AA=RA((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.29186 1.92702C9.06924 1.82745 8.87014 1.68202 8.70757 1.50024L7.86631 0.574931C7.62496 0.309957 7.30773 0.12592 6.95791 0.0479385C6.60809 -0.0300431 6.24274 0.00182978 5.91171 0.139208C5.58068 0.276585 5.3001 0.512774 5.10828 0.815537C4.91645 1.1183 4.82272 1.47288 4.83989 1.83089L4.90388 3.08019C4.91612 3.32348 4.87721 3.56662 4.78968 3.79394C4.70215 4.02126 4.56794 4.2277 4.39571 4.39994C4.22347 4.57219 4.01704 4.7064 3.78974 4.79394C3.56243 4.88147 3.3193 4.92038 3.07603 4.90814L1.8308 4.84414C1.47162 4.82563 1.11553 4.91881 0.811445 5.11086C0.507359 5.30292 0.270203 5.58443 0.132561 5.91671C-0.00508149 6.249 -0.0364554 6.61576 0.0427496 6.9666C0.121955 7.31744 0.307852 7.63514 0.5749 7.87606L1.50016 8.71204C1.68193 8.87461 1.82735 9.07373 1.92692 9.29636C2.02648 9.51898 2.07794 9.76012 2.07794 10.004C2.07794 10.2479 2.02648 10.489 1.92692 10.7116C1.82735 10.9343 1.68193 11.1334 1.50016 11.296L0.5749 12.1319C0.309856 12.3729 0.125575 12.6898 0.0471809 13.0393C-0.0312128 13.3888 9.64098e-05 13.754 0.13684 14.0851C0.273583 14.4162 0.509106 14.6971 0.811296 14.8894C1.11349 15.0817 1.46764 15.1762 1.82546 15.1599L3.0707 15.0959C3.31397 15.0836 3.5571 15.1225 3.7844 15.2101C4.01171 15.2976 4.21814 15.4318 4.39037 15.6041C4.56261 15.7763 4.69682 15.9827 4.78435 16.2101C4.87188 16.4374 4.91078 16.6805 4.89855 16.9238L4.83455 18.1691C4.81605 18.5283 4.90921 18.8844 5.10126 19.1885C5.2933 19.4926 5.5748 19.7298 5.90707 19.8674C6.23934 20.0051 6.60608 20.0365 6.9569 19.9572C7.30772 19.878 7.6254 19.6921 7.86631 19.4251L8.7129 18.4998C8.87547 18.318 9.07458 18.1725 9.29719 18.073C9.51981 17.9734 9.76093 17.9219 10.0048 17.9219C10.2487 17.9219 10.4898 17.9734 10.7124 18.073C10.935 18.1725 11.1341 18.318 11.2967 18.4998L12.1326 19.4251C12.3735 19.6921 12.6912 19.878 13.042 19.9572C13.3929 20.0365 13.7596 20.0051 14.0919 19.8674C14.4241 19.7298 14.7056 19.4926 14.8977 19.1885C15.0897 18.8844 15.1829 18.5283 15.1644 18.1691L15.1004 16.9238C15.0882 16.6805 15.1271 16.4374 15.2146 16.2101C15.3021 15.9827 15.4363 15.7763 15.6086 15.6041C15.7808 15.4318 15.9872 15.2976 16.2145 15.2101C16.4418 15.1225 16.685 15.0836 16.9282 15.0959L18.1735 15.1599C18.5326 15.1784 18.8887 15.0852 19.1928 14.8931C19.4969 14.7011 19.7341 14.4196 19.8717 14.0873C20.0093 13.755 20.0407 13.3882 19.9615 13.0374C19.8823 12.6866 19.6964 12.3689 19.4294 12.1279L18.5041 11.292C18.3223 11.1294 18.1769 10.9303 18.0774 10.7076C17.9778 10.485 17.9263 10.2439 17.9263 10C17.9263 9.75612 17.9778 9.51499 18.0774 9.29236C18.1769 9.06973 18.3223 8.87062 18.5041 8.70804L19.4294 7.87206C19.6964 7.63114 19.8823 7.31344 19.9615 6.9626C20.0407 6.61176 20.0093 6.245 19.8717 5.91271C19.7341 5.58043 19.4969 5.29892 19.1928 5.10686C18.8887 4.91481 18.5326 4.82163 18.1735 4.84014L16.9282 4.90414C16.685 4.91638 16.4418 4.87747 16.2145 4.78994C15.9872 4.7024 15.7808 4.56818 15.6086 4.39594C15.4363 4.2237 15.3021 4.01726 15.2146 3.78994C15.1271 3.56262 15.0882 3.31948 15.1004 3.07619L15.1644 1.83089C15.1829 1.4717 15.0897 1.11559 14.8977 0.811487C14.7056 0.507385 14.4241 0.270217 14.0919 0.132568C13.7596 -0.00508182 13.3929 -0.0364573 13.042 0.0427519C12.6912 0.121961 12.3735 0.307869 12.1326 0.574931L11.2914 1.50024C11.1288 1.68202 10.9297 1.82745 10.7071 1.92702C10.4845 2.02659 10.2433 2.07805 9.99947 2.07805C9.7556 2.07805 9.51448 2.02659 9.29186 1.92702ZM14.3745 10C14.3745 12.4162 12.4159 14.375 9.99977 14.375C7.58365 14.375 5.625 12.4162 5.625 10C5.625 7.58375 7.58365 5.625 9.99977 5.625C12.4159 5.625 14.3745 7.58375 14.3745 10Z",fill:"currentColor"})))),DA=RA((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M6.5782 1.07092C6.71096 0.643026 7.28904 0.643027 7.4218 1.07092L8.59318 4.84622C8.65255 5.03758 8.82284 5.16714 9.01498 5.16714L12.8056 5.16714C13.2353 5.16714 13.4139 5.74287 13.0663 6.00732L9.99962 8.34058C9.84418 8.45885 9.77913 8.66848 9.83851 8.85984L11.0099 12.6351C11.1426 13.063 10.675 13.4189 10.3274 13.1544L7.26069 10.8211C7.10524 10.7029 6.89476 10.7029 6.73931 10.8211L3.6726 13.1544C3.32502 13.4189 2.85735 13.063 2.99012 12.6351L4.16149 8.85984C4.22087 8.66848 4.15582 8.45885 4.00038 8.34058L0.933671 6.00732C0.586087 5.74287 0.764722 5.16714 1.19436 5.16714L4.98502 5.16714C5.17716 5.16714 5.34745 5.03758 5.40682 4.84622L6.5782 1.07092Z",fill:"currentColor",stroke:"currentColor"})))),IA=RA((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M6.5782 1.07092C6.71096 0.643026 7.28904 0.643027 7.4218 1.07092L8.59318 4.84622C8.65255 5.03758 8.82284 5.16714 9.01498 5.16714L12.8056 5.16714C13.2353 5.16714 13.4139 5.74287 13.0663 6.00732L9.99962 8.34058C9.84418 8.45885 9.77913 8.66848 9.83851 8.85984L11.0099 12.6351C11.1426 13.063 10.675 13.4189 10.3274 13.1544L7.26069 10.8211C7.10524 10.7029 6.89476 10.7029 6.73931 10.8211L3.6726 13.1544C3.32502 13.4189 2.85735 13.063 2.99012 12.6351L4.16149 8.85984C4.22087 8.66848 4.15582 8.45885 4.00038 8.34058L0.933671 6.00732C0.586087 5.74287 0.764722 5.16714 1.19436 5.16714L4.98502 5.16714C5.17716 5.16714 5.34745 5.03758 5.40682 4.84622L6.5782 1.07092Z",stroke:"currentColor",strokeWidth:1.5})))),OA=RA((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("rect",{width:16,height:16,rx:2,fill:"currentColor"})))),LA=RA((({title:e,titleId:t,...n})=>i.createElement("svg",{width:"1em",height:"5em",xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd","aria-hidden":"true",viewBox:"0 0 23 23",style:{height:"1.5em"},clipRule:"evenodd","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{d:"M19 24h-14c-1.104 0-2-.896-2-2v-17h-1v-2h6v-1.5c0-.827.673-1.5 1.5-1.5h5c.825 0 1.5.671 1.5 1.5v1.5h6v2h-1v17c0 1.104-.896 2-2 2zm0-19h-14v16.5c0 .276.224.5.5.5h13c.276 0 .5-.224.5-.5v-16.5zm-7 7.586l3.293-3.293 1.414 1.414-3.293 3.293 3.293 3.293-1.414 1.414-3.293-3.293-3.293 3.293-1.414-1.414 3.293-3.293-3.293-3.293 1.414-1.414 3.293 3.293zm2-10.586h-4v1h4v-1z",fill:"currentColor",strokeWidth:.25,stroke:"currentColor"})))),FA=RA((({title:e,titleId:t,...n})=>i.createElement("svg",{height:"1em",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("rect",{x:.6,y:.6,width:11.8,height:11.8,rx:5.9,stroke:"currentColor",strokeWidth:1.2}),i.createElement("rect",{x:5.5,y:5.5,width:2,height:2,rx:1,fill:"currentColor"}))));function RA(e){const t=e.name.replace("Svg","").replaceAll(/([A-Z])/g," $1").trimStart().toLowerCase()+" icon";function n(n){const r=N.c(2);let i;return r[0]!==n?(i=v.jsx(e,{title:t,...n}),r[0]=n,r[1]=i):i=r[1],i}return n.displayName=e.name,n}const MA=e.forwardRef(((e,t)=>{const n=N.c(6);let r,i;return n[0]!==e.className?(r=K("graphiql-un-styled",e.className),n[0]=e.className,n[1]=r):r=n[1],n[2]!==e||n[3]!==t||n[4]!==r?(i=v.jsx("button",{...e,ref:t,className:r}),n[2]=e,n[3]=t,n[4]=r,n[5]=i):i=n[5],i}));MA.displayName="UnStyledButton";const PA=e.forwardRef(((e,t)=>{const n=N.c(7);let r,i;return n[0]!==e.className||n[1]!==e.state?(r=K("graphiql-button",{success:"graphiql-button-success",error:"graphiql-button-error"}[e.state],e.className),n[0]=e.className,n[1]=e.state,n[2]=r):r=n[2],n[3]!==e||n[4]!==t||n[5]!==r?(i=v.jsx("button",{...e,ref:t,className:r}),n[3]=e,n[4]=t,n[5]=r,n[6]=i):i=n[6],i}));PA.displayName="Button";const jA=e.forwardRef(((e,t)=>{const n=N.c(6);let r,i;return n[0]!==e.className?(r=K("graphiql-button-group",e.className),n[0]=e.className,n[1]=r):r=n[1],n[2]!==e||n[3]!==t||n[4]!==r?(i=v.jsx("div",{...e,ref:t,className:r}),n[2]=e,n[3]=t,n[4]=r,n[5]=i):i=n[5],i}));jA.displayName="ButtonGroup";const VA=(e,t)=>Object.entries(t).reduce(((e,[t,n])=>(e[t]=n,e)),e),BA=e.forwardRef(((e,t)=>{const n=N.c(8);let r,i,o,a;return n[0]!==e.className?(r=K("graphiql-dialog-close",e.className),n[0]=e.className,n[1]=r):r=n[1],n[2]===Symbol.for("react.memo_cache_sentinel")?(i=v.jsx(Np,{children:"Close dialog"}),o=v.jsx(lA,{}),n[2]=i,n[3]=o):(i=n[2],o=n[3]),n[4]!==e||n[5]!==t||n[6]!==r?(a=v.jsx(_p,{asChild:!0,children:v.jsxs(MA,{...e,ref:t,type:"button",className:r,children:[i,o]})}),n[4]=e,n[5]=t,n[6]=r,n[7]=a):a=n[7],a}));function $A(e){const t=N.c(9);let n,r,i,o,a;return t[0]!==e?(({children:n,...r}=e),t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]),t[3]===Symbol.for("react.memo_cache_sentinel")?(i=v.jsx(Tp,{className:"graphiql-dialog-overlay"}),t[3]=i):i=t[3],t[4]!==n?(o=v.jsxs(wp,{children:[i,v.jsx(Cp,{className:"graphiql-dialog",children:n})]}),t[4]=n,t[5]=o):o=t[5],t[6]!==r||t[7]!==o?(a=v.jsx(Ep,{...r,children:o}),t[6]=r,t[7]=o,t[8]=a):a=t[8],a}BA.displayName="Dialog.Close";const UA=VA($A,{Close:BA,Title:kp,Trigger:xp,Description:Sp}),HA=e.forwardRef(((e,t)=>{const n=N.c(6);let r,i;return n[0]!==e.className?(r=K("graphiql-un-styled",e.className),n[0]=e.className,n[1]=r):r=n[1],n[2]!==e||n[3]!==t||n[4]!==r?(i=v.jsx(yv,{asChild:!0,children:v.jsx("button",{...e,ref:t,className:r})}),n[2]=e,n[3]=t,n[4]=r,n[5]=i):i=n[5],i}));HA.displayName="DropdownMenuButton";const qA=VA(gv,{Button:HA,Item:e=>{const t=N.c(10);let n,r,i,o,a;return t[0]!==e?(({className:r,children:n,...i}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=i):(n=t[1],r=t[2],i=t[3]),t[4]!==r?(o=K("graphiql-dropdown-item",r),t[4]=r,t[5]=o):o=t[5],t[6]!==n||t[7]!==i||t[8]!==o?(a=v.jsx(xv,{className:o,...i,children:n}),t[6]=n,t[7]=i,t[8]=o,t[9]=a):a=t[9],a},Content:function(e){const t=N.c(14);let n,r,i,o,a;t[0]!==e?(({children:n,align:o,sideOffset:a,className:r,...i}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a):(n=t[1],r=t[2],i=t[3],o=t[4],a=t[5]);const s=void 0===o?"start":o,l=void 0===a?5:a;let c,u;return t[6]!==r?(c=K("graphiql-dropdown-content",r),t[6]=r,t[7]=c):c=t[7],t[8]!==s||t[9]!==n||t[10]!==i||t[11]!==l||t[12]!==c?(u=v.jsx(bv,{children:v.jsx(Ev,{align:s,sideOffset:l,className:c,...i,children:n})}),t[8]=s,t[9]=n,t[10]=i,t[11]=l,t[12]=c,t[13]=u):u=t[13],u}}),zA=new hb({breaks:!0,linkify:!0}),WA=e.forwardRef(((e,t)=>{const n=N.c(18);let r,i,o,a;n[0]!==e?(({children:r,onlyShowFirstChild:i,type:a,...o}=e),n[0]=e,n[1]=r,n[2]=i,n[3]=o,n[4]=a):(r=n[1],i=n[2],o=n[3],a=n[4]);const s=`graphiql-markdown-${a}`,l=i&&"graphiql-markdown-preview";let c,u,d,f;return n[5]!==o.className||n[6]!==s||n[7]!==l?(c=K(s,l,o.className),n[5]=o.className,n[6]=s,n[7]=l,n[8]=c):c=n[8],n[9]!==r?(u=zA.render(r),n[9]=r,n[10]=u):u=n[10],n[11]!==u?(d={__html:u},n[11]=u,n[12]=d):d=n[12],n[13]!==o||n[14]!==t||n[15]!==c||n[16]!==d?(f=v.jsx("div",{...o,ref:t,className:c,dangerouslySetInnerHTML:d}),n[13]=o,n[14]=t,n[15]=c,n[16]=d,n[17]=f):f=n[17],f}));WA.displayName="MarkdownContent";const GA=e.forwardRef(((e,t)=>{const n=N.c(6);let r,i;return n[0]!==e.className?(r=K("graphiql-spinner",e.className),n[0]=e.className,n[1]=r):r=n[1],n[2]!==e||n[3]!==t||n[4]!==r?(i=v.jsx("div",{...e,ref:t,className:r}),n[2]=e,n[3]=t,n[4]=r,n[5]=i):i=n[5],i}));function YA(e){const t=N.c(10),{children:n,align:r,side:i,sideOffset:o,label:a}=e,s=void 0===r?"start":r,l=void 0===i?"bottom":i,c=void 0===o?5:o;let u,d,f;return t[0]!==n?(u=v.jsx(A_,{asChild:!0,children:n}),t[0]=n,t[1]=u):u=t[1],t[2]!==s||t[3]!==a||t[4]!==l||t[5]!==c?(d=v.jsx(D_,{children:v.jsx(I_,{className:"graphiql-tooltip",align:s,side:l,sideOffset:c,children:a})}),t[2]=s,t[3]=a,t[4]=l,t[5]=c,t[6]=d):d=t[6],t[7]!==u||t[8]!==d?(f=v.jsxs(N_,{children:[u,d]}),t[7]=u,t[8]=d,t[9]=f):f=t[9],f}GA.displayName="Spinner";const KA=VA(YA,{Provider:__}),QA=e.forwardRef(((e,t)=>{const n=N.c(16);let r,i,o,a,s;n[0]!==e?(({isActive:o,value:s,children:r,className:i,...a}=e),n[0]=e,n[1]=r,n[2]=i,n[3]=o,n[4]=a,n[5]=s):(r=n[1],i=n[2],o=n[3],a=n[4],s=n[5]);const l=o?"true":void 0,c=o&&"graphiql-tab-active";let u,d;return n[6]!==i||n[7]!==c?(u=K("graphiql-tab",c,i),n[6]=i,n[7]=c,n[8]=u):u=n[8],n[9]!==r||n[10]!==a||n[11]!==t||n[12]!==l||n[13]!==u||n[14]!==s?(d=v.jsx(o_.Item,{...a,ref:t,value:s,"aria-selected":l,role:"tab",className:u,children:r}),n[9]=r,n[10]=a,n[11]=t,n[12]=l,n[13]=u,n[14]=s,n[15]=d):d=n[15],d}));QA.displayName="Tab";const XA=e.forwardRef(((e,t)=>{const n=N.c(6);let r,i;return n[0]!==e.className?(r=K("graphiql-tab-button",e.className),n[0]=e.className,n[1]=r):r=n[1],n[2]!==e||n[3]!==t||n[4]!==r?(i=v.jsx(MA,{...e,ref:t,type:"button",className:r,children:e.children}),n[2]=e,n[3]=t,n[4]=r,n[5]=i):i=n[5],i}));XA.displayName="Tab.Button";const JA=e.forwardRef(((e,t)=>{const n=N.c(7);let r,i,o;return n[0]!==e.className?(r=K("graphiql-tab-close",e.className),n[0]=e.className,n[1]=r):r=n[1],n[2]===Symbol.for("react.memo_cache_sentinel")?(i=v.jsx(lA,{}),n[2]=i):i=n[2],n[3]!==e||n[4]!==t||n[5]!==r?(o=v.jsx(KA,{label:"Close Tab",children:v.jsx(MA,{"aria-label":"Close Tab",...e,ref:t,type:"button",className:r,children:i})}),n[3]=e,n[4]=t,n[5]=r,n[6]=o):o=n[6],o}));JA.displayName="Tab.Close";const ZA=VA(QA,{Button:XA,Close:JA}),eD=e.forwardRef(((e,t)=>{const n=N.c(15);let r,i,o,a,s,l,c;return n[0]!==e?(({values:s,onReorder:o,children:r,className:i,...a}=e),n[0]=e,n[1]=r,n[2]=i,n[3]=o,n[4]=a,n[5]=s):(r=n[1],i=n[2],o=n[3],a=n[4],s=n[5]),n[6]!==i?(l=K("graphiql-tabs",i),n[6]=i,n[7]=l):l=n[7],n[8]!==r||n[9]!==o||n[10]!==a||n[11]!==t||n[12]!==l||n[13]!==s?(c=v.jsx(o_.Group,{...a,ref:t,values:s,onReorder:o,axis:"x",role:"tablist",className:l,children:r}),n[8]=r,n[9]=o,n[10]=a,n[11]=t,n[12]=l,n[13]=s,n[14]=c):c=n[14],c}));eD.displayName="Tabs";const tD=ZN("HistoryContext");function nD(t){const n=N.c(11),{maxHistoryLength:r,children:i}=t,o=void 0===r?oD:r,a=rA();let s;n[0]!==o||n[1]!==a?(s=()=>new bs(a||new vs(null),o),n[0]=o,n[1]=a,n[2]=s):s=n[2];const[l]=e.useState(s);let c;n[3]!==l.queries?(c=()=>l.queries||[],n[3]=l.queries,n[4]=c):c=n[4];const[u,d]=e.useState(c);let f;n[5]!==l||n[6]!==u?(f={addToHistory(e){l.updateHistory(e),d(l.queries)},editLabel(e,t){l.editLabel(e,t),d(l.queries)},items:u,toggleFavorite(e){l.toggleFavorite(e),d(l.queries)},setActive:rD,deleteFromHistory(e,t){l.deleteHistory(e,t),d(l.queries)}},n[5]=l,n[6]=u,n[7]=f):f=n[7];const p=f;let h;return n[8]!==i||n[9]!==p?(h=v.jsx(tD.Provider,{value:p,children:i}),n[8]=i,n[9]=p,n[10]=h):h=n[10],h}function rD(e){return e}const iD=eA(tD),oD=20;function aD(){const t=N.c(11);let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={nonNull:!0},t[0]=n):n=t[0];const{items:r,deleteFromHistory:i}=iD(n);let o;o=r.slice().map(dD).reverse();const a=o.filter(uD);a.length&&(o=o.filter(cD));const[s,l]=e.useState(null);let c,u;t[1]!==s?(c=()=>{s&&setTimeout((()=>{l(null)}),2e3)},u=[s],t[1]=s,t[2]=c,t[3]=u):(c=t[2],u=t[3]),e.useEffect(c,u);const d=(s||o.length>0)&&v.jsx(PA,{type:"button",state:s||void 0,disabled:!o.length,onClick:()=>{try{!function(e,t){for(const n of e)t(n,!0)}(o,i),l("success")}catch{l("error")}},children:{success:"Cleared",error:"Failed to Clear"}[s]||"Clear"});let f;t[4]!==d?(f=v.jsxs("div",{className:"graphiql-history-header",children:["History",d]}),t[4]=d,t[5]=f):f=t[5];const p=Boolean(a.length)&&v.jsx("ul",{className:"graphiql-history-items",children:a.map(lD)}),h=Boolean(a.length)&&Boolean(o.length)&&v.jsx("div",{className:"graphiql-history-item-spacer"}),m=Boolean(o.length)&&v.jsx("ul",{className:"graphiql-history-items",children:o.map(sD)});let g;return t[6]!==f||t[7]!==p||t[8]!==h||t[9]!==m?(g=v.jsxs("section",{"aria-label":"History",className:"graphiql-history",children:[f,p,h,m]}),t[6]=f,t[7]=p,t[8]=h,t[9]=m,t[10]=g):g=t[10],g}function sD(e){return v.jsx(fD,{item:e},e.index)}function lD(e){return v.jsx(fD,{item:e},e.index)}function cD(e){return!e.favorite}function uD(e){return e.favorite}function dD(e,t){return{...e,index:t}}function fD(t){const n=N.c(40);let r;n[0]===Symbol.for("react.memo_cache_sentinel")?(r={nonNull:!0,caller:fD},n[0]=r):r=n[0];const{editLabel:i,toggleFavorite:o,deleteFromHistory:a,setActive:s}=iD(r);let l;n[1]===Symbol.for("react.memo_cache_sentinel")?(l={nonNull:!0,caller:fD},n[1]=l):l=n[1];const{headerEditor:c,queryEditor:u,variableEditor:d}=TO(l),f=e.useRef(null),p=e.useRef(null),[h,m]=e.useState(!1);let g,y,b;var E;n[2]!==h?(g=()=>{var e;h&&(null==(e=f.current)||e.focus())},y=[h],n[2]=h,n[3]=g,n[4]=y):(g=n[3],y=n[4]),e.useEffect(g,y),n[5]!==t.item.label||n[6]!==t.item.operationName||n[7]!==t.item.query?(b=t.item.label||t.item.operationName||(null==(E=t.item.query)?void 0:E.split("\n").map((e=>e.replace(/#(.*)/,""))).join(" ").replaceAll("{"," { ").replaceAll("}"," } ").replaceAll(/[\s]{2,}/g," ")),n[5]=t.item.label,n[6]=t.item.operationName,n[7]=t.item.query,n[8]=b):b=n[8];const x=b;let w;n[9]!==i||n[10]!==t.item?(w=()=>{var e;m(!1);const{index:n,...r}=t.item;i({...r,label:null==(e=f.current)?void 0:e.value},n)},n[9]=i,n[10]=t.item,n[11]=w):w=n[11];const T=w;let C;n[12]===Symbol.for("react.memo_cache_sentinel")?(C=()=>{m(!1)},n[12]=C):C=n[12];const k=C;let S;n[13]===Symbol.for("react.memo_cache_sentinel")?(S=e=>{e.stopPropagation(),m(!0)},n[13]=S):S=n[13];const _=S;let A;n[14]!==c||n[15]!==t.item||n[16]!==u||n[17]!==s||n[18]!==d?(A=()=>{const{query:e,variables:n,headers:r}=t.item;null==u||u.setValue(e??""),null==d||d.setValue(n??""),null==c||c.setValue(r??""),s(t.item)},n[14]=c,n[15]=t.item,n[16]=u,n[17]=s,n[18]=d,n[19]=A):A=n[19];const D=A;let I;n[20]!==a||n[21]!==t.item?(I=e=>{e.stopPropagation(),a(t.item)},n[20]=a,n[21]=t.item,n[22]=I):I=n[22];const O=I;let L;n[23]!==t.item||n[24]!==o?(L=e=>{e.stopPropagation(),o(t.item)},n[23]=t.item,n[24]=o,n[25]=L):L=n[25];const F=L,R=h&&"editable";let M,P,j;return n[26]!==R?(M=K("graphiql-history-item",R),n[26]=R,n[27]=M):M=n[27],n[28]!==x||n[29]!==i||n[30]!==O||n[31]!==D||n[32]!==T||n[33]!==F||n[34]!==h||n[35]!==t.item?(P=h?v.jsxs(v.Fragment,{children:[v.jsx("input",{type:"text",defaultValue:t.item.label,ref:f,onKeyDown:e=>{"Esc"===e.key?m(!1):"Enter"===e.key&&(m(!1),i({...t.item,label:e.currentTarget.value}))},placeholder:"Type a label"}),v.jsx(MA,{type:"button",ref:p,onClick:T,children:"Save"}),v.jsx(MA,{type:"button",ref:p,onClick:k,children:v.jsx(lA,{})})]}):v.jsxs(v.Fragment,{children:[v.jsx(KA,{label:"Set active",children:v.jsx(MA,{type:"button",className:"graphiql-history-item-label",onClick:D,"aria-label":"Set active",children:x})}),v.jsx(KA,{label:"Edit label",children:v.jsx(MA,{type:"button",className:"graphiql-history-item-action",onClick:_,"aria-label":"Edit label",children:v.jsx(TA,{"aria-hidden":"true"})})}),v.jsx(KA,{label:t.item.favorite?"Remove favorite":"Add favorite",children:v.jsx(MA,{type:"button",className:"graphiql-history-item-action",onClick:F,"aria-label":t.item.favorite?"Remove favorite":"Add favorite",children:t.item.favorite?v.jsx(DA,{"aria-hidden":"true"}):v.jsx(IA,{"aria-hidden":"true"})})}),v.jsx(KA,{label:"Delete from history",children:v.jsx(MA,{type:"button",className:"graphiql-history-item-action",onClick:O,"aria-label":"Delete from history",children:v.jsx(LA,{"aria-hidden":"true"})})})]}),n[28]=x,n[29]=i,n[30]=O,n[31]=D,n[32]=T,n[33]=F,n[34]=h,n[35]=t.item,n[36]=P):P=n[36],n[37]!==M||n[38]!==P?(j=v.jsx("li",{className:M,children:P}),n[37]=M,n[38]=P,n[39]=j):j=n[39],j}const pD=ZN("ExecutionContext");function hD(t){const n=N.c(27),{fetcher:r,getDefaultFieldNames:i,children:o,operationName:a}=t;if(!r)throw new TypeError("The `ExecutionContextProvider` component requires a `fetcher` function to be passed as prop.");let s;n[0]===Symbol.for("react.memo_cache_sentinel")?(s={nonNull:!0,caller:hD},n[0]=s):s=n[0];const{externalFragments:l,headerEditor:c,queryEditor:u,responseEditor:d,variableEditor:f,updateActiveTabValues:p}=TO(s),h=iD();let m;n[1]!==i?(m={getDefaultFieldNames:i,caller:hD},n[1]=i,n[2]=m):m=n[2];const g=$I(m),[y,b]=e.useState(!1),[E,x]=e.useState(null),w=e.useRef(0);let T;n[3]!==E?(T=()=>{null==E||E.unsubscribe(),b(!1),x(null)},n[3]=E,n[4]=T):T=n[4];const C=T;let k;n[5]!==g||n[6]!==l||n[7]!==r||n[8]!==c||n[9]!==h||n[10]!==a||n[11]!==u||n[12]!==d||n[13]!==C||n[14]!==E||n[15]!==p||n[16]!==f?(k=async()=>{if(!u||!d)return;if(E)return void C();const e=e=>{d.setValue(e),p({response:e})};w.current=w.current+1;const t=w.current;let n=g()||u.getValue();const i=null==f?void 0:f.getValue();let o;try{o=gD({json:i,errorMessageParse:"Variables are invalid JSON",errorMessageType:"Variables are not a JSON object."})}catch(k){const t=k;return void e(t instanceof Error?t.message:`${t}`)}const s=null==c?void 0:c.getValue();let m;try{m=gD({json:s,errorMessageParse:"Headers are invalid JSON",errorMessageType:"Headers are not a JSON object."})}catch(S){const t=S;return void e(t instanceof Error?t.message:`${t}`)}if(l){const e=u.documentAST?Pu(u.documentAST,l):[];e.length>0&&(n=n+"\n"+e.map(mD).join("\n"))}e(""),b(!0);const v=a??u.operationName??void 0;null==h||h.addToHistory({query:n,variables:i,headers:s,operationName:v});const y=m??void 0,T=u.documentAST??void 0;try{const i={},a=n=>{if(t!==w.current)return;let r=!!Array.isArray(n)&&n;if(!r&&"object"==typeof n&&null!==n&&"hasNext"in n&&(r=[n]),r){for(const e of r)bD(i,e);b(!1),e(cs(i))}else{const t=cs(n);b(!1),e(t)}},s=r({query:n,variables:o,operationName:v},{headers:y,documentAST:T}),l=await Promise.resolve(s);Ga(l)?x(l.subscribe({next(e){a(e)},error(t){b(!1),t&&e(ls(t)),x(null)},complete(){b(!1),x(null)}})):Ya(l)?(x({unsubscribe:()=>{var e,t;return null==(t=(e=l[Symbol.asyncIterator]()).return)?void 0:t.call(e)}}),await async function(e,t){for await(const n of t)e(n)}(a,l),b(!1),x(null)):a(l)}catch(_){const t=_;b(!1),e(ls(t)),x(null)}},n[5]=g,n[6]=l,n[7]=r,n[8]=c,n[9]=h,n[10]=a,n[11]=u,n[12]=d,n[13]=C,n[14]=E,n[15]=p,n[16]=f,n[17]=k):k=n[17];const S=k,_=Boolean(E),A=a??null;let D;n[18]!==y||n[19]!==_||n[20]!==S||n[21]!==C||n[22]!==A?(D={isFetching:y,isSubscribed:_,operationName:A,run:S,stop:C},n[18]=y,n[19]=_,n[20]=S,n[21]=C,n[22]=A,n[23]=D):D=n[23];const I=D;let O;return n[24]!==o||n[25]!==I?(O=v.jsx(pD.Provider,{value:I,children:o}),n[24]=o,n[25]=I,n[26]=O):O=n[26],O}function mD(e){return Dt(e)}const vD=eA(pD);function gD({json:e,errorMessageParse:t,errorMessageType:n}){let r;try{r=e&&""!==e.trim()?JSON.parse(e):void 0}catch(o){throw new Error(`${t}: ${o instanceof Error?o.message:o}.`)}const i="object"==typeof r&&null!==r&&!Array.isArray(r);if(void 0!==r&&!i)throw new Error(n);return r}const yD=new WeakMap;function bD(e,t){var n,r,i;let o=["data",...t.path??[]];for(const l of[e,t])if(l.pending){let t=yD.get(e);void 0===t&&(t=new Map,yD.set(e,t));for(const{id:e,path:n}of l.pending)t.set(e,["data",...n])}const{items:a}=t;if(a){const{id:r}=t;if(r){if(o=null==(n=yD.get(e))?void 0:n.get(r),void 0===o)throw new Error("Invalid incremental delivery format.");cd(e,o.join(".")).push(...a)}else{o=["data",...t.path??[]];for(const t of a)rd(e,o.join("."),t),o[o.length-1]++}}const{data:s}=t;if(s){const{id:n}=t;if(n){if(o=null==(r=yD.get(e))?void 0:r.get(n),void 0===o)throw new Error("Invalid incremental delivery format.");const{subPath:i}=t;void 0!==i&&(o=[...o,...i])}rd(e,o.join("."),s,{merge:!0})}if(t.errors&&(e.errors||(e.errors=[]),e.errors.push(...t.errors)),t.extensions&&rd(e,"extensions",t.extensions,{merge:!0}),t.incremental)for(const l of t.incremental)bD(e,l);if(t.completed)for(const{id:l,errors:c}of t.completed)null==(i=yD.get(e))||i.delete(l),c&&(e.errors||(e.errors=[]),e.errors.push(...c))}const ED="undefined"!=typeof navigator&&navigator.userAgent.includes("Mac"),xD="graphiql",wD="sublime",TD={[ED?"Cmd-F":"Ctrl-F"]:"findPersistent","Cmd-G":"findPersistent","Ctrl-G":"findPersistent","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight"};async function CD(e,t){const n=await Promise.resolve().then((()=>_L)).then((e=>"function"==typeof e?e:e.default));return await Promise.all(!1===(null==t?void 0:t.useCommonAddons)?e:[Promise.resolve().then((()=>AL)),Promise.resolve().then((()=>IL)),Promise.resolve().then((()=>LL)),Promise.resolve().then((()=>RL)),Promise.resolve().then((()=>BL)),Promise.resolve().then((()=>UL)),Promise.resolve().then((()=>qL)),Promise.resolve().then((()=>KL)),Promise.resolve().then((()=>XL)),Promise.resolve().then((()=>ZL)),...e]),n}const kD=e=>e?Dt(e):"";function SD(e){const t=N.c(12),{field:n}=e;if(!("defaultValue"in n)||void 0===n.defaultValue)return null;const r=n.defaultValue,i=n.type;let o,a,s,l,c,u;if(t[0]!==n.defaultValue||t[1]!==n.type){l=Symbol.for("react.early_return_sentinel");{const e=nr(r,i);e?(s=" = ",o="graphiql-doc-explorer-default-value",a=kD(e)):l=null}t[0]=n.defaultValue,t[1]=n.type,t[2]=o,t[3]=a,t[4]=s,t[5]=l}else o=t[2],a=t[3],s=t[4],l=t[5];return l!==Symbol.for("react.early_return_sentinel")?l:(t[6]!==o||t[7]!==a?(c=v.jsx("span",{className:o,children:a}),t[6]=o,t[7]=a,t[8]=c):c=t[8],t[9]!==s||t[10]!==c?(u=v.jsxs(v.Fragment,{children:[s,c]}),t[9]=s,t[10]=c,t[11]=u):u=t[11],u)}const _D=ZN("SchemaContext");function ND(t){const n=N.c(38);let r,i,o,a;if(n[0]!==t?(({fetcher:r,onSchemaChange:i,...o}=t),n[0]=t,n[1]=r,n[2]=i,n[3]=o):(r=n[1],i=n[2],o=n[3]),!r)throw new TypeError("The `SchemaContextProvider` component requires a `fetcher` function to be passed as prop.");n[4]===Symbol.for("react.memo_cache_sentinel")?(a={nonNull:!0,caller:ND},n[4]=a):a=n[4];const{initialHeaders:s,headerEditor:l}=TO(a),[c,u]=e.useState(),[d,f]=e.useState(!1),[p,h]=e.useState(null),m=e.useRef(0);let g,y;n[5]!==o.schema?(g=()=>{u(br(o.schema)||null==o.schema?o.schema:void 0),m.current=m.current+1},y=[o.schema],n[5]=o.schema,n[6]=g,n[7]=y):(g=n[6],y=n[7]),e.useEffect(g,y);const b=e.useRef(s);let E,x;n[8]!==l?(E=()=>{l&&(b.current=l.getValue())},n[8]=l,n[9]=E):E=n[9],e.useEffect(E),n[10]!==o.inputValueDeprecation||n[11]!==o.introspectionQueryName||n[12]!==o.schemaDescription?(x={inputValueDeprecation:o.inputValueDeprecation,introspectionQueryName:o.introspectionQueryName,schemaDescription:o.schemaDescription},n[10]=o.inputValueDeprecation,n[11]=o.introspectionQueryName,n[12]=o.schemaDescription,n[13]=x):x=n[13];const{introspectionQuery:w,introspectionQueryName:T,introspectionQuerySansSubscriptions:C}=function({inputValueDeprecation:e,introspectionQueryName:t,schemaDescription:n}){const r=t||"IntrospectionQuery";let i=Wo({inputValueDeprecation:e,schemaDescription:n});t&&(i=i.replace("query IntrospectionQuery",`query ${r}`));const o=i.replace("subscriptionType { name }","");return{introspectionQueryName:r,introspectionQuery:i,introspectionQuerySansSubscriptions:o}}(x);let k;n[14]!==r||n[15]!==w||n[16]!==T||n[17]!==C||n[18]!==i||n[19]!==o.schema?(k=()=>{if(br(o.schema)||null===o.schema)return;const e=m.current=m.current+1,t=o.schema;(async function(){if(t)return t;const e=function(e){let t=null,n=!0;try{e&&(t=JSON.parse(e))}catch{n=!1}return{headers:t,isValidJSON:n}}(b.current);if(!e.isValidJSON)return void h("Introspection failed as headers are invalid.");const n=e.headers?{headers:e.headers}:{},i=Ka(r({query:w,operationName:T},n));if(!Wa(i))return void h("Fetcher did not return a Promise for introspection.");f(!0),h(null);let o=await i;if("object"!=typeof o||null===o||!("data"in o)){const e=Ka(r({query:C,operationName:T},n));if(!Wa(e))throw new Error("Fetcher did not return a Promise for introspection.");o=await e}if(f(!1),(null==o?void 0:o.data)&&"__schema"in o.data)return o.data;const a="string"==typeof o?o:cs(o);h(a)})().then((t=>{if(e===m.current&&t)try{const e=Go(t);u(e),i&&i(e)}catch(n){h(ls(n))}})).catch((t=>{e===m.current&&(h(ls(t)),f(!1))}))},n[14]=r,n[15]=w,n[16]=T,n[17]=C,n[18]=i,n[19]=o.schema,n[20]=k):k=n[20];const S=k;let _,A,D,I;n[21]!==S?(_=()=>{S()},A=[S],n[21]=S,n[22]=_,n[23]=A):(_=n[22],A=n[23]),e.useEffect(_,A),n[24]!==S?(D=()=>{const e=function(e){e.ctrlKey&&"R"===e.key&&S()};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},n[24]=S,n[25]=D):D=n[25],e.useEffect(D),n[26]!==o.dangerouslyAssumeSchemaIsValid||n[27]!==c?(I=!c||o.dangerouslyAssumeSchemaIsValid?[]:Tr(c),n[26]=o.dangerouslyAssumeSchemaIsValid,n[27]=c,n[28]=I):I=n[28];const O=I;let L;n[29]!==p||n[30]!==S||n[31]!==d||n[32]!==c||n[33]!==O?(L={fetchError:p,introspect:S,isFetching:d,schema:c,validationErrors:O},n[29]=p,n[30]=S,n[31]=d,n[32]=c,n[33]=O,n[34]=L):L=n[34];const F=L;let R;return n[35]!==o.children||n[36]!==F?(R=v.jsx(_D.Provider,{value:F,children:o.children}),n[35]=o.children,n[36]=F,n[37]=R):R=n[37],R}const AD=eA(_D);const DD={name:"Docs"},ID=ZN("ExplorerContext");function OD(t){const n=N.c(14);let r;n[0]===Symbol.for("react.memo_cache_sentinel")?(r={nonNull:!0,caller:OD},n[0]=r):r=n[0];const{schema:i,validationErrors:o}=AD(r);let a;n[1]===Symbol.for("react.memo_cache_sentinel")?(a=[DD],n[1]=a):a=n[1];const[s,l]=e.useState(a);let c;n[2]===Symbol.for("react.memo_cache_sentinel")?(c=e=>{l((t=>t.at(-1).def===e.def?t:[...t,e]))},n[2]=c):c=n[2];const u=c;let d;n[3]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{l(FD)},n[3]=d):d=n[3];const f=d;let p;n[4]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{l(LD)},n[4]=p):p=n[4];const h=p;let m,g,y;n[5]!==i||n[6]!==o?(m=()=>{null==i||o.length>0?h():l((e=>{if(1===e.length)return e;const t=[DD];let n=null;for(const r of e)if(r!==DD)if(r.def)if(un(r.def)){const e=i.getType(r.def.name);if(!e)break;t.push({name:r.name,def:e}),n=e}else{if(null===n)break;if(Ut(n)||Yt(n)){const e=n.getFields()[r.name];if(!e)break;t.push({name:r.name,def:e})}else{if($t(n)||Gt(n)||qt(n)||Wt(n))break;{const e=n,i=e.args.find((e=>e.name===r.name));if(!i)break;t.push({name:r.name,def:e})}}}else n=null,t.push(r);return t}))},g=[i,o],n[5]=i,n[6]=o,n[7]=m,n[8]=g):(m=n[7],g=n[8]),e.useEffect(m,g),n[9]!==s?(y={explorerNavStack:s,push:u,pop:f,reset:h},n[9]=s,n[10]=y):y=n[10];const b=y;let E;return n[11]!==t.children||n[12]!==b?(E=v.jsx(ID.Provider,{value:b,children:t.children}),n[11]=t.children,n[12]=b,n[13]=E):E=n[13],E}function LD(e){return 1===e.length?e:[DD]}function FD(e){return e.length>1?e.slice(0,-1):e}const RD=eA(ID);function MD(e,t){return Qt(e)?v.jsxs(v.Fragment,{children:[MD(e.ofType,t),"!"]}):Kt(e)?v.jsxs(v.Fragment,{children:["[",MD(e.ofType,t),"]"]}):t(e)}function PD(e){const t=N.c(6);let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={nonNull:!0,caller:PD},t[0]=n):n=t[0];const{push:r}=RD(n);if(!e.type)return null;let i,o;return t[1]!==r?(i=e=>v.jsx("a",{className:"graphiql-doc-explorer-type-name",onClick:t=>{t.preventDefault(),r({name:e.name,def:e})},href:"#",children:e.name}),t[1]=r,t[2]=i):i=t[2],t[3]!==e.type||t[4]!==i?(o=MD(e.type,i),t[3]=e.type,t[4]=i,t[5]=o):o=t[5],o}function jD(e){const t=N.c(19),{arg:n,showDefaultValue:r,inline:i}=e;let o,a,s,l;t[0]!==n.name?(o=v.jsx("span",{className:"graphiql-doc-explorer-argument-name",children:n.name}),t[0]=n.name,t[1]=o):o=t[1],t[2]!==n.type?(a=v.jsx(PD,{type:n.type}),t[2]=n.type,t[3]=a):a=t[3],t[4]!==n||t[5]!==r?(s=!1!==r&&v.jsx(SD,{field:n}),t[4]=n,t[5]=r,t[6]=s):s=t[6],t[7]!==o||t[8]!==a||t[9]!==s?(l=v.jsxs("span",{children:[o,": ",a,s]}),t[7]=o,t[8]=a,t[9]=s,t[10]=l):l=t[10];const c=l;if(i)return c;let u,d,f;return t[11]!==n.description?(u=n.description?v.jsx(WA,{type:"description",children:n.description}):null,t[11]=n.description,t[12]=u):u=t[12],t[13]!==n.deprecationReason?(d=n.deprecationReason?v.jsxs("div",{className:"graphiql-doc-explorer-argument-deprecation",children:[v.jsx("div",{className:"graphiql-doc-explorer-argument-deprecation-label",children:"Deprecated"}),v.jsx(WA,{type:"deprecation",children:n.deprecationReason})]}):null,t[13]=n.deprecationReason,t[14]=d):d=t[14],t[15]!==c||t[16]!==u||t[17]!==d?(f=v.jsxs("div",{className:"graphiql-doc-explorer-argument",children:[c,u,d]}),t[15]=c,t[16]=u,t[17]=d,t[18]=f):f=t[18],f}function VD(e){const t=N.c(3);let n;return t[0]!==e.children||t[1]!==e.preview?(n=e.children?v.jsxs("div",{className:"graphiql-doc-explorer-deprecation",children:[v.jsx("div",{className:"graphiql-doc-explorer-deprecation-label",children:"Deprecated"}),v.jsx(WA,{type:"deprecation",onlyShowFirstChild:e.preview??!0,children:e.children})]}):null,t[0]=e.children,t[1]=e.preview,t[2]=n):n=t[2],n}function BD(e){const t=N.c(2),{directive:n}=e;let r;return t[0]!==n.name.value?(r=v.jsxs("span",{className:"graphiql-doc-explorer-directive",children:["@",n.name.value]}),t[0]=n.name.value,t[1]=r):r=t[1],r}function $D(e){const t=N.c(10),n=UD[e.title];let r,i,o,a;return t[0]!==n?(r=v.jsx(n,{}),t[0]=n,t[1]=r):r=t[1],t[2]!==e.title||t[3]!==r?(i=v.jsxs("div",{className:"graphiql-doc-explorer-section-title",children:[r,e.title]}),t[2]=e.title,t[3]=r,t[4]=i):i=t[4],t[5]!==e.children?(o=v.jsx("div",{className:"graphiql-doc-explorer-section-content",children:e.children}),t[5]=e.children,t[6]=o):o=t[6],t[7]!==i||t[8]!==o?(a=v.jsxs("div",{children:[i,o]}),t[7]=i,t[8]=o,t[9]=a):a=t[9],a}const UD={Arguments:iA,"Deprecated Arguments":uA,"Deprecated Enum Values":dA,"Deprecated Fields":fA,Directives:pA,"Enum Values":vA,Fields:gA,Implements:bA,Implementations:FA,"Possible Types":FA,"Root Types":NA,Type:FA,"All Schema Types":FA};function HD(e){const t=N.c(15);let n,r,i,o,a,s;return t[0]!==e.field.description?(n=e.field.description?v.jsx(WA,{type:"description",children:e.field.description}):null,t[0]=e.field.description,t[1]=n):n=t[1],t[2]!==e.field.deprecationReason?(r=v.jsx(VD,{preview:!1,children:e.field.deprecationReason}),t[2]=e.field.deprecationReason,t[3]=r):r=t[3],t[4]!==e.field.type?(i=v.jsx($D,{title:"Type",children:v.jsx(PD,{type:e.field.type})}),t[4]=e.field.type,t[5]=i):i=t[5],t[6]!==e.field?(o=v.jsx(qD,{field:e.field}),a=v.jsx(GD,{field:e.field}),t[6]=e.field,t[7]=o,t[8]=a):(o=t[7],a=t[8]),t[9]!==n||t[10]!==r||t[11]!==i||t[12]!==o||t[13]!==a?(s=v.jsxs(v.Fragment,{children:[n,r,i,o,a]}),t[9]=n,t[10]=r,t[11]=i,t[12]=o,t[13]=a,t[14]=s):s=t[14],s}function qD(t){const n=N.c(12),{field:r}=t,[i,o]=e.useState(!1);let a;n[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{o(!0)},n[0]=a):a=n[0];const s=a;if(!("args"in r))return null;let l,c,u,d,f;if(n[1]!==r.args){l=[],c=[];for(const e of r.args)e.deprecationReason?c.push(e):l.push(e);u=l.length>0?v.jsx($D,{title:"Arguments",children:l.map(WD)}):null,n[1]=r.args,n[2]=l,n[3]=c,n[4]=u}else l=n[2],c=n[3],u=n[4];return n[5]!==l.length||n[6]!==c||n[7]!==i?(d=c.length>0?i||0===l.length?v.jsx($D,{title:"Deprecated Arguments",children:c.map(zD)}):v.jsx(PA,{type:"button",onClick:s,children:"Show Deprecated Arguments"}):null,n[5]=l.length,n[6]=c,n[7]=i,n[8]=d):d=n[8],n[9]!==u||n[10]!==d?(f=v.jsxs(v.Fragment,{children:[u,d]}),n[9]=u,n[10]=d,n[11]=f):f=n[11],f}function zD(e){return v.jsx(jD,{arg:e},e.name)}function WD(e){return v.jsx(jD,{arg:e},e.name)}function GD(e){var t,n,r;const i=N.c(6),{field:o}=e;let a;i[0]!==(null==(t=o.astNode)?void 0:t.directives)?(a=(null==(n=o.astNode)?void 0:n.directives)||[],i[0]=null==(r=o.astNode)?void 0:r.directives,i[1]=a):a=i[1];const s=a;if(!s||0===s.length)return null;let l,c;return i[2]!==s?(l=s.map(YD),i[2]=s,i[3]=l):l=i[3],i[4]!==l?(c=v.jsx($D,{title:"Directives",children:l}),i[4]=l,i[5]=c):c=i[5],c}function YD(e){return v.jsx("div",{children:v.jsx(BD,{directive:e})},e.name.value)}function KD(e){var t,n,r,i;const o=N.c(39);let a;o[0]!==e.schema?(a=e.schema.getQueryType(),o[0]=e.schema,o[1]=a):a=o[1];const s=a;let l;o[2]!==e.schema?(l=null==(n=(t=e.schema).getMutationType)?void 0:n.call(t),o[2]=e.schema,o[3]=l):l=o[3];const c=l;let u;o[4]!==e.schema?(u=null==(i=(r=e.schema).getSubscriptionType)?void 0:i.call(r),o[4]=e.schema,o[5]=u):u=o[5];const d=u;let f,p,h,m,g,y,b;if(o[6]!==c||o[7]!==e.schema||o[8]!==s||o[9]!==d){const t=e.schema.getTypeMap(),n=null==s?void 0:s.name,r=null==c?void 0:c.name,i=null==d?void 0:d.name;let a;o[15]!==n||o[16]!==r||o[17]!==i?(a=[n,r,i],o[15]=n,o[16]=r,o[17]=i,o[18]=a):a=o[18];const l=a,u=e.schema.description||"A GraphQL schema provides a root type for each kind of operation.";let y,b,E;o[19]!==u?(m=v.jsx(WA,{type:"description",children:u}),o[19]=u,o[20]=m):m=o[20],o[21]!==s?(y=s?v.jsxs("div",{children:[v.jsx("span",{className:"graphiql-doc-explorer-root-type",children:"query"}),": ",v.jsx(PD,{type:s})]}):null,o[21]=s,o[22]=y):y=o[22],o[23]!==c?(b=c&&v.jsxs("div",{children:[v.jsx("span",{className:"graphiql-doc-explorer-root-type",children:"mutation"}),": ",v.jsx(PD,{type:c})]}),o[23]=c,o[24]=b):b=o[24],o[25]!==d?(E=d&&v.jsxs("div",{children:[v.jsx("span",{className:"graphiql-doc-explorer-root-type",children:"subscription"}),": ",v.jsx(PD,{type:d})]}),o[25]=d,o[26]=E):E=o[26],o[27]!==y||o[28]!==b||o[29]!==E?(g=v.jsxs($D,{title:"Root Types",children:[y,b,E]}),o[27]=y,o[28]=b,o[29]=E,o[30]=g):g=o[30],f=$D,p="All Schema Types",h=t&&v.jsx("div",{children:Object.values(t).map((e=>l.includes(e.name)||e.name.startsWith("__")?null:v.jsx("div",{children:v.jsx(PD,{type:e})},e.name)))}),o[6]=c,o[7]=e.schema,o[8]=s,o[9]=d,o[10]=f,o[11]=p,o[12]=h,o[13]=m,o[14]=g}else f=o[10],p=o[11],h=o[12],m=o[13],g=o[14];return o[31]!==f||o[32]!==p||o[33]!==h?(y=v.jsx(f,{title:p,children:h}),o[31]=f,o[32]=p,o[33]=h,o[34]=y):y=o[34],o[35]!==m||o[36]!==g||o[37]!==y?(b=v.jsxs(v.Fragment,{children:[m,g,y]}),o[35]=m,o[36]=g,o[37]=y,o[38]=b):b=o[38],b}function QD(e,t){let n;return function(...r){n&&window.clearTimeout(n),n=window.setTimeout((()=>{n=null,t(...r)}),e)}}const XD=()=>{const t=N.c(33);let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={nonNull:!0,caller:XD},t[0]=n):n=t[0];const{explorerNavStack:r,push:i}=RD(n),o=e.useRef(null),a=ZD(),[s,l]=e.useState("");let c;t[1]!==a||t[2]!==s?(c=()=>a(s),t[1]=a,t[2]=s,t[3]=c):c=t[3];const[u,d]=e.useState(c);let f;t[4]!==a?(f=QD(200,(e=>{d(a(e))})),t[4]=a,t[5]=f):f=t[5];const p=f,[h]=e.useState(o),m=h.current===document.activeElement;let g,y,b,E,x,w,T;if(t[6]!==p||t[7]!==s?(g=()=>{p(s)},y=[p,s],t[6]=p,t[7]=s,t[8]=g,t[9]=y):(g=t[8],y=t[9]),e.useEffect(g,y),t[10]===Symbol.for("react.memo_cache_sentinel")?(b=()=>{const e=function(e){e.metaKey&&"k"===e.key&&o.current.focus()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},E=[],t[10]=b,t[11]=E):(b=t[10],E=t[11]),e.useEffect(b,E),t[12]!==r||t[13]!==i){let e;x=r.at(-1),t[17]!==i?(e=e=>{i("field"in e?{name:e.field.name,def:e.field}:{name:e.type.name,def:e.type})},t[17]=i,t[18]=e):e=t[18],w=e,T=1===r.length||Ut(x.def)||qt(x.def)||Yt(x.def),t[12]=r,t[13]=i,t[14]=x,t[15]=w,t[16]=T}else x=t[14],w=t[15],T=t[16];if(!T)return null;const C=m?void 0:"idle",k=`Search ${x.name}...`;let S,_,A,D,I,O;return t[19]===Symbol.for("react.memo_cache_sentinel")?(S=()=>{o.current.focus()},_=v.jsx(xA,{}),t[19]=S,t[20]=_):(S=t[19],_=t[20]),t[21]===Symbol.for("react.memo_cache_sentinel")?(A=e=>l(e.target.value),t[21]=A):A=t[21],t[22]!==s?(D=v.jsxs("div",{className:"graphiql-doc-explorer-search-input",onClick:S,children:[_,v.jsx(JN.Input,{autoComplete:"off",onChange:A,placeholder:(ED?"⌘":"Ctrl")+" K",ref:o,value:s,"data-cy":"doc-explorer-input"})]}),t[22]=s,t[23]=D):D=t[23],t[24]!==m||t[25]!==u?(I=m&&v.jsxs(JN.Options,{"data-cy":"doc-explorer-list",children:[u.within.length+u.types.length+u.fields.length===0?v.jsx("li",{className:"graphiql-doc-explorer-search-empty",children:"No results found"}):u.within.map(iI),u.within.length>0&&u.types.length+u.fields.length>0?v.jsx("div",{className:"graphiql-doc-explorer-search-divider",children:"Other results"}):null,u.types.map(oI),u.fields.map(aI)]}),t[24]=m,t[25]=u,t[26]=I):I=t[26],t[27]!==w||t[28]!==D||t[29]!==I||t[30]!==C||t[31]!==k?(O=v.jsxs(JN,{as:"div",className:"graphiql-doc-explorer-search",onChange:w,"data-state":C,"aria-label":k,children:[D,I]}),t[27]=w,t[28]=D,t[29]=I,t[30]=C,t[31]=k,t[32]=O):O=t[32],O},JD=ZD;function ZD(e){const t=N.c(9),n=e||JD;let r;t[0]!==n?(r={nonNull:!0,caller:n},t[0]=n,t[1]=r):r=t[1];const{explorerNavStack:i}=RD(r),o=e||JD;let a;t[2]!==o?(a={nonNull:!0,caller:o},t[2]=o,t[3]=a):a=t[3];const{schema:s}=AD(a);let l;t[4]!==i?(l=i.at(-1),t[4]=i,t[5]=l):l=t[5];const c=l;let u;return t[6]!==c||t[7]!==s?(u=e=>{const t={within:[],types:[],fields:[]};if(!s)return t;const n=c.def,r=s.getTypeMap();let i=Object.keys(r);n&&(i=i.filter((e=>e!==n.name)),i.unshift(n.name));for(const o of i){if(t.within.length+t.types.length+t.fields.length>=100)break;const i=r[o];if(n!==i&&eI(o,e)&&t.types.push({type:i}),!Ut(i)&&!qt(i)&&!Yt(i))continue;const a=i.getFields();for(const r in a){const o=a[r];let s;if(!eI(r,e)){if(!("args"in o))continue;if(s=o.args.filter((t=>eI(t.name,e))),0===s.length)continue}t[n===i?"within":"fields"].push(...s?s.map((e=>({type:i,field:o,argument:e}))):[{type:i,field:o}])}}return t},t[6]=c,t[7]=s,t[8]=u):u=t[8],u}function eI(e,t){try{const n=t.replaceAll(/[^_0-9A-Za-z]/g,(e=>"\\"+e));return new RegExp(n,"i").test(e)}catch{return e.toLowerCase().includes(t.toLowerCase())}}function tI(e){const t=N.c(2);let n;return t[0]!==e.type.name?(n=v.jsx("span",{className:"graphiql-doc-explorer-search-type",children:e.type.name}),t[0]=e.type.name,t[1]=n):n=t[1],n}function nI(e){const t=N.c(7),{field:n,argument:r}=e;let i,o,a;return t[0]!==n.name?(i=v.jsx("span",{className:"graphiql-doc-explorer-search-field",children:n.name}),t[0]=n.name,t[1]=i):i=t[1],t[2]!==r?(o=r?v.jsxs(v.Fragment,{children:["(",v.jsx("span",{className:"graphiql-doc-explorer-search-argument",children:r.name}),":"," ",MD(r.type,rI),")"]}):null,t[2]=r,t[3]=o):o=t[3],t[4]!==i||t[5]!==o?(a=v.jsxs(v.Fragment,{children:[i,o]}),t[4]=i,t[5]=o,t[6]=a):a=t[6],a}function rI(e){return v.jsx(tI,{type:e})}function iI(e,t){return v.jsx(JN.Option,{value:e,"data-cy":"doc-explorer-option",children:v.jsx(nI,{field:e.field,argument:e.argument})},`within-${t}`)}function oI(e,t){return v.jsx(JN.Option,{value:e,"data-cy":"doc-explorer-option",children:v.jsx(tI,{type:e.type})},`type-${t}`)}function aI(e,t){return v.jsxs(JN.Option,{value:e,"data-cy":"doc-explorer-option",children:[v.jsx(tI,{type:e.type}),".",v.jsx(nI,{field:e.field,argument:e.argument})]},`field-${t}`)}function sI(e){const t=N.c(7);let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={nonNull:!0},t[0]=n):n=t[0];const{push:r}=RD(n);let i,o;return t[1]!==e.field||t[2]!==r?(i=t=>{t.preventDefault(),r({name:e.field.name,def:e.field})},t[1]=e.field,t[2]=r,t[3]=i):i=t[3],t[4]!==e.field.name||t[5]!==i?(o=v.jsx("a",{className:"graphiql-doc-explorer-field-name",onClick:i,href:"#",children:e.field.name}),t[4]=e.field.name,t[5]=i,t[6]=o):o=t[6],o}function lI(e){const t=N.c(2);let n;return t[0]!==e.type?(n=un(e.type)?v.jsxs(v.Fragment,{children:[e.type.description?v.jsx(WA,{type:"description",children:e.type.description}):null,v.jsx(cI,{type:e.type}),v.jsx(dI,{type:e.type}),v.jsx(vI,{type:e.type}),v.jsx(EI,{type:e.type})]}):null,t[0]=e.type,t[1]=n):n=t[1],n}function cI(e){const t=N.c(5),{type:n}=e;if(!Ut(n))return null;let r;t[0]!==n?(r=n.getInterfaces(),t[0]=n,t[1]=r):r=t[1];const i=r;let o;return t[2]!==i.length||t[3]!==n?(o=i.length>0?v.jsx($D,{title:"Implements",children:n.getInterfaces().map(uI)}):null,t[2]=i.length,t[3]=n,t[4]=o):o=t[4],o}function uI(e){return v.jsx("div",{children:v.jsx(PD,{type:e})},e.name)}function dI(t){const n=N.c(12),{type:r}=t,[i,o]=e.useState(!1);let a;n[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{o(!0)},n[0]=a):a=n[0];const s=a;if(!Ut(r)&&!qt(r)&&!Yt(r))return null;let l,c,u,d,f;if(n[1]!==r){const e=r.getFields();c=[],l=[];for(const t of Object.keys(e).map((t=>e[t])))t.deprecationReason?l.push(t):c.push(t);u=c.length>0?v.jsx($D,{title:"Fields",children:c.map(pI)}):null,n[1]=r,n[2]=l,n[3]=c,n[4]=u}else l=n[2],c=n[3],u=n[4];return n[5]!==l||n[6]!==c.length||n[7]!==i?(d=l.length>0?i||0===c.length?v.jsx($D,{title:"Deprecated Fields",children:l.map(fI)}):v.jsx(PA,{type:"button",onClick:s,children:"Show Deprecated Fields"}):null,n[5]=l,n[6]=c.length,n[7]=i,n[8]=d):d=n[8],n[9]!==u||n[10]!==d?(f=v.jsxs(v.Fragment,{children:[u,d]}),n[9]=u,n[10]=d,n[11]=f):f=n[11],f}function fI(e){return v.jsx(hI,{field:e},e.name)}function pI(e){return v.jsx(hI,{field:e},e.name)}function hI(e){const t=N.c(22),{field:n}=e;let r,i,o,a,s,l,c,u,d;if(t[0]!==n){const e="args"in n?n.args.filter(mI):[];o="graphiql-doc-explorer-item",r=v.jsx(sI,{field:n}),i=e.length>0?v.jsxs(v.Fragment,{children:["(",v.jsx("span",{children:e.map((t=>1===e.length?v.jsx(jD,{arg:t,inline:!0},t.name):v.jsx("div",{className:"graphiql-doc-explorer-argument-multiple",children:v.jsx(jD,{arg:t,inline:!0})},t.name)))}),")"]}):null,t[0]=n,t[1]=r,t[2]=i,t[3]=o}else r=t[1],i=t[2],o=t[3];return t[4]!==n.type?(a=v.jsx(PD,{type:n.type}),t[4]=n.type,t[5]=a):a=t[5],t[6]!==n?(s=v.jsx(SD,{field:n}),t[6]=n,t[7]=s):s=t[7],t[8]!==r||t[9]!==i||t[10]!==a||t[11]!==s?(l=v.jsxs("div",{children:[r,i,": ",a,s]}),t[8]=r,t[9]=i,t[10]=a,t[11]=s,t[12]=l):l=t[12],t[13]!==n.description?(c=n.description?v.jsx(WA,{type:"description",onlyShowFirstChild:!0,children:n.description}):null,t[13]=n.description,t[14]=c):c=t[14],t[15]!==n.deprecationReason?(u=v.jsx(VD,{children:n.deprecationReason}),t[15]=n.deprecationReason,t[16]=u):u=t[16],t[17]!==o||t[18]!==l||t[19]!==c||t[20]!==u?(d=v.jsxs("div",{className:o,children:[l,c,u]}),t[17]=o,t[18]=l,t[19]=c,t[20]=u,t[21]=d):d=t[21],d}function mI(e){return!e.deprecationReason}function vI(t){const n=N.c(12),{type:r}=t,[i,o]=e.useState(!1);let a;n[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{o(!0)},n[0]=a):a=n[0];const s=a;if(!Gt(r))return null;let l,c,u,d,f;if(n[1]!==r){u=[],l=[];for(const e of r.getValues())e.deprecationReason?l.push(e):u.push(e);c=u.length>0?v.jsx($D,{title:"Enum Values",children:u.map(yI)}):null,n[1]=r,n[2]=l,n[3]=c,n[4]=u}else l=n[2],c=n[3],u=n[4];return n[5]!==l||n[6]!==i||n[7]!==u.length?(d=l.length>0?i||0===u.length?v.jsx($D,{title:"Deprecated Enum Values",children:l.map(gI)}):v.jsx(PA,{type:"button",onClick:s,children:"Show Deprecated Values"}):null,n[5]=l,n[6]=i,n[7]=u.length,n[8]=d):d=n[8],n[9]!==c||n[10]!==d?(f=v.jsxs(v.Fragment,{children:[c,d]}),n[9]=c,n[10]=d,n[11]=f):f=n[11],f}function gI(e){return v.jsx(bI,{value:e},e.name)}function yI(e){return v.jsx(bI,{value:e},e.name)}function bI(e){const t=N.c(10),{value:n}=e;let r,i,o,a;return t[0]!==n.name?(r=v.jsx("div",{className:"graphiql-doc-explorer-enum-value",children:n.name}),t[0]=n.name,t[1]=r):r=t[1],t[2]!==n.description?(i=n.description?v.jsx(WA,{type:"description",children:n.description}):null,t[2]=n.description,t[3]=i):i=t[3],t[4]!==n.deprecationReason?(o=n.deprecationReason?v.jsx(WA,{type:"deprecation",children:n.deprecationReason}):null,t[4]=n.deprecationReason,t[5]=o):o=t[5],t[6]!==r||t[7]!==i||t[8]!==o?(a=v.jsxs("div",{className:"graphiql-doc-explorer-item",children:[r,i,o]}),t[6]=r,t[7]=i,t[8]=o,t[9]=a):a=t[9],a}function EI(e){const t=N.c(7),{type:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={nonNull:!0},t[0]=r):r=t[0];const{schema:i}=AD(r);if(!i||!tn(n))return null;const o=qt(n)?"Implementations":"Possible Types";let a,s;return t[1]!==i||t[2]!==n?(a=i.getPossibleTypes(n).map(xI),t[1]=i,t[2]=n,t[3]=a):a=t[3],t[4]!==o||t[5]!==a?(s=v.jsx($D,{title:o,children:a}),t[4]=o,t[5]=a,t[6]=s):s=t[6],s}function xI(e){return v.jsx("div",{children:v.jsx(PD,{type:e})},e.name)}function wI(){const e=N.c(40);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={nonNull:!0,caller:wI},e[0]=t):t=e[0];const{fetchError:n,isFetching:r,schema:i,validationErrors:o}=AD(t);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={nonNull:!0,caller:wI},e[1]=a):a=e[1];const{explorerNavStack:s,pop:l}=RD(a);let c,u,d,f,p,h,m,g,y,b;if(e[2]!==s||e[3]!==n||e[4]!==r||e[5]!==i||e[6]!==o){if(u=s.at(-1),c=null,n){let t;e[9]===Symbol.for("react.memo_cache_sentinel")?(t=v.jsx("div",{className:"graphiql-doc-explorer-error",children:"Error fetching schema"}),e[9]=t):t=e[9],c=t}else if(o.length>0){let t;e[10]!==o[0].message?(t=v.jsxs("div",{className:"graphiql-doc-explorer-error",children:["Schema is invalid: ",o[0].message]}),e[10]=o[0].message,e[11]=t):t=e[11],c=t}else if(r){let t;e[12]===Symbol.for("react.memo_cache_sentinel")?(t=v.jsx(GA,{}),e[12]=t):t=e[12],c=t}else if(i){if(1===s.length){let t;e[14]!==i?(t=v.jsx(KD,{schema:i}),e[14]=i,e[15]=t):t=e[15],c=t}else if(Bt(u.def)){let t;e[16]!==u.def?(t=v.jsx(lI,{type:u.def}),e[16]=u.def,e[17]=t):t=e[17],c=t}else if(u.def){let t;e[18]!==u.def?(t=v.jsx(HD,{field:u.def}),e[18]=u.def,e[19]=t):t=e[19],c=t}}else{let t;e[13]===Symbol.for("react.memo_cache_sentinel")?(t=v.jsx("div",{className:"graphiql-doc-explorer-error",children:"No GraphQL schema available"}),e[13]=t):t=e[13],c=t}e[2]=s,e[3]=n,e[4]=r,e[5]=i,e[6]=o,e[7]=c,e[8]=u}else c=e[7],u=e[8];if(s.length>1){let t;e[20]!==s?(t=s.at(-2),e[20]=s,e[21]=t):t=e[21],d=t.name}return e[22]!==l||e[23]!==d?(f=d&&v.jsxs("a",{href:"#",className:"graphiql-doc-explorer-back",onClick:e=>{e.preventDefault(),l()},"aria-label":`Go back to ${d}`,children:[v.jsx(aA,{}),d]}),e[22]=l,e[23]=d,e[24]=f):f=e[24],e[25]!==u.name?(p=v.jsx("div",{className:"graphiql-doc-explorer-title",children:u.name}),e[25]=u.name,e[26]=p):p=e[26],e[27]!==f||e[28]!==p?(h=v.jsxs("div",{className:"graphiql-doc-explorer-header-content",children:[f,p]}),e[27]=f,e[28]=p,e[29]=h):h=e[29],e[30]!==u.name?(m=v.jsx(XD,{},u.name),e[30]=u.name,e[31]=m):m=e[31],e[32]!==h||e[33]!==m?(g=v.jsxs("div",{className:"graphiql-doc-explorer-header",children:[h,m]}),e[32]=h,e[33]=m,e[34]=g):g=e[34],e[35]!==c?(y=v.jsx("div",{className:"graphiql-doc-explorer-content",children:c}),e[35]=c,e[36]=y):y=e[36],e[37]!==g||e[38]!==y?(b=v.jsxs("section",{className:"graphiql-doc-explorer","aria-label":"Documentation Explorer",children:[g,y]}),e[37]=g,e[38]=y,e[39]=b):b=e[39],b}const TI={title:"Documentation Explorer",icon:function(){const e=_I();return(null==e?void 0:e.visiblePlugin)===TI?v.jsx(hA,{}):v.jsx(mA,{})},content:wI},CI={title:"History",icon:yA,content:aD},kI=ZN("PluginContext");function SI(t){const n=N.c(27),r=rA(),i=RD(),o=iD(),a=Boolean(i),s=Boolean(o);let l,c;if(n[0]!==a||n[1]!==s||n[2]!==t.plugins){c=[];const e={};let r;a&&(c.push(TI),e[TI.title]=!0),s&&(c.push(CI),e[CI.title]=!0),n[4]!==t.plugins?(r=t.plugins||[],n[4]=t.plugins,n[5]=r):r=n[5];for(const t of r){if("string"!=typeof t.title||!t.title)throw new Error("All GraphiQL plugins must have a unique title");if(e[t.title])throw new Error(`All GraphiQL plugins must have a unique title, found two plugins with the title '${t.title}'`);c.push(t),e[t.title]=!0}n[0]=a,n[1]=s,n[2]=t.plugins,n[3]=c}else c=n[3];l=c;const u=l;let d;n[6]!==u||n[7]!==t.visiblePlugin||n[8]!==r?(d=()=>{const e=null==r?void 0:r.get(NI),n=u.find((t=>t.title===e));return n||(e&&(null==r||r.set(NI,"")),t.visiblePlugin&&u.find((e=>("string"==typeof t.visiblePlugin?e.title:e)===t.visiblePlugin))||null)},n[6]=u,n[7]=t.visiblePlugin,n[8]=r,n[9]=d):d=n[9];const[f,p]=e.useState(d),{onTogglePluginVisibility:h,children:m}=t;let g;n[10]!==h||n[11]!==u?(g=e=>{const t=e&&u.find((t=>("string"==typeof e?t.title:t)===e))||null;p((e=>t===e?e:(null==h||h(t),t)))},n[10]=h,n[11]=u,n[12]=g):g=n[12];const y=g;let b,E,x;n[13]!==t.visiblePlugin||n[14]!==y?(b=()=>{t.visiblePlugin&&y(t.visiblePlugin)},n[13]=t.visiblePlugin,n[14]=y,n[15]=b):b=n[15],n[16]!==u||n[17]!==t.visiblePlugin||n[18]!==y?(E=[u,t.visiblePlugin,y],n[16]=u,n[17]=t.visiblePlugin,n[18]=y,n[19]=E):E=n[19],e.useEffect(b,E),n[20]!==u||n[21]!==y||n[22]!==f?(x={plugins:u,setVisiblePlugin:y,visiblePlugin:f},n[20]=u,n[21]=y,n[22]=f,n[23]=x):x=n[23];const w=x;let T;return n[24]!==m||n[25]!==w?(T=v.jsx(kI.Provider,{value:w,children:m}),n[24]=m,n[25]=w,n[26]=T):T=n[26],T}const _I=eA(kI),NI="visiblePlugin";function AI(t,n){const r=N.c(4);let i,o;r[0]!==t||r[1]!==n?(i=()=>{t&&"string"==typeof n&&n!==t.getValue()&&t.setValue(n)},o=[t,n],r[0]=t,r[1]=n,r[2]=i,r[3]=o):(i=r[2],o=r[3]),e.useEffect(i,o)}function DI(t,n,r){const i=N.c(5);let o,a;i[0]!==t||i[1]!==n||i[2]!==r?(o=()=>{t&&t.setOption(n,r)},a=[t,n,r],i[0]=t,i[1]=n,i[2]=r,i[3]=o,i[4]=a):(o=i[3],a=i[4]),e.useEffect(o,a)}function II(t,n,r,i,o){const a=N.c(10);let s;a[0]!==o?(s={nonNull:!0,caller:o},a[0]=o,a[1]=s):s=a[1];const{updateActiveTabValues:l}=TO(s),c=rA();let u,d;a[2]!==n||a[3]!==t||a[4]!==c||a[5]!==r||a[6]!==i||a[7]!==l?(u=()=>{if(!t)return;const e=QD(500,(e=>{c&&null!==r&&c.set(r,e)})),o=QD(100,(e=>{l({[i]:e})})),a=(t,r)=>{if(!r)return;const i=t.getValue();e(i),o(i),null==n||n(i)};return t.on("change",a),()=>t.off("change",a)},d=[n,t,c,r,i,l],a[2]=n,a[3]=t,a[4]=c,a[5]=r,a[6]=i,a[7]=l,a[8]=u,a[9]=d):(u=a[8],d=a[9]),e.useEffect(u,d)}function OI(t,n,r){const i=N.c(9);let o;i[0]!==r?(o={nonNull:!0,caller:r},i[0]=r,i[1]=o):o=i[1];const{schema:a}=AD(o),s=RD(),l=_I();let c,u;i[2]!==n||i[3]!==t||i[4]!==s||i[5]!==l||i[6]!==a?(c=()=>{if(!t)return;const e=(e,t)=>{!function(e,t,n,r,i,o){function a(e){if(!(n&&r&&i&&e.currentTarget instanceof HTMLElement))return;const t=e.currentTarget.textContent||"",a=n.getType(t);a&&(i.setVisiblePlugin(TI),r.push({name:a.name,def:a}),null==o||o(a))}CD([],{useCommonAddons:!1}).then((e=>{let n,r,i,o,s,l,c,u,d;e.on(t,"select",((e,t)=>{if(!n){const e=t.parentNode;n=document.createElement("div"),n.className="CodeMirror-hint-information",e.append(n);const f=document.createElement("header");f.className="CodeMirror-hint-information-header",n.append(f),r=document.createElement("span"),r.className="CodeMirror-hint-information-field-name",f.append(r),i=document.createElement("span"),i.className="CodeMirror-hint-information-type-name-pill",f.append(i),o=document.createElement("span"),i.append(o),s=document.createElement("a"),s.className="CodeMirror-hint-information-type-name",s.href="javascript:void 0",s.addEventListener("click",a),i.append(s),l=document.createElement("span"),i.append(l),c=document.createElement("div"),c.className="CodeMirror-hint-information-description",n.append(c),u=document.createElement("div"),u.className="CodeMirror-hint-information-deprecation",n.append(u);const p=document.createElement("span");p.className="CodeMirror-hint-information-deprecation-label",p.textContent="Deprecated",u.append(p),d=document.createElement("div"),d.className="CodeMirror-hint-information-deprecation-reason",u.append(d);const h=parseInt(window.getComputedStyle(n).paddingBottom.replace(/px$/,""),10)||0,m=parseInt(window.getComputedStyle(n).maxHeight.replace(/px$/,""),10)||0,v=()=>{n&&(n.style.paddingTop=e.scrollTop+h+"px",n.style.maxHeight=e.scrollTop+m+"px")};let g;e.addEventListener("scroll",v),e.addEventListener("DOMNodeRemoved",g=t=>{t.target===e&&(e.removeEventListener("scroll",v),e.removeEventListener("DOMNodeRemoved",g),n&&n.removeEventListener("click",a),n=null,r=null,i=null,o=null,s=null,l=null,c=null,u=null,d=null,g=null)})}if(r&&(r.textContent=e.text),i&&o&&s&&l)if(e.type){i.style.display="inline";const t=e=>{Qt(e)?(l.textContent="!"+l.textContent,t(e.ofType)):Kt(e)?(o.textContent+="[",l.textContent="]"+l.textContent,t(e.ofType)):s.textContent=e.name};o.textContent="",l.textContent="",t(e.type)}else o.textContent="",s.textContent="",l.textContent="",i.style.display="none";c&&(e.description?(c.style.display="block",c.innerHTML=zA.render(e.description)):(c.style.display="none",c.innerHTML="")),u&&d&&(e.deprecationReason?(u.style.display="block",d.innerHTML=zA.render(e.deprecationReason)):(u.style.display="none",d.innerHTML=""))}))}))}(0,t,a,s,l,(e=>{null==n||n({kind:"Type",type:e,schema:a||void 0})}))};return t.on("hasCompletion",e),()=>t.off("hasCompletion",e)},u=[n,t,s,l,a],i[2]=n,i[3]=t,i[4]=s,i[5]=l,i[6]=a,i[7]=c,i[8]=u):(c=i[7],u=i[8]),e.useEffect(c,u)}function LI(t,n,r){const i=N.c(5);let o,a;i[0]!==r||i[1]!==t||i[2]!==n?(o=()=>{if(t){for(const e of n)t.removeKeyMap(e);if(r){const e={};for(const t of n)e[t]=()=>r();t.addKeyMap(e)}}},a=[t,n,r],i[0]=r,i[1]=t,i[2]=n,i[3]=o,i[4]=a):(o=i[3],a=i[4]),e.useEffect(o,a)}const FI=jI,RI=VI,MI=BI,PI=$I;function jI(e){const t=N.c(7);let n;t[0]!==e?(n=void 0===e?{}:e,t[0]=e,t[1]=n):n=t[1];const{caller:r,onCopyQuery:i}=n,o=r||FI;let a;t[2]!==o?(a={nonNull:!0,caller:o},t[2]=o,t[3]=a):a=t[3];const{queryEditor:s}=TO(a);let l;return t[4]!==i||t[5]!==s?(l=()=>{if(!s)return;const e=s.getValue();pd(e),null==i||i(e)},t[4]=i,t[5]=s,t[6]=l):l=t[6],l}function VI(e){const t=N.c(8);let n;t[0]!==e?(n=void 0===e?{}:e,t[0]=e,t[1]=n):n=t[1];const{caller:r}=n,i=r||RI;let o;t[2]!==i?(o={nonNull:!0,caller:i},t[2]=i,t[3]=o):o=t[3];const{queryEditor:a}=TO(o);let s;t[4]===Symbol.for("react.memo_cache_sentinel")?(s={nonNull:!0,caller:RI},t[4]=s):s=t[4];const{schema:l}=AD(s);let c;return t[5]!==a||t[6]!==l?(c=()=>{const e=null==a?void 0:a.documentAST,t=null==a?void 0:a.getValue();e&&t&&a.setValue(Dt(ms(e,l)))},t[5]=a,t[6]=l,t[7]=c):c=t[7],c}function BI(e){const t=N.c(8);let n;t[0]!==e?(n=void 0===e?{}:e,t[0]=e,t[1]=n):n=t[1];const{caller:r}=n,i=r||MI;let o;t[2]!==i?(o={nonNull:!0,caller:i},t[2]=i,t[3]=o):o=t[3];const{queryEditor:a,headerEditor:s,variableEditor:l}=TO(o);let c;return t[4]!==s||t[5]!==a||t[6]!==l?(c=()=>{if(l){const e=l.getValue();try{const t=JSON.stringify(JSON.parse(e),null,2);t!==e&&l.setValue(t)}catch{}}if(s){const e=s.getValue();try{const t=JSON.stringify(JSON.parse(e),null,2);t!==e&&s.setValue(t)}catch{}}if(a){const e=a.getValue(),t=Dt(it(e));t!==e&&a.setValue(t)}},t[4]=s,t[5]=a,t[6]=l,t[7]=c):c=t[7],c}function $I(e){const t=N.c(10);let n;t[0]!==e?(n=void 0===e?{}:e,t[0]=e,t[1]=n):n=t[1];const{getDefaultFieldNames:r,caller:i}=n,o=i||PI;let a;t[2]!==o?(a={nonNull:!0,caller:o},t[2]=o,t[3]=a):a=t[3];const{schema:s}=AD(a),l=i||PI;let c;t[4]!==l?(c={nonNull:!0,caller:l},t[4]=l,t[5]=c):c=t[5];const{queryEditor:u}=TO(c);let d;return t[6]!==r||t[7]!==u||t[8]!==s?(d=()=>{if(!u)return;const e=u.getValue(),{insertions:t,result:n}=us(s,e,r);return t&&t.length>0&&u.operation((()=>{const e=u.getCursor(),r=u.indexFromPos(e);let i;u.setValue(n||""),i=0;const o=t.map((e=>{const{index:t,string:n}=e;return i+=n.length,u.markText(u.posFromIndex(t+i),u.posFromIndex(t+i),{className:"auto-inserted-leaf",clearOnEnter:!0,title:"Automatically added leaf fields"})}));setTimeout((()=>{for(const e of o)e.clear()}),7e3);let a=r;for(const{index:n,string:s}of t)n<r&&(a+=s.length);u.setCursor(u.posFromIndex(a))})),n},t[6]=r,t[7]=u,t[8]=s,t[9]=d):d=t[9],d}const UI=t=>{const n=TO({nonNull:!0})[`${t}Editor`];let r="";const i=(null==n?void 0:n.getValue())??!1;i&&i.length>0&&(r=i);const o=e.useCallback((e=>null==n?void 0:n.setValue(e)),[n]);return e.useMemo((()=>[r,o]),[r,o])};const HI=qI;function qI(t,n){const r=N.c(17);let i;r[0]!==t?(i=void 0===t?{}:t,r[0]=t,r[1]=i):i=r[1];const{editorTheme:o,keyMap:a,onEdit:s,readOnly:l}=i,c=void 0===o?xD:o,u=void 0===a?wD:a,d=void 0!==l&&l,f=n||HI;let p;r[2]!==f?(p={nonNull:!0,caller:f},r[2]=f,r[3]=p):p=r[3];const{initialHeaders:h,headerEditor:m,setHeaderEditor:v,shouldPersistHeaders:g}=TO(p),y=vD(),b=n||HI;let E;r[4]!==b?(E={caller:b},r[4]=b,r[5]=E):E=r[5];const x=VI(E),w=n||HI;let T;r[6]!==w?(T={caller:w},r[6]=w,r[7]=T):T=r[7];const C=BI(T),k=e.useRef(null);let S,_,A,D,I;return r[8]!==c||r[9]!==h||r[10]!==d||r[11]!==v?(S=()=>{let e;return e=!0,CD([Promise.resolve().then((()=>nF))]).then((t=>{if(!e)return;const n=k.current;if(!n)return;const r=t(n,{value:h,lineNumbers:!0,tabSize:2,mode:{name:"javascript",json:!0},theme:c,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:!!d&&"nocursor",foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:TD});r.addKeyMap({"Cmd-Space"(){r.showHint({completeSingle:!1,container:n})},"Ctrl-Space"(){r.showHint({completeSingle:!1,container:n})},"Alt-Space"(){r.showHint({completeSingle:!1,container:n})},"Shift-Space"(){r.showHint({completeSingle:!1,container:n})}}),r.on("keyup",zI),v(r)})),()=>{e=!1}},_=[c,h,d,v],r[8]=c,r[9]=h,r[10]=d,r[11]=v,r[12]=S,r[13]=_):(S=r[12],_=r[13]),e.useEffect(S,_),DI(m,"keyMap",u),II(m,s,g?WI:null,"headers",HI),r[14]===Symbol.for("react.memo_cache_sentinel")?(A=["Cmd-Enter","Ctrl-Enter"],r[14]=A):A=r[14],LI(m,A,null==y?void 0:y.run),r[15]===Symbol.for("react.memo_cache_sentinel")?(D=["Shift-Ctrl-P"],r[15]=D):D=r[15],LI(m,D,C),r[16]===Symbol.for("react.memo_cache_sentinel")?(I=["Shift-Ctrl-M"],r[16]=I):I=r[16],LI(m,I,x),k}function zI(e,t){const{code:n,key:r,shiftKey:i}=t,o=n.startsWith("Key"),a=!i&&n.startsWith("Digit");(o||a||"_"===r||'"'===r)&&e.execCommand("autocomplete")}const WI="headers",GI=Array.from({length:11},((e,t)=>String.fromCharCode(8192+t))).concat(["\u2028","\u2029"," "," "]),YI=new RegExp("["+GI.join("")+"]","g");function KI(e){return e.replace(YI," ")}const QI=XI;function XI(t,n){const r=N.c(41);let i;r[0]!==t?(i=void 0===t?{}:t,r[0]=t,r[1]=i):i=r[1];const{editorTheme:o,keyMap:a,onClickReference:s,onCopyQuery:l,onEdit:c,readOnly:u}=i,d=void 0===o?xD:o,f=void 0===a?wD:a,p=void 0!==u&&u,h=n||QI;let m;r[2]!==h?(m={nonNull:!0,caller:h},r[2]=h,r[3]=m):m=r[3];const{schema:v}=AD(m),g=n||QI;let y;r[4]!==g?(y={nonNull:!0,caller:g},r[4]=g,r[5]=y):y=r[5];const{externalFragments:b,initialQuery:E,queryEditor:x,setOperationName:w,setQueryEditor:T,validationRules:C,variableEditor:k,updateActiveTabValues:S}=TO(y),_=vD(),A=rA(),D=RD(),I=_I(),O=n||QI;let L;r[6]!==l||r[7]!==O?(L={caller:O,onCopyQuery:l},r[6]=l,r[7]=O,r[8]=L):L=r[8];const F=jI(L),R=n||QI;let M;r[9]!==R?(M={caller:R},r[9]=R,r[10]=M):M=r[10];const P=VI(M),j=n||QI;let V;r[11]!==j?(V={caller:j},r[11]=j,r[12]=V):V=r[12];const B=BI(V),$=e.useRef(null),U=e.useRef(),H=e.useRef(tO);let q,z,W,G,Y,K;r[13]!==D||r[14]!==s||r[15]!==I?(q=()=>{H.current=e=>{if(D&&I){I.setVisiblePlugin(TI);e:switch(e.kind){case"Type":D.push({name:e.type.name,def:e.type});break e;case"Field":D.push({name:e.field.name,def:e.field});break e;case"Argument":e.field&&D.push({name:e.field.name,def:e.field});break e;case"EnumValue":e.type&&D.push({name:e.type.name,def:e.type})}null==s||s(e)}}},z=[D,s,I],r[13]=D,r[14]=s,r[15]=I,r[16]=q,r[17]=z):(q=r[16],z=r[17]),e.useEffect(q,z),r[18]!==d||r[19]!==E||r[20]!==p||r[21]!==T?(W=()=>{let e;return e=!0,CD([Promise.resolve().then((()=>iF)),Promise.resolve().then((()=>aF)),Promise.resolve().then((()=>sF)),Promise.resolve().then((()=>uF)),Promise.resolve().then((()=>SF)),Promise.resolve().then((()=>LF)),Promise.resolve().then((()=>RF))]).then((t=>{if(!e)return;U.current=t;const n=$.current;if(!n)return;const r=t(n,{value:E,lineNumbers:!0,tabSize:2,foldGutter:!0,mode:"graphql",theme:d,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:!!p&&"nocursor",lint:{schema:void 0,validationRules:null,externalFragments:void 0},hintOptions:{schema:void 0,closeOnUnfocus:!1,completeSingle:!1,container:n,externalFragments:void 0,autocompleteOptions:{mode:yu.EXECUTABLE}},info:{schema:void 0,renderDescription:eO,onClick(e){H.current(e)}},jump:{schema:void 0,onClick(e){H.current(e)}},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:{...TD,"Cmd-S"(){},"Ctrl-S"(){}}});let i;r.addKeyMap({"Cmd-Space"(){r.showHint({completeSingle:!0,container:n})},"Ctrl-Space"(){r.showHint({completeSingle:!0,container:n})},"Alt-Space"(){r.showHint({completeSingle:!0,container:n})},"Shift-Space"(){r.showHint({completeSingle:!0,container:n})},"Shift-Alt-Space"(){r.showHint({completeSingle:!0,container:n})}}),r.on("keyup",ZI),i=!1,r.on("startCompletion",(()=>{i=!0})),r.on("endCompletion",(()=>{i=!1})),r.on("keydown",((e,t)=>{"Escape"===t.key&&i&&t.stopPropagation()})),r.on("beforeChange",JI),r.documentAST=null,r.operationName=null,r.operations=null,r.variableToType=null,T(r)})),()=>{e=!1}},G=[d,E,p,T],r[18]=d,r[19]=E,r[20]=p,r[21]=T,r[22]=W,r[23]=G):(W=r[22],G=r[23]),e.useEffect(W,G),DI(x,"keyMap",f),r[24]!==c||r[25]!==x||r[26]!==v||r[27]!==w||r[28]!==A||r[29]!==S||r[30]!==k?(Y=()=>{if(!x)return;const e=function(e){var t;const n=function(e,n){if(n)try{const t=it(n);return Object.assign(Object.assign({},Bu(t,e)),{documentAST:t})}catch(t){return}}(v,e.getValue()),r=function(e,t,n){if(!n||n.length<1)return;const r=n.map((e=>{var t;return null==(t=e.name)?void 0:t.value}));if(t&&r.includes(t))return t;if(t&&e){const n=e.map((e=>{var t;return null==(t=e.name)?void 0:t.value})).indexOf(t);if(-1!==n&&n<r.length)return r[n]}return r[0]}(e.operations??void 0,e.operationName??void 0,null==n?void 0:n.operations);return e.documentAST=(null==n?void 0:n.documentAST)??null,e.operationName=r??null,e.operations=(null==n?void 0:n.operations)??null,k&&(!function(e,t){e.state.lint.linterOptions.variableToType=null==t?void 0:t.variableToType,e.options.lint.variableToType=null==t?void 0:t.variableToType,e.options.hintOptions.variableToType=null==t?void 0:t.variableToType}(k,n),null==(t=U.current)||t.signal(k,"change",k)),n?{...n,operationName:r}:null},t=QD(100,(t=>{const n=t.getValue();null==A||A.set(rO,n);const r=t.operationName,i=e(t);void 0!==(null==i?void 0:i.operationName)&&(null==A||A.set(iO,i.operationName)),null==c||c(n,null==i?void 0:i.documentAST),(null==i?void 0:i.operationName)&&r!==i.operationName&&w(i.operationName),S({query:n,operationName:(null==i?void 0:i.operationName)??null})}));return e(x),x.on("change",t),()=>x.off("change",t)},K=[c,x,v,w,A,k,S],r[24]=c,r[25]=x,r[26]=v,r[27]=w,r[28]=A,r[29]=S,r[30]=k,r[31]=Y,r[32]=K):(Y=r[31],K=r[32]),e.useEffect(Y,K),function(t,n,r){const i=N.c(5);let o,a;i[0]!==r||i[1]!==t||i[2]!==n?(o=()=>{if(!t)return;const e=t.options.lint.schema!==n;!function(e,t){e.state.lint.linterOptions.schema=t,e.options.lint.schema=t,e.options.hintOptions.schema=t,e.options.info.schema=t,e.options.jump.schema=t}(t,n),e&&r.current&&r.current.signal(t,"change",t)},a=[t,n,r],i[0]=r,i[1]=t,i[2]=n,i[3]=o,i[4]=a):(o=i[3],a=i[4]);e.useEffect(o,a)}(x,v??null,U),function(t,n,r){const i=N.c(5);let o,a;i[0]!==r||i[1]!==t||i[2]!==n?(o=()=>{if(!t)return;const e=t.options.lint.validationRules!==n;!function(e,t){e.state.lint.linterOptions.validationRules=t,e.options.lint.validationRules=t}(t,n),e&&r.current&&r.current.signal(t,"change",t)},a=[t,n,r],i[0]=r,i[1]=t,i[2]=n,i[3]=o,i[4]=a):(o=i[3],a=i[4]);e.useEffect(o,a)}(x,C??null,U),function(t,n,r){const i=N.c(7);let o;i[0]!==n?(o=[...n.values()],i[0]=n,i[1]=o):o=i[1];const a=o;let s,l;i[2]!==r||i[3]!==t||i[4]!==a?(s=()=>{if(!t)return;const e=t.options.lint.externalFragments!==a;!function(e,t){e.state.lint.linterOptions.externalFragments=t,e.options.lint.externalFragments=t,e.options.hintOptions.externalFragments=t}(t,a),e&&r.current&&r.current.signal(t,"change",t)},l=[t,a,r],i[2]=r,i[3]=t,i[4]=a,i[5]=s,i[6]=l):(s=i[5],l=i[6]);e.useEffect(s,l)}(x,b,U),OI(x,s||null,QI);const Q=null==_?void 0:_.run;let X;r[33]!==x||r[34]!==Q||r[35]!==w?(X=()=>{var e;if(!(Q&&x&&x.operations&&x.hasFocus()))return void(null==Q||Q());const t=x.indexFromPos(x.getCursor());let n;for(const r of x.operations)r.loc&&r.loc.start<=t&&r.loc.end>=t&&(n=null==(e=r.name)?void 0:e.value);n&&n!==x.operationName&&w(n),Q()},r[33]=x,r[34]=Q,r[35]=w,r[36]=X):X=r[36];const J=X;let Z,ee,te,ne;return r[37]===Symbol.for("react.memo_cache_sentinel")?(Z=["Cmd-Enter","Ctrl-Enter"],r[37]=Z):Z=r[37],LI(x,Z,J),r[38]===Symbol.for("react.memo_cache_sentinel")?(ee=["Shift-Ctrl-C"],r[38]=ee):ee=r[38],LI(x,ee,F),r[39]===Symbol.for("react.memo_cache_sentinel")?(te=["Shift-Ctrl-P","Shift-Ctrl-F"],r[39]=te):te=r[39],LI(x,te,B),r[40]===Symbol.for("react.memo_cache_sentinel")?(ne=["Shift-Ctrl-M"],r[40]=ne):ne=r[40],LI(x,ne,P),$}function JI(e,t){var n;if("paste"===t.origin){const e=t.text.map(KI);null==(n=t.update)||n.call(t,t.from,t.to,e)}}function ZI(e,t){nO.test(t.key)&&e.execCommand("autocomplete")}function eO(e){return zA.render(e)}function tO(){}const nO=/^[a-zA-Z0-9_@(]$/,rO="query",iO="operationName";function oO({defaultQuery:e,defaultHeaders:t,headers:n,defaultTabs:r,query:i,variables:o,storage:a,shouldPersistHeaders:s}){const l=null==a?void 0:a.get(vO);try{if(!l)throw new Error("Storage for tabs is empty");const e=JSON.parse(l),t=s?n:void 0;if((c=e)&&"object"==typeof c&&!Array.isArray(c)&&function(e,t){return t in e&&"number"==typeof e[t]}(c,"activeTabIndex")&&"tabs"in c&&Array.isArray(c.tabs)&&c.tabs.every(aO)){const r=pO({query:i,variables:o,headers:t});let a=-1;for(let t=0;t<e.tabs.length;t++){const n=e.tabs[t];n.hash=pO({query:n.query,variables:n.variables,headers:n.headers}),n.hash===r&&(a=t)}if(a>=0)e.activeTabIndex=a;else{const t=i?hO(i):null;e.tabs.push({id:fO(),hash:r,title:t||mO,query:i,variables:o,headers:n,operationName:t,response:null}),e.activeTabIndex=e.tabs.length-1}return e}throw new Error("Storage for tabs is invalid")}catch{return{activeTabIndex:0,tabs:(r||[{query:i??e,variables:o,headers:n??t}]).map(uO)}}var c}function aO(e){return e&&"object"==typeof e&&!Array.isArray(e)&&sO(e,"id")&&sO(e,"title")&&lO(e,"query")&&lO(e,"variables")&&lO(e,"headers")&&lO(e,"operationName")&&lO(e,"response")}function sO(e,t){return t in e&&"string"==typeof e[t]}function lO(e,t){return t in e&&("string"==typeof e[t]||null===e[t])}function cO(e,t=!1){return JSON.stringify(e,((e,n)=>"hash"===e||"response"===e||!t&&"headers"===e?null:n))}function uO({query:e=null,variables:t=null,headers:n=null}={}){return{id:fO(),hash:pO({query:e,variables:t,headers:n}),title:e&&hO(e)||mO,query:e,variables:t,headers:n,operationName:null,response:null}}function dO(e,t){return{...e,tabs:e.tabs.map(((n,r)=>{if(r!==e.activeTabIndex)return n;const i={...n,...t};return{...i,hash:pO(i),title:i.operationName||(i.query?hO(i.query):void 0)||mO}}))}}function fO(){const e=()=>Math.floor(65536*(1+Math.random())).toString(16).slice(1);return`${e()}${e()}-${e()}-${e()}-${e()}-${e()}${e()}${e()}`}function pO(e){return[e.query??"",e.variables??"",e.headers??""].join("|")}function hO(e){const t=/^(?!#).*(query|subscription|mutation)\s+([a-zA-Z0-9_]+)/m.exec(e);return(null==t?void 0:t[2])??null}const mO="<untitled>",vO="tabState";const gO=yO;function yO(t,n){const r=N.c(17);let i;r[0]!==t?(i=void 0===t?{}:t,r[0]=t,r[1]=i):i=r[1];const{editorTheme:o,keyMap:a,onClickReference:s,onEdit:l,readOnly:c}=i,u=void 0===o?xD:o,d=void 0===a?wD:a,f=void 0!==c&&c,p=n||gO;let h;r[2]!==p?(h={nonNull:!0,caller:p},r[2]=p,r[3]=h):h=r[3];const{initialVariables:m,variableEditor:v,setVariableEditor:g}=TO(h),y=vD(),b=n||gO;let E;r[4]!==b?(E={caller:b},r[4]=b,r[5]=E):E=r[5];const x=VI(E),w=n||gO;let T;r[6]!==w?(T={caller:w},r[6]=w,r[7]=T):T=r[7];const C=BI(T),k=e.useRef(null),S=e.useRef();let _,A,D,I,O;return r[8]!==u||r[9]!==m||r[10]!==f||r[11]!==g?(_=()=>{let e;return e=!0,CD([Promise.resolve().then((()=>BF)),Promise.resolve().then((()=>cR)),Promise.resolve().then((()=>pR))]).then((t=>{if(!e)return;S.current=t;const n=k.current;if(!n)return;const r=t(n,{value:m,lineNumbers:!0,tabSize:2,mode:"graphql-variables",theme:u,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:!!f&&"nocursor",foldGutter:!0,lint:{variableToType:void 0},hintOptions:{closeOnUnfocus:!1,completeSingle:!1,container:n,variableToType:void 0},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:TD});r.addKeyMap({"Cmd-Space"(){r.showHint({completeSingle:!1,container:n})},"Ctrl-Space"(){r.showHint({completeSingle:!1,container:n})},"Alt-Space"(){r.showHint({completeSingle:!1,container:n})},"Shift-Space"(){r.showHint({completeSingle:!1,container:n})}}),r.on("keyup",bO),g(r)})),()=>{e=!1}},A=[u,m,f,g],r[8]=u,r[9]=m,r[10]=f,r[11]=g,r[12]=_,r[13]=A):(_=r[12],A=r[13]),e.useEffect(_,A),DI(v,"keyMap",d),II(v,l,EO,"variables",gO),OI(v,s||null,gO),r[14]===Symbol.for("react.memo_cache_sentinel")?(D=["Cmd-Enter","Ctrl-Enter"],r[14]=D):D=r[14],LI(v,D,null==y?void 0:y.run),r[15]===Symbol.for("react.memo_cache_sentinel")?(I=["Shift-Ctrl-P"],r[15]=I):I=r[15],LI(v,I,C),r[16]===Symbol.for("react.memo_cache_sentinel")?(O=["Shift-Ctrl-M"],r[16]=O):O=r[16],LI(v,O,x),k}function bO(e,t){const{code:n,key:r,shiftKey:i}=t,o=n.startsWith("Key"),a=!i&&n.startsWith("Digit");(o||a||"_"===r||'"'===r)&&e.execCommand("autocomplete")}const EO="variables",xO=ZN("EditorContext");function wO(t){const n=N.c(89),r=rA(),[i,o]=e.useState(null),[a,s]=e.useState(null),[l,c]=e.useState(null),[u,d]=e.useState(null);let f;n[0]!==t.shouldPersistHeaders||n[1]!==r?(f=()=>{const e=null!==(null==r?void 0:r.get(CO));return!1!==t.shouldPersistHeaders&&e?"true"===(null==r?void 0:r.get(CO)):Boolean(t.shouldPersistHeaders)},n[0]=t.shouldPersistHeaders,n[1]=r,n[2]=f):f=n[2];const[p,h]=e.useState(f);let m;AI(i,t.headers),AI(a,t.query),AI(l,t.response),AI(u,t.variables),n[3]!==p||n[4]!==r?(m={storage:r,shouldPersistHeaders:p},n[3]=p,n[4]=r,n[5]=m):m=n[5];const g=function({storage:t,shouldPersistHeaders:n}){const r=e.useMemo((()=>QD(500,(e=>{null==t||t.set(vO,e)}))),[t]);return e.useCallback((e=>{r(cO(e,n))}),[n,r])}(m);let y;n[6]!==t.defaultHeaders||n[7]!==t.defaultQuery||n[8]!==t.defaultTabs||n[9]!==t.headers||n[10]!==t.query||n[11]!==t.response||n[12]!==t.variables||n[13]!==p||n[14]!==r||n[15]!==g?(y=()=>{const e=t.query??(null==r?void 0:r.get(rO))??null,n=t.variables??(null==r?void 0:r.get(EO))??null,i=t.headers??(null==r?void 0:r.get(WI))??null,o=t.response??"",a=oO({query:e,variables:n,headers:i,defaultTabs:t.defaultTabs,defaultQuery:t.defaultQuery||kO,defaultHeaders:t.defaultHeaders,storage:r,shouldPersistHeaders:p});return g(a),{query:e??(0===a.activeTabIndex?a.tabs[0].query:null)??"",variables:n??"",headers:i??t.defaultHeaders??"",response:o,tabState:a}},n[6]=t.defaultHeaders,n[7]=t.defaultQuery,n[8]=t.defaultTabs,n[9]=t.headers,n[10]=t.query,n[11]=t.response,n[12]=t.variables,n[13]=p,n[14]=r,n[15]=g,n[16]=y):y=n[16];const[b]=e.useState(y),[E,x]=e.useState(b.tabState);let w;n[17]!==i||n[18]!==r||n[19]!==E?(w=e=>{if(e){null==r||r.set(WI,(null==i?void 0:i.getValue())??"");const e=cO(E,!0);null==r||r.set(vO,e)}else null==r||r.set(WI,""),function(e){const t=null==e?void 0:e.get(vO);if(t){const n=JSON.parse(t);null==e||e.set(vO,JSON.stringify(n,((e,t)=>"headers"===e?null:t)))}}(r);h(e),null==r||r.set(CO,e.toString())},n[17]=i,n[18]=r,n[19]=E,n[20]=w):w=n[20];const T=w,C=e.useRef();let k,S,_;n[21]!==t.shouldPersistHeaders||n[22]!==T?(k=()=>{const e=Boolean(t.shouldPersistHeaders);(null==C?void 0:C.current)!==e&&(T(e),C.current=e)},S=[t.shouldPersistHeaders,T],n[21]=t.shouldPersistHeaders,n[22]=T,n[23]=k,n[24]=S):(k=n[23],S=n[24]),e.useEffect(k,S),n[25]!==i||n[26]!==a||n[27]!==l||n[28]!==u?(_={queryEditor:a,variableEditor:u,headerEditor:i,responseEditor:l},n[25]=i,n[26]=a,n[27]=l,n[28]=u,n[29]=_):_=n[29];const A=function({queryEditor:t,variableEditor:n,headerEditor:r,responseEditor:i}){return e.useCallback((e=>{const o=(null==t?void 0:t.getValue())??null,a=(null==n?void 0:n.getValue())??null,s=(null==r?void 0:r.getValue())??null,l=(null==t?void 0:t.operationName)??null;return dO(e,{query:o,variables:a,headers:s,response:(null==i?void 0:i.getValue())??null,operationName:l})}),[t,n,r,i])}(_),{onTabChange:D,defaultHeaders:I,defaultQuery:O,children:L}=t;let F;n[30]!==I||n[31]!==i||n[32]!==a||n[33]!==l||n[34]!==u?(F={queryEditor:a,variableEditor:u,headerEditor:i,responseEditor:l,defaultHeaders:I},n[30]=I,n[31]=i,n[32]=a,n[33]=l,n[34]=u,n[35]=F):F=n[35];const R=function({queryEditor:t,variableEditor:n,headerEditor:r,responseEditor:i,defaultHeaders:o}){return e.useCallback((({query:e,variables:a,headers:s,response:l})=>{null==t||t.setValue(e??""),null==n||n.setValue(a??""),null==r||r.setValue(s??o??""),null==i||i.setValue(l??"")}),[r,t,i,n,o])}(F);let M;n[36]!==I||n[37]!==O||n[38]!==D||n[39]!==R||n[40]!==g||n[41]!==A?(M=()=>{x((e=>{const t=A(e),n={tabs:[...t.tabs,uO({headers:I,query:O??kO})],activeTabIndex:t.tabs.length};return g(n),R(n.tabs[n.activeTabIndex]),null==D||D(n),n}))},n[36]=I,n[37]=O,n[38]=D,n[39]=R,n[40]=g,n[41]=A,n[42]=M):M=n[42];const P=M;let j;n[43]!==D||n[44]!==R||n[45]!==g?(j=e=>{x((t=>{const n={...t,activeTabIndex:e};return g(n),R(n.tabs[n.activeTabIndex]),null==D||D(n),n}))},n[43]=D,n[44]=R,n[45]=g,n[46]=j):j=n[46];const V=j;let B;n[47]!==D||n[48]!==R||n[49]!==g?(B=e=>{x((t=>{const n=t.tabs[t.activeTabIndex],r={tabs:e,activeTabIndex:e.indexOf(n)};return g(r),R(r.tabs[r.activeTabIndex]),null==D||D(r),r}))},n[47]=D,n[48]=R,n[49]=g,n[50]=B):B=n[50];const $=B;let U;n[51]!==D||n[52]!==R||n[53]!==g?(U=e=>{x((t=>{const n={tabs:t.tabs.filter(((t,n)=>e!==n)),activeTabIndex:Math.max(t.activeTabIndex-1,0)};return g(n),R(n.tabs[n.activeTabIndex]),null==D||D(n),n}))},n[51]=D,n[52]=R,n[53]=g,n[54]=U):U=n[54];const H=U;let q;n[55]!==D||n[56]!==g?(q=e=>{x((t=>{const n=dO(t,e);return g(n),null==D||D(n),n}))},n[55]=D,n[56]=g,n[57]=q):q=n[57];const z=q,{onEditOperationName:W}=t;let G;n[58]!==W||n[59]!==a||n[60]!==z?(G=e=>{a&&(!function(e,t){e.operationName=t}(a,e),z({operationName:e}),null==W||W(e))},n[58]=W,n[59]=a,n[60]=z,n[61]=G):G=n[61];const Y=G;let K,Q;if(n[62]!==t.externalFragments){if(Q=new Map,Array.isArray(t.externalFragments))for(const e of t.externalFragments)Q.set(e.name.value,e);else if("string"==typeof t.externalFragments)_t(it(t.externalFragments,{}),{FragmentDefinition(e){Q.set(e.name.value,e)}});else if(t.externalFragments)throw new Error("The `externalFragments` prop must either be a string that contains the fragment definitions in SDL or a list of FragmentDefinitionNode objects.");n[62]=t.externalFragments,n[63]=Q}else Q=n[63];K=Q;const X=K;let J;n[64]!==t.validationRules?(J=t.validationRules||[],n[64]=t.validationRules,n[65]=J):J=n[65];const Z=J;let ee;n[66]!==P||n[67]!==V||n[68]!==H||n[69]!==X||n[70]!==i||n[71]!==b.headers||n[72]!==b.query||n[73]!==b.response||n[74]!==b.variables||n[75]!==$||n[76]!==a||n[77]!==l||n[78]!==Y||n[79]!==T||n[80]!==p||n[81]!==E||n[82]!==z||n[83]!==Z||n[84]!==u?(ee={...E,addTab:P,changeTab:V,moveTab:$,closeTab:H,updateActiveTabValues:z,headerEditor:i,queryEditor:a,responseEditor:l,variableEditor:u,setHeaderEditor:o,setQueryEditor:s,setResponseEditor:c,setVariableEditor:d,setOperationName:Y,initialQuery:b.query,initialVariables:b.variables,initialHeaders:b.headers,initialResponse:b.response,externalFragments:X,validationRules:Z,shouldPersistHeaders:p,setShouldPersistHeaders:T},n[66]=P,n[67]=V,n[68]=H,n[69]=X,n[70]=i,n[71]=b.headers,n[72]=b.query,n[73]=b.response,n[74]=b.variables,n[75]=$,n[76]=a,n[77]=l,n[78]=Y,n[79]=T,n[80]=p,n[81]=E,n[82]=z,n[83]=Z,n[84]=u,n[85]=ee):ee=n[85];const te=ee;let ne;return n[86]!==L||n[87]!==te?(ne=v.jsx(xO.Provider,{value:te,children:L}),n[86]=L,n[87]=te,n[88]=ne):ne=n[88],ne}const TO=eA(xO),CO="shouldPersistHeaders",kO='# Welcome to GraphiQL\n#\n# GraphiQL is an in-browser tool for writing, validating, and\n# testing GraphQL queries.\n#\n# Type queries into this side of the screen, and you will see intelligent\n# typeaheads aware of the current GraphQL type schema and live syntax and\n# validation errors highlighted within the text.\n#\n# GraphQL queries typically start with a "{" character. Lines that start\n# with a # are ignored.\n#\n# An example GraphQL query might look like:\n#\n# {\n# field(arg: "value") {\n# subField\n# }\n# }\n#\n# Keyboard shortcuts:\n#\n# Prettify query: Shift-Ctrl-P (or press the prettify button)\n#\n# Merge fragments: Shift-Ctrl-M (or press the merge button)\n#\n# Run Query: Ctrl-Enter (or press the play button)\n#\n# Auto Complete: Ctrl-Space (or just start typing)\n#\n\n';function SO(t){const n=N.c(13);let r,i,o;n[0]!==t?(({isHidden:i,...r}=t),n[0]=t,n[1]=r,n[2]=i):(r=n[1],i=n[2]),n[3]===Symbol.for("react.memo_cache_sentinel")?(o={nonNull:!0,caller:SO},n[3]=o):o=n[3];const{headerEditor:a}=TO(o),s=qI(r,SO);let l,c;n[4]!==a||n[5]!==i?(l=()=>{i||null==a||a.refresh()},c=[a,i],n[4]=a,n[5]=i,n[6]=l,n[7]=c):(l=n[6],c=n[7]),e.useEffect(l,c);const u=i&&"hidden";let d,f;return n[8]!==u?(d=K("graphiql-editor",u),n[8]=u,n[9]=d):d=n[9],n[10]!==s||n[11]!==d?(f=v.jsx("div",{className:d,ref:s}),n[10]=s,n[11]=d,n[12]=f):f=n[12],f}function _O(t){var n;const r=N.c(14);let i;r[0]===Symbol.for("react.memo_cache_sentinel")?(i={width:null,height:null},r[0]=i):i=r[0];const[o,a]=e.useState(i),[s,l]=e.useState(null),c=e.useRef(null),u=null==(n=NO(t.token))?void 0:n.href;let d,f,p;r[1]!==u?(d=()=>{if(c.current)return u?void fetch(u,{method:"HEAD"}).then((e=>{l(e.headers.get("Content-Type"))})).catch((()=>{l(null)})):(a({width:null,height:null}),void l(null))},f=[u],r[1]=u,r[2]=d,r[3]=f):(d=r[2],f=r[3]),e.useEffect(d,f),r[4]!==o.height||r[5]!==o.width||r[6]!==s?(p=null!==o.width&&null!==o.height?v.jsxs("div",{children:[o.width,"x",o.height,null===s?null:" "+s]}):null,r[4]=o.height,r[5]=o.width,r[6]=s,r[7]=p):p=r[7];const h=p;let m,g,y;return r[8]===Symbol.for("react.memo_cache_sentinel")?(m=()=>{var e,t;a({width:(null==(e=c.current)?void 0:e.naturalWidth)??null,height:(null==(t=c.current)?void 0:t.naturalHeight)??null})},r[8]=m):m=r[8],r[9]!==u?(g=v.jsx("img",{onLoad:m,ref:c,src:u}),r[9]=u,r[10]=g):g=r[10],r[11]!==h||r[12]!==g?(y=v.jsxs("div",{children:[g,h]}),r[11]=h,r[12]=g,r[13]=y):y=r[13],y}function NO(e){if("string"!==e.type)return;const t=e.string.slice(1).slice(0,-1).trim();try{const{location:e}=window;return new URL(t,e.protocol+"//"+e.host)}catch{return}}function AO(e){const t=N.c(2),n=XI(e,AO);let r;return t[0]!==n?(r=v.jsx("div",{className:"graphiql-editor",ref:n}),t[0]=n,t[1]=r):r=t[1],r}_O.shouldRender=function(e){const t=NO(e);return!!t&&function(e){return/\.(bmp|gif|jpe?g|png|svg|webp)$/.test(e.pathname)}(t)};const DO=IO;function IO(n,r){const i=N.c(19);let o;i[0]!==n?(o=void 0===n?{}:n,i[0]=n,i[1]=o):o=i[1];const{responseTooltip:a,editorTheme:s,keyMap:l}=o,c=void 0===s?xD:s,u=void 0===l?wD:l,d=r||DO;let f;i[2]!==d?(f={nonNull:!0,caller:d},i[2]=d,i[3]=f):f=i[3];const{fetchError:p,validationErrors:h}=AD(f),m=r||DO;let g;i[4]!==m?(g={nonNull:!0,caller:m},i[4]=m,i[5]=g):g=i[5];const{initialResponse:y,responseEditor:b,setResponseEditor:E}=TO(g),x=e.useRef(null),w=e.useRef(a);let T,C,k,S,_,A;return i[6]!==a?(T=()=>{w.current=a},C=[a],i[6]=a,i[7]=T,i[8]=C):(T=i[7],C=i[8]),e.useEffect(T,C),i[9]!==c||i[10]!==y||i[11]!==E?(k=()=>{let e;return e=!0,CD([Promise.resolve().then((()=>BL)),Promise.resolve().then((()=>RL)),Promise.resolve().then((()=>XL)),Promise.resolve().then((()=>aF)),Promise.resolve().then((()=>qL)),Promise.resolve().then((()=>KL)),Promise.resolve().then((()=>ZL)),Promise.resolve().then((()=>vR)),Promise.resolve().then((()=>xF))],{useCommonAddons:!1}).then((n=>{if(!e)return;const r=document.createElement("div");n.registerHelper("info","graphql-results",((e,n,i,o)=>{const a=[],s=w.current;return s&&a.push(v.jsx(s,{pos:o,token:e})),_O.shouldRender(e)&&a.push(v.jsx(_O,{token:e},"image-preview")),a.length?(t.render(a,r),r):(t.unmountComponentAtNode(r),null)}));const i=x.current;if(!i)return;const o=n(i,{value:y,lineWrapping:!0,readOnly:!0,theme:c,mode:"graphql-results",foldGutter:!0,gutters:["CodeMirror-foldgutter"],info:!0,extraKeys:TD});E(o)})),()=>{e=!1}},S=[c,y,E],i[9]=c,i[10]=y,i[11]=E,i[12]=k,i[13]=S):(k=i[12],S=i[13]),e.useEffect(k,S),DI(b,"keyMap",u),i[14]!==p||i[15]!==b||i[16]!==h?(_=()=>{p&&(null==b||b.setValue(p)),h.length>0&&(null==b||b.setValue(ls(h)))},A=[b,p,h],i[14]=p,i[15]=b,i[16]=h,i[17]=_,i[18]=A):(_=i[17],A=i[18]),e.useEffect(_,A),x}function OO(e){const t=N.c(2),n=IO(e,OO);let r;return t[0]!==n?(r=v.jsx("section",{className:"result-window","aria-label":"Result Window","aria-live":"polite","aria-atomic":"true",ref:n}),t[0]=n,t[1]=r):r=t[1],r}function LO(t){const n=N.c(13);let r,i,o;n[0]!==t?(({isHidden:i,...r}=t),n[0]=t,n[1]=r,n[2]=i):(r=n[1],i=n[2]),n[3]===Symbol.for("react.memo_cache_sentinel")?(o={nonNull:!0,caller:LO},n[3]=o):o=n[3];const{variableEditor:a}=TO(o),s=yO(r,LO);let l,c;n[4]!==i||n[5]!==a?(l=()=>{a&&!i&&a.refresh()},c=[a,i],n[4]=i,n[5]=a,n[6]=l,n[7]=c):(l=n[6],c=n[7]),e.useEffect(l,c);const u=i&&"hidden";let d,f;return n[8]!==u?(d=K("graphiql-editor",u),n[8]=u,n[9]=d):d=n[9],n[10]!==s||n[11]!==d?(f=v.jsx("div",{className:d,ref:s}),n[10]=s,n[11]=d,n[12]=f):f=n[12],f}function FO(e){const t=N.c(39),{children:n,dangerouslyAssumeSchemaIsValid:r,defaultQuery:i,defaultHeaders:o,defaultTabs:a,externalFragments:s,fetcher:l,getDefaultFieldNames:c,headers:u,inputValueDeprecation:d,introspectionQueryName:f,maxHistoryLength:p,onEditOperationName:h,onSchemaChange:m,onTabChange:g,onTogglePluginVisibility:y,operationName:b,plugins:E,query:x,response:w,schema:T,schemaDescription:C,shouldPersistHeaders:k,storage:S,validationRules:_,variables:A,visiblePlugin:D}=e;let I,O,L,F,R,M;return t[0]!==n||t[1]!==y||t[2]!==E||t[3]!==D?(I=v.jsx(OD,{children:v.jsx(SI,{onTogglePluginVisibility:y,plugins:E,visiblePlugin:D,children:n})}),t[0]=n,t[1]=y,t[2]=E,t[3]=D,t[4]=I):I=t[4],t[5]!==l||t[6]!==c||t[7]!==b||t[8]!==I?(O=v.jsx(hD,{getDefaultFieldNames:c,fetcher:l,operationName:b,children:I}),t[5]=l,t[6]=c,t[7]=b,t[8]=I,t[9]=O):O=t[9],t[10]!==r||t[11]!==l||t[12]!==d||t[13]!==f||t[14]!==m||t[15]!==T||t[16]!==C||t[17]!==O?(L=v.jsx(ND,{dangerouslyAssumeSchemaIsValid:r,fetcher:l,inputValueDeprecation:d,introspectionQueryName:f,onSchemaChange:m,schema:T,schemaDescription:C,children:O}),t[10]=r,t[11]=l,t[12]=d,t[13]=f,t[14]=m,t[15]=T,t[16]=C,t[17]=O,t[18]=L):L=t[18],t[19]!==o||t[20]!==i||t[21]!==a||t[22]!==s||t[23]!==u||t[24]!==h||t[25]!==g||t[26]!==x||t[27]!==w||t[28]!==k||t[29]!==L||t[30]!==_||t[31]!==A?(F=v.jsx(wO,{defaultQuery:i,defaultHeaders:o,defaultTabs:a,externalFragments:s,headers:u,onEditOperationName:h,onTabChange:g,query:x,response:w,shouldPersistHeaders:k,validationRules:_,variables:A,children:L}),t[19]=o,t[20]=i,t[21]=a,t[22]=s,t[23]=u,t[24]=h,t[25]=g,t[26]=x,t[27]=w,t[28]=k,t[29]=L,t[30]=_,t[31]=A,t[32]=F):F=t[32],t[33]!==p||t[34]!==F?(R=v.jsx(nD,{maxHistoryLength:p,children:F}),t[33]=p,t[34]=F,t[35]=R):R=t[35],t[36]!==S||t[37]!==R?(M=v.jsx(nA,{storage:S,children:R}),t[36]=S,t[37]=R,t[38]=M):M=t[38],M}function RO(t){const n=N.c(11),r=void 0===t?null:t,i=rA();let o;n[0]!==r||n[1]!==i?(o=()=>{if(!i)return null;const e=i.get(MO);switch(e){case"light":return"light";case"dark":return"dark";default:return"string"==typeof e&&i.set(MO,""),r}},n[0]=r,n[1]=i,n[2]=o):o=n[2];const[a,s]=e.useState(o);let l,c,u;n[3]!==a?(l=()=>{"undefined"!=typeof window&&(document.body.classList.remove("graphiql-light","graphiql-dark"),a&&document.body.classList.add(`graphiql-${a}`))},c=[a],n[3]=a,n[4]=l,n[5]=c):(l=n[4],c=n[5]),e.useLayoutEffect(l,c),n[6]!==i?(u=e=>{null==i||i.set(MO,e||""),s(e)},n[6]=i,n[7]=u):u=n[7];const d=u;let f;return n[8]!==d||n[9]!==a?(f={theme:a,setTheme:d},n[8]=d,n[9]=a,n[10]=f):f=n[10],f}const MO="theme";function PO(t){const n=N.c(31),{defaultSizeRelation:r,direction:i,initiallyHidden:o,onHiddenElementChange:a,sizeThresholdFirst:s,sizeThresholdSecond:l,storageKey:c}=t,u=void 0===r?jO:r,d=void 0===s?100:s,f=void 0===l?100:l,p=rA();let h;n[0]!==p||n[1]!==c?(h=QD(500,(e=>{c&&(null==p||p.set(c,e))})),n[0]=p,n[1]=c,n[2]=h):h=n[2];const m=h;let v;n[3]!==o||n[4]!==p||n[5]!==c?(v=()=>{const e=c&&(null==p?void 0:p.get(c));return e===VO||"first"===o?"first":e===BO||"second"===o?"second":null},n[3]=o,n[4]=p,n[5]=c,n[6]=v):v=n[6];const[g,y]=e.useState(v);let b;n[7]!==g||n[8]!==a?(b=e=>{e!==g&&(y(e),null==a||a(e))},n[7]=g,n[8]=a,n[9]=b):b=n[9];const E=b,x=e.useRef(null),w=e.useRef(null),T=e.useRef(null),C=e.useRef(`${u}`);let k,S,_,A,D,I,O;return n[10]!==p||n[11]!==c?(k=()=>{const e=c&&(null==p?void 0:p.get(c))||C.current;x.current&&(x.current.style.display="flex",x.current.style.flex=e===VO||e===BO?C.current:e),T.current&&(T.current.style.display="flex",T.current.style.flex="1"),w.current&&(w.current.style.display="flex")},n[10]=p,n[11]=c,n[12]=k):k=n[12],n[13]!==i||n[14]!==p||n[15]!==c?(S=[i,p,c],n[13]=i,n[14]=p,n[15]=c,n[16]=S):S=n[16],e.useLayoutEffect(k,S),n[17]!==g||n[18]!==p||n[19]!==c?(A=()=>{const e=e=>{const t="first"===e?x.current:T.current;if(t&&(t.style.left="-1000px",t.style.position="absolute",t.style.opacity="0",t.style.height="500px",t.style.width="500px",x.current)){const e=parseFloat(x.current.style.flex);(!Number.isFinite(e)||e<1)&&(x.current.style.flex="1")}},t=e=>{const t="first"===e?x.current:T.current;if(t&&(t.style.width="",t.style.height="",t.style.opacity="",t.style.position="",t.style.left="",p&&c)){const e=p.get(c);x.current&&e!==VO&&e!==BO&&(x.current.style.flex=e||C.current)}};"first"===g?e("first"):t("first"),"second"===g?e("second"):t("second")},_=[g,p,c],n[17]=g,n[18]=p,n[19]=c,n[20]=_,n[21]=A):(_=n[20],A=n[21]),e.useLayoutEffect(A,_),n[22]!==i||n[23]!==E||n[24]!==d||n[25]!==f||n[26]!==m?(D=()=>{if(!w.current||!x.current||!T.current)return;const e=w.current,t=x.current,n=t.parentElement,r="horizontal"===i?"clientX":"clientY",o="horizontal"===i?"left":"top",a="horizontal"===i?"right":"bottom",s="horizontal"===i?"clientWidth":"clientHeight",l=function(i){i.preventDefault();const l=i[r]-e.getBoundingClientRect()[o],c=function(i){if(0===i.buttons)return u();const c=i[r]-n.getBoundingClientRect()[o]-l,p=n.getBoundingClientRect()[a]-i[r]+l-e[s];if(c<d)E("first"),m(VO);else if(p<f)E("second"),m(BO);else{E(null);const e=""+c/p;t.style.flex=e,m(e)}};function u(){document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",u)}document.addEventListener("mousemove",c),document.addEventListener("mouseup",u)};e.addEventListener("mousedown",l);const c=function(){x.current&&(x.current.style.flex=C.current),m(C.current),E(null)};return e.addEventListener("dblclick",c),()=>{e.removeEventListener("mousedown",l),e.removeEventListener("dblclick",c)}},I=[i,E,d,f,m],n[22]=i,n[23]=E,n[24]=d,n[25]=f,n[26]=m,n[27]=D,n[28]=I):(D=n[27],I=n[28]),e.useEffect(D,I),n[29]!==g?(O={dragBarRef:w,hiddenElement:g,firstRef:x,setHiddenElement:y,secondRef:T},n[29]=g,n[30]=O):O=n[30],O}const jO=1,VO="hide-first",BO="hide-second",$O=e.forwardRef(((t,n)=>{const r=N.c(19);let i,o,a;r[0]!==t?(({label:i,onClick:o,...a}=t),r[0]=t,r[1]=i,r[2]=o,r[3]=a):(i=r[1],o=r[2],a=r[3]);const[s,l]=e.useState(null);let c;r[4]!==o?(c=e=>{try{o&&o(e),l(null)}catch(t){l(t instanceof Error?t:new Error(`Toolbar button click failed: ${t}`))}},r[4]=o,r[5]=c):c=r[5];const u=c,d=s&&"error";let f;r[6]!==a.className||r[7]!==d?(f=K("graphiql-toolbar-button",d,a.className),r[6]=a.className,r[7]=d,r[8]=f):f=r[8];const p=s?s.message:i,h=s?"true":a["aria-invalid"];let m,g;return r[9]!==u||r[10]!==a||r[11]!==n||r[12]!==f||r[13]!==p||r[14]!==h?(m=v.jsx(MA,{...a,ref:n,type:"button",className:f,onClick:u,"aria-label":p,"aria-invalid":h}),r[9]=u,r[10]=a,r[11]=n,r[12]=f,r[13]=p,r[14]=h,r[15]=m):m=r[15],r[16]!==i||r[17]!==m?(g=v.jsx(KA,{label:i,children:m}),r[16]=i,r[17]=m,r[18]=g):g=r[18],g}));function UO(){const e=N.c(19);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={nonNull:!0,caller:UO},e[0]=t):t=e[0];const{queryEditor:n,setOperationName:r}=TO(t);let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i={nonNull:!0,caller:UO},e[1]=i):i=e[1];const{isFetching:o,isSubscribed:a,operationName:s,run:l,stop:c}=vD(i);let u;e[2]!==(null==n?void 0:n.operations)?(u=(null==n?void 0:n.operations)||[],e[2]=null==n?void 0:n.operations,e[3]=u):u=e[3];const d=u,f=d.length>1&&"string"!=typeof s,p=o||a,h=(p?"Stop":"Execute")+" query (Ctrl-Enter)";let m,g;e[4]!==p?(m=p?v.jsx(OA,{}):v.jsx(CA,{}),e[4]=p,e[5]=m):m=e[5],e[6]!==h||e[7]!==m?(g={type:"button",className:"graphiql-execute-button",children:m,"aria-label":h},e[6]=h,e[7]=m,e[8]=g):g=e[8];const y=g;let b;return e[9]!==y||e[10]!==f||e[11]!==p||e[12]!==h||e[13]!==d||e[14]!==n||e[15]!==l||e[16]!==r||e[17]!==c?(b=f&&!p?v.jsxs(qA,{children:[v.jsx(KA,{label:h,children:v.jsx(qA.Button,{...y})}),v.jsx(qA.Content,{children:d.map(((e,t)=>{const i=e.name?e.name.value:`<Unnamed ${e.operation}>`;return v.jsx(qA.Item,{onSelect:()=>{var t;const i=null==(t=e.name)?void 0:t.value;n&&i&&i!==n.operationName&&r(i),l()},children:i},`${i}-${t}`)}))})]}):v.jsx(KA,{label:h,children:v.jsx("button",{...y,onClick:()=>{p?c():l()}})}),e[9]=y,e[10]=f,e[11]=p,e[12]=h,e[13]=d,e[14]=n,e[15]=l,e[16]=r,e[17]=c,e[18]=b):b=e[18],b}$O.displayName="ToolbarButton";const HO=VA((e=>{const t=N.c(20);let n,r,i,o,a,s,l,c,u;return t[0]!==e?(({button:n,children:r,label:i,...o}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o):(n=t[1],r=t[2],i=t[3],o=t[4]),t[5]!==o.className?(a=K("graphiql-un-styled graphiql-toolbar-menu",o.className),t[5]=o.className,t[6]=a):a=t[6],t[7]!==n||t[8]!==i||t[9]!==a?(s=v.jsx(qA.Button,{className:a,"aria-label":i,children:n}),t[7]=n,t[8]=i,t[9]=a,t[10]=s):s=t[10],t[11]!==i||t[12]!==s?(l=v.jsx(KA,{label:i,children:s}),t[11]=i,t[12]=s,t[13]=l):l=t[13],t[14]!==r?(c=v.jsx(qA.Content,{children:r}),t[14]=r,t[15]=c):c=t[15],t[16]!==o||t[17]!==l||t[18]!==c?(u=v.jsxs(qA,{...o,children:[l,c]}),t[16]=o,t[17]=l,t[18]=c,t[19]=u):u=t[19],u}),{Item:qA.Item}),qO=Object.freeze(Object.defineProperty({__proto__:null,Argument:jD,ArgumentIcon:iA,Button:PA,ButtonGroup:jA,ChevronDownIcon:oA,ChevronLeftIcon:aA,ChevronUpIcon:sA,CloseIcon:lA,CopyIcon:cA,DOC_EXPLORER_PLUGIN:TI,DefaultValue:SD,DeprecatedArgumentIcon:uA,DeprecatedEnumValueIcon:dA,DeprecatedFieldIcon:fA,DeprecationReason:VD,Dialog:UA,DialogRoot:$A,Directive:BD,DirectiveIcon:pA,DocExplorer:wI,DocsFilledIcon:hA,DocsIcon:mA,DropdownMenu:qA,EditorContext:xO,EditorContextProvider:wO,EnumValueIcon:vA,ExecuteButton:UO,ExecutionContext:pD,ExecutionContextProvider:hD,ExplorerContext:ID,ExplorerContextProvider:OD,ExplorerSection:$D,FieldDocumentation:HD,FieldIcon:gA,FieldLink:sI,GraphiQLProvider:FO,HISTORY_PLUGIN:CI,HeaderEditor:SO,History:aD,HistoryContext:tD,HistoryContextProvider:nD,HistoryIcon:yA,ImagePreview:_O,ImplementsIcon:bA,KeyboardShortcutIcon:EA,MagnifyingGlassIcon:xA,MarkdownContent:WA,MergeIcon:wA,PenIcon:TA,PlayIcon:CA,PluginContext:kI,PluginContextProvider:SI,PlusIcon:kA,PrettifyIcon:SA,QueryEditor:AO,ReloadIcon:_A,ResponseEditor:OO,RootTypeIcon:NA,SchemaContext:_D,SchemaContextProvider:ND,SchemaDocumentation:KD,Search:XD,SettingsIcon:AA,Spinner:GA,StarFilledIcon:DA,StarIcon:IA,StopIcon:OA,StorageContext:tA,StorageContextProvider:nA,Tab:ZA,Tabs:eD,ToolbarButton:$O,ToolbarMenu:HO,Tooltip:KA,TooltipRoot:YA,TrashIcon:LA,TypeDocumentation:lI,TypeIcon:FA,TypeLink:PD,UnStyledButton:MA,VariableEditor:LO,isMacOs:ED,useAutoCompleteLeafs:$I,useCopyQuery:jI,useDragResize:PO,useEditorContext:TO,useEditorState:UI,useExecutionContext:vD,useExplorerContext:RD,useHeaderEditor:qI,useHeadersEditorState:()=>UI("header"),useHistoryContext:iD,useMergeQuery:VI,useOperationsEditorState:()=>UI("query"),useOptimisticState:function(t){const n=N.c(12),[r,i]=t;let o;n[0]!==r?(o={pending:null,last:r},n[0]=r,n[1]=o):o=n[1];const a=e.useRef(o),[s,l]=e.useState(r);let c,u,d;n[2]!==s||n[3]!==i||n[4]!==r?(c=()=>{a.current.last===r||(a.current.last=r,null===a.current.pending?l(r):a.current.pending===r?(a.current.pending=null,r!==s&&(a.current.pending=s,i(s))):(a.current.pending=null,l(r)))},u=[r,s,i],n[2]=s,n[3]=i,n[4]=r,n[5]=c,n[6]=u):(c=n[5],u=n[6]),e.useEffect(c,u),n[7]!==i?(d=e=>{l(e),null===a.current.pending&&a.current.last!==e&&(a.current.pending=e,i(e))},n[7]=i,n[8]=d):d=n[8];const f=d;let p;return n[9]!==f||n[10]!==s?(p=[s,f],n[9]=f,n[10]=s,n[11]=p):p=n[11],p},usePluginContext:_I,usePrettifyEditors:BI,useQueryEditor:XI,useResponseEditor:IO,useSchemaContext:AD,useStorageContext:rA,useTheme:RO,useVariableEditor:yO,useVariablesEditorState:()=>UI("variable")},Symbol.toStringTag,{value:"Module"}));if(parseInt(e.version.slice(0,2),10)<16)throw new Error(["GraphiQL 0.18.0 and after is not compatible with React 15 or below.","If you are using a CDN source (jsdelivr, unpkg, etc), follow this example:","https://github.com/graphql/graphiql/blob/master/examples/graphiql-cdn/index.html#L49"].join("\n"));function zO(e){const t=N.c(62);let n,r,i,o,a,s,l,c,u,d,f,p,h,m,g,y,b,E,x,w,T,C,k,S,_,A,D,I;if(t[0]!==e?(({dangerouslyAssumeSchemaIsValid:r,confirmCloseTab:n,defaultQuery:o,defaultTabs:a,externalFragments:s,fetcher:l,getDefaultFieldNames:c,headers:u,inputValueDeprecation:d,introspectionQueryName:f,maxHistoryLength:p,onEditOperationName:h,onSchemaChange:m,onTabChange:g,onTogglePluginVisibility:y,operationName:b,plugins:E,query:w,response:T,schema:C,schemaDescription:k,shouldPersistHeaders:S,storage:_,validationRules:A,variables:D,visiblePlugin:I,defaultHeaders:i,...x}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=l,t[8]=c,t[9]=u,t[10]=d,t[11]=f,t[12]=p,t[13]=h,t[14]=m,t[15]=g,t[16]=y,t[17]=b,t[18]=E,t[19]=x,t[20]=w,t[21]=T,t[22]=C,t[23]=k,t[24]=S,t[25]=_,t[26]=A,t[27]=D,t[28]=I):(n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],l=t[7],c=t[8],u=t[9],d=t[10],f=t[11],p=t[12],h=t[13],m=t[14],g=t[15],y=t[16],b=t[17],E=t[18],x=t[19],w=t[20],T=t[21],C=t[22],k=t[23],S=t[24],_=t[25],A=t[26],D=t[27],I=t[28]),"function"!=typeof l)throw new TypeError("The `GraphiQL` component requires a `fetcher` function to be passed as prop.");const O=!1!==S,L=x.disableTabs??!1;let F,R;return t[29]!==n||t[30]!==x||t[31]!==O||t[32]!==L?(F=v.jsx(YO,{confirmCloseTab:n,showPersistHeadersSettings:O,disableTabs:L,forcedTheme:x.forcedTheme,...x}),t[29]=n,t[30]=x,t[31]=O,t[32]=L,t[33]=F):F=t[33],t[34]!==r||t[35]!==i||t[36]!==o||t[37]!==a||t[38]!==s||t[39]!==l||t[40]!==c||t[41]!==u||t[42]!==d||t[43]!==f||t[44]!==p||t[45]!==h||t[46]!==m||t[47]!==g||t[48]!==y||t[49]!==b||t[50]!==E||t[51]!==w||t[52]!==T||t[53]!==C||t[54]!==k||t[55]!==S||t[56]!==_||t[57]!==F||t[58]!==A||t[59]!==D||t[60]!==I?(R=v.jsx(FO,{getDefaultFieldNames:c,dangerouslyAssumeSchemaIsValid:r,defaultQuery:o,defaultHeaders:i,defaultTabs:a,externalFragments:s,fetcher:l,headers:u,inputValueDeprecation:d,introspectionQueryName:f,maxHistoryLength:p,onEditOperationName:h,onSchemaChange:m,onTabChange:g,onTogglePluginVisibility:y,plugins:E,visiblePlugin:I,operationName:b,query:w,response:T,schema:C,schemaDescription:k,shouldPersistHeaders:S,storage:_,validationRules:A,variables:D,children:F}),t[34]=r,t[35]=i,t[36]=o,t[37]=a,t[38]=s,t[39]=l,t[40]=c,t[41]=u,t[42]=d,t[43]=f,t[44]=p,t[45]=h,t[46]=m,t[47]=g,t[48]=y,t[49]=b,t[50]=E,t[51]=w,t[52]=T,t[53]=C,t[54]=k,t[55]=S,t[56]=_,t[57]=F,t[58]=A,t[59]=D,t[60]=I,t[61]=R):R=t[61],R}zO.Logo=rL,zO.Toolbar=iL,zO.Footer=oL;const WO=["light","dark","system"],GO="graphiql-session-tab-";function YO(t){var n,r,i;const o=N.c(226),a=t.isHeadersEditorEnabled??!0;let s;o[0]===Symbol.for("react.memo_cache_sentinel")?(s={nonNull:!0},o[0]=s):s=o[0];const l=TO(s);let c;o[1]===Symbol.for("react.memo_cache_sentinel")?(c={nonNull:!0},o[1]=c):c=o[1];const u=vD(c);let d;o[2]===Symbol.for("react.memo_cache_sentinel")?(d={nonNull:!0},o[2]=d):d=o[2];const f=AD(d),p=rA(),h=_I(),m=t.forcedTheme&&WO.includes(t.forcedTheme)?t.forcedTheme:void 0;let g;o[3]!==t.onCopyQuery?(g={onCopyQuery:t.onCopyQuery},o[3]=t.onCopyQuery,o[4]=g):g=o[4];const y=jI(g),b=VI(),E=BI(),{theme:x,setTheme:w}=RO(t.defaultTheme);let T,C;o[5]!==m||o[6]!==w?(T=()=>{"system"===m?w(null):"light"!==m&&"dark"!==m||w(m)},C=[m,w],o[5]=m,o[6]=w,o[7]=T,o[8]=C):(T=o[7],C=o[8]),e.useEffect(T,C);const k=null==(n=null==h?void 0:h.visiblePlugin)?void 0:n.content,S=(null==h?void 0:h.visiblePlugin)?void 0:"first";let _;o[9]!==h||o[10]!==S?(_={defaultSizeRelation:.3333333333333333,direction:"horizontal",initiallyHidden:S,onHiddenElementChange(e){"first"===e&&(null==h||h.setVisiblePlugin(null))},sizeThresholdSecond:200,storageKey:"docExplorerFlex"},o[9]=h,o[10]=S,o[11]=_):_=o[11];const A=PO(_);let D;o[12]===Symbol.for("react.memo_cache_sentinel")?(D={direction:"horizontal",storageKey:"editorFlex"},o[12]=D):D=o[12];const I=PO(D);let O,L;O="variables"!==t.defaultEditorToolsVisibility&&"headers"!==t.defaultEditorToolsVisibility?"boolean"!=typeof t.defaultEditorToolsVisibility?l.initialVariables||l.initialHeaders?void 0:"second":t.defaultEditorToolsVisibility?void 0:"second":void 0,o[13]!==O?(L={defaultSizeRelation:3,direction:"vertical",initiallyHidden:O,sizeThresholdSecond:60,storageKey:"secondaryEditorFlex"},o[13]=O,o[14]=L):L=o[14];const F=PO(L);let R;o[15]!==l.initialHeaders||o[16]!==l.initialVariables||o[17]!==a||o[18]!==t.defaultEditorToolsVisibility?(R=()=>"variables"===t.defaultEditorToolsVisibility||"headers"===t.defaultEditorToolsVisibility?t.defaultEditorToolsVisibility:!l.initialVariables&&l.initialHeaders&&a?"headers":"variables",o[15]=l.initialHeaders,o[16]=l.initialVariables,o[17]=a,o[18]=t.defaultEditorToolsVisibility,o[19]=R):R=o[19];const[M,P]=e.useState(R),[j,V]=e.useState(null),[B,$]=e.useState(null);let U,H,q;if(o[20]!==y||o[21]!==b||o[22]!==E||o[23]!==t.children||o[24]!==t.toolbar){const n=e.Children.toArray(t.children);U=n.find(XO)||v.jsx(zO.Logo,{}),q=n.find(QO)||v.jsxs(v.Fragment,{children:[v.jsx($O,{onClick:E,label:"Prettify query (Shift-Ctrl-P)",children:v.jsx(SA,{className:"graphiql-toolbar-icon","aria-hidden":"true"})}),v.jsx($O,{onClick:b,label:"Merge fragments into query (Shift-Ctrl-M)",children:v.jsx(wA,{className:"graphiql-toolbar-icon","aria-hidden":"true"})}),v.jsx($O,{onClick:y,label:"Copy query (Shift-Ctrl-C)",children:v.jsx(cA,{className:"graphiql-toolbar-icon","aria-hidden":"true"})}),null==(r=t.toolbar)?void 0:r.additionalContent,(null==(i=t.toolbar)?void 0:i.additionalComponent)&&v.jsx(t.toolbar.additionalComponent,{})]}),H=n.find(KO),o[20]=y,o[21]=b,o[22]=E,o[23]=t.children,o[24]=t.toolbar,o[25]=U,o[26]=H,o[27]=q}else U=o[25],H=o[26],q=o[27];const z=H;let W;o[28]!==A?(W=()=>{"first"===A.hiddenElement&&A.setHiddenElement(null)},o[28]=A,o[29]=W):W=o[29];const G=W;let Y;o[30]!==p?(Y=()=>{try{p&&p.clear(),$("success")}catch{$("error")}},o[30]=p,o[31]=Y):Y=o[31];const K=Y;let Q;o[32]!==l?(Q=e=>{l.setShouldPersistHeaders("true"===e.currentTarget.dataset.value)},o[32]=l,o[33]=Q):Q=o[33];const X=Q;let J;o[34]!==w?(J=e=>{const t=e.currentTarget.dataset.theme;w(t||null)},o[34]=w,o[35]=J):J=o[35];const Z=J,ee=l.addTab,te=f.introspect,ne=l.moveTab;let re;o[36]===Symbol.for("react.memo_cache_sentinel")?(re=e=>{V(e.currentTarget.dataset.value)},o[36]=re):re=o[36];const ie=re;let oe;o[37]!==h||o[38]!==A?(oe=e=>{const t=h,n=Number(e.currentTarget.dataset.index),r=t.plugins.find(((e,t)=>n===t));r===t.visiblePlugin?(t.setVisiblePlugin(null),A.setHiddenElement("first")):(t.setVisiblePlugin(r),A.setHiddenElement(null))},o[37]=h,o[38]=A,o[39]=oe):oe=o[39];const ae=oe;let se;o[40]!==F?(se=e=>{"second"===F.hiddenElement&&F.setHiddenElement(null),P(e.currentTarget.dataset.name)},o[40]=F,o[41]=se):se=o[41];const le=se;let ce;o[42]!==F?(ce=()=>{F.setHiddenElement("second"===F.hiddenElement?null:"second")},o[42]=F,o[43]=ce):ce=o[43];const ue=ce;let de;o[44]===Symbol.for("react.memo_cache_sentinel")?(de=e=>{e||V(null)},o[44]=de):de=o[44];const fe=de;let pe;o[45]===Symbol.for("react.memo_cache_sentinel")?(pe=e=>{e||(V(null),$(null))},o[45]=pe):pe=o[45];const he=pe;let me,ve;o[46]===Symbol.for("react.memo_cache_sentinel")?(me=v.jsx(kA,{"aria-hidden":"true"}),o[46]=me):me=o[46],o[47]!==ee?(ve=v.jsx(KA,{label:"Add tab",children:v.jsx(MA,{type:"button",className:"graphiql-tab-add",onClick:ee,"aria-label":"Add tab",children:me})}),o[47]=ee,o[48]=ve):ve=o[48];const ge=ve,ye=t.className?` ${t.className}`:"",be=t.confirmCloseTab;let Ee;o[49]!==be||o[50]!==l||o[51]!==u?(Ee=async e=>{const t=e.currentTarget.previousSibling,n=Number(t.id.replace(GO,""));(!be||await be(n))&&(l.activeTabIndex===n&&u.stop(),l.closeTab(n))},o[49]=be,o[50]=l,o[51]=u,o[52]=Ee):Ee=o[52];const xe=Ee;let we;o[53]!==l||o[54]!==u?(we=e=>{const t=Number(e.currentTarget.id.replace(GO,""));u.stop(),l.changeTab(t)},o[53]=l,o[54]=u,o[55]=we):we=o[55];const Te=we,Ce=`graphiql-container${ye}`;let ke,Se;o[56]!==ae||o[57]!==h?(ke=null==h?void 0:h.plugins.map(((e,t)=>{const n=e===h.visiblePlugin,r=`${n?"Hide":"Show"} ${e.title}`;return v.jsx(KA,{label:r,children:v.jsx(MA,{type:"button",className:n?"active":"",onClick:ae,"data-index":t,"aria-label":r,children:v.jsx(e.icon,{"aria-hidden":"true"})})},e.title)})),o[56]=ae,o[57]=h,o[58]=ke):ke=o[58],o[59]!==ke?(Se=v.jsx("div",{className:"graphiql-sidebar-section",children:ke}),o[59]=ke,o[60]=Se):Se=o[60];const _e=f.isFetching?"graphiql-spin":"";let Ne,Ae,De,Ie,Oe,Le,Fe,Re,Me,Pe,je,Ve;o[61]!==_e?(Ne=v.jsx(_A,{className:_e,"aria-hidden":"true"}),o[61]=_e,o[62]=Ne):Ne=o[62],o[63]!==te||o[64]!==f.isFetching||o[65]!==Ne?(Ae=v.jsx(KA,{label:"Re-fetch GraphQL schema",children:v.jsx(MA,{type:"button",disabled:f.isFetching,onClick:te,"aria-label":"Re-fetch GraphQL schema",children:Ne})}),o[63]=te,o[64]=f.isFetching,o[65]=Ne,o[66]=Ae):Ae=o[66],o[67]===Symbol.for("react.memo_cache_sentinel")?(De=v.jsx(KA,{label:"Open short keys dialog",children:v.jsx(MA,{type:"button","data-value":"short-keys",onClick:ie,"aria-label":"Open short keys dialog",children:v.jsx(EA,{"aria-hidden":"true"})})}),o[67]=De):De=o[67],o[68]===Symbol.for("react.memo_cache_sentinel")?(Ie=v.jsx(KA,{label:"Open settings dialog",children:v.jsx(MA,{type:"button","data-value":"settings",onClick:ie,"aria-label":"Open settings dialog",children:v.jsx(AA,{"aria-hidden":"true"})})}),o[68]=Ie):Ie=o[68],o[69]!==Ae?(Oe=v.jsxs("div",{className:"graphiql-sidebar-section",children:[Ae,De,Ie]}),o[69]=Ae,o[70]=Oe):Oe=o[70],o[71]!==Se||o[72]!==Oe?(Le=v.jsxs("div",{className:"graphiql-sidebar",children:[Se,Oe]}),o[71]=Se,o[72]=Oe,o[73]=Le):Le=o[73],o[74]===Symbol.for("react.memo_cache_sentinel")?(Fe={minWidth:"200px"},o[74]=Fe):Fe=o[74],o[75]!==k?(Re=k?v.jsx(k,{}):null,o[75]=k,o[76]=Re):Re=o[76],o[77]!==Re?(Me=v.jsx("div",{className:"graphiql-plugin",children:Re}),o[77]=Re,o[78]=Me):Me=o[78],o[79]!==A.firstRef||o[80]!==Me?(Pe=v.jsx("div",{ref:A.firstRef,style:Fe,children:Me}),o[79]=A.firstRef,o[80]=Me,o[81]=Pe):Pe=o[81],o[82]!==(null==h?void 0:h.visiblePlugin)||o[83]!==A.dragBarRef?(je=(null==h?void 0:h.visiblePlugin)&&v.jsx("div",{className:"graphiql-horizontal-drag-bar",ref:A.dragBarRef}),o[82]=null==h?void 0:h.visiblePlugin,o[83]=A.dragBarRef,o[84]=je):je=o[84],o[85]!==ge||o[86]!==l.activeTabIndex||o[87]!==l.tabs||o[88]!==ne||o[89]!==Te||o[90]!==xe||o[91]!==t.disableTabs?(Ve=!t.disableTabs&&v.jsx(eD,{values:l.tabs,onReorder:ne,"aria-label":"Select active operation",children:l.tabs.length>1&&v.jsxs(v.Fragment,{children:[l.tabs.map(((e,t)=>v.jsxs(ZA,{value:e,isActive:t===l.activeTabIndex,children:[v.jsx(ZA.Button,{"aria-controls":"graphiql-session",id:`${GO}${t}`,onClick:Te,children:e.title}),v.jsx(ZA.Close,{onClick:xe})]},e.id))),ge]})}),o[85]=ge,o[86]=l.activeTabIndex,o[87]=l.tabs,o[88]=ne,o[89]=Te,o[90]=xe,o[91]=t.disableTabs,o[92]=Ve):Ve=o[92];const Be=1===l.tabs.length&≥let $e,Ue;o[93]!==U||o[94]!==Be?($e=v.jsxs("div",{className:"graphiql-session-header-right",children:[Be,U]}),o[93]=U,o[94]=Be,o[95]=$e):$e=o[95],o[96]!==Ve||o[97]!==$e?(Ue=v.jsxs("div",{className:"graphiql-session-header",children:[Ve,$e]}),o[96]=Ve,o[97]=$e,o[98]=Ue):Ue=o[98];const He=`${GO}${l.activeTabIndex}`,qe="graphiql-editors"+(1===l.tabs.length?" full-height":"");let ze,We,Ge,Ye,Ke;o[99]!==G||o[100]!==t.editorTheme||o[101]!==t.keyMap||o[102]!==t.onCopyQuery||o[103]!==t.onEditQuery||o[104]!==t.readOnly?(ze=v.jsx(AO,{editorTheme:t.editorTheme,keyMap:t.keyMap,onClickReference:G,onCopyQuery:t.onCopyQuery,onEdit:t.onEditQuery,readOnly:t.readOnly}),o[99]=G,o[100]=t.editorTheme,o[101]=t.keyMap,o[102]=t.onCopyQuery,o[103]=t.onEditQuery,o[104]=t.readOnly,o[105]=ze):ze=o[105],o[106]===Symbol.for("react.memo_cache_sentinel")?(We=v.jsx(UO,{}),o[106]=We):We=o[106],o[107]!==q?(Ge=v.jsxs("div",{className:"graphiql-toolbar",role:"toolbar","aria-label":"Editor Commands",children:[We,q]}),o[107]=q,o[108]=Ge):Ge=o[108],o[109]!==ze||o[110]!==Ge?(Ye=v.jsxs("section",{className:"graphiql-query-editor","aria-label":"Query Editor",children:[ze,Ge]}),o[109]=ze,o[110]=Ge,o[111]=Ye):Ye=o[111],o[112]!==F.firstRef||o[113]!==Ye?(Ke=v.jsx("div",{ref:F.firstRef,children:Ye}),o[112]=F.firstRef,o[113]=Ye,o[114]=Ke):Ke=o[114];const Qe="variables"===M&&"second"!==F.hiddenElement?"active":"";let Xe,Je;o[115]!==le||o[116]!==Qe?(Xe=v.jsx(MA,{type:"button",className:Qe,onClick:le,"data-name":"variables",children:"Variables"}),o[115]=le,o[116]=Qe,o[117]=Xe):Xe=o[117],o[118]!==M||o[119]!==F.hiddenElement||o[120]!==le||o[121]!==a?(Je=a&&v.jsx(MA,{type:"button",className:"headers"===M&&"second"!==F.hiddenElement?"active":"",onClick:le,"data-name":"headers",children:"Headers"}),o[118]=M,o[119]=F.hiddenElement,o[120]=le,o[121]=a,o[122]=Je):Je=o[122];const Ze="second"===F.hiddenElement?"Show editor tools":"Hide editor tools",et="second"===F.hiddenElement?"Show editor tools":"Hide editor tools";let tt,nt,rt,it,ot;o[123]!==F.hiddenElement?(tt="second"===F.hiddenElement?v.jsx(sA,{className:"graphiql-chevron-icon","aria-hidden":"true"}):v.jsx(oA,{className:"graphiql-chevron-icon","aria-hidden":"true"}),o[123]=F.hiddenElement,o[124]=tt):tt=o[124],o[125]!==et||o[126]!==tt||o[127]!==ue?(nt=v.jsx(MA,{type:"button",onClick:ue,"aria-label":et,className:"graphiql-toggle-editor-tools",children:tt}),o[125]=et,o[126]=tt,o[127]=ue,o[128]=nt):nt=o[128],o[129]!==Ze||o[130]!==nt?(rt=v.jsx(KA,{label:Ze,children:nt}),o[129]=Ze,o[130]=nt,o[131]=rt):rt=o[131],o[132]!==Xe||o[133]!==Je||o[134]!==rt?(it=v.jsxs("div",{className:"graphiql-editor-tools",children:[Xe,Je,rt]}),o[132]=Xe,o[133]=Je,o[134]=rt,o[135]=it):it=o[135],o[136]!==F.dragBarRef||o[137]!==it?(ot=v.jsx("div",{ref:F.dragBarRef,children:it}),o[136]=F.dragBarRef,o[137]=it,o[138]=ot):ot=o[138];const at="variables"===M?"Variables":"Headers",st="variables"!==M;let lt,ct,ut,dt,ft,pt,ht,mt,vt,gt,yt,bt,Et,xt;o[139]!==G||o[140]!==t.editorTheme||o[141]!==t.keyMap||o[142]!==t.onEditVariables||o[143]!==t.readOnly||o[144]!==st?(lt=v.jsx(LO,{editorTheme:t.editorTheme,isHidden:st,keyMap:t.keyMap,onEdit:t.onEditVariables,onClickReference:G,readOnly:t.readOnly}),o[139]=G,o[140]=t.editorTheme,o[141]=t.keyMap,o[142]=t.onEditVariables,o[143]=t.readOnly,o[144]=st,o[145]=lt):lt=o[145],o[146]!==M||o[147]!==a||o[148]!==t.editorTheme||o[149]!==t.keyMap||o[150]!==t.onEditHeaders||o[151]!==t.readOnly?(ct=a&&v.jsx(SO,{editorTheme:t.editorTheme,isHidden:"headers"!==M,keyMap:t.keyMap,onEdit:t.onEditHeaders,readOnly:t.readOnly}),o[146]=M,o[147]=a,o[148]=t.editorTheme,o[149]=t.keyMap,o[150]=t.onEditHeaders,o[151]=t.readOnly,o[152]=ct):ct=o[152],o[153]!==at||o[154]!==lt||o[155]!==ct?(ut=v.jsxs("section",{className:"graphiql-editor-tool","aria-label":at,children:[lt,ct]}),o[153]=at,o[154]=lt,o[155]=ct,o[156]=ut):ut=o[156],o[157]!==F.secondRef||o[158]!==ut?(dt=v.jsx("div",{ref:F.secondRef,children:ut}),o[157]=F.secondRef,o[158]=ut,o[159]=dt):dt=o[159],o[160]!==qe||o[161]!==Ke||o[162]!==ot||o[163]!==dt?(ft=v.jsxs("div",{className:qe,children:[Ke,ot,dt]}),o[160]=qe,o[161]=Ke,o[162]=ot,o[163]=dt,o[164]=ft):ft=o[164],o[165]!==I.firstRef||o[166]!==ft?(pt=v.jsx("div",{ref:I.firstRef,children:ft}),o[165]=I.firstRef,o[166]=ft,o[167]=pt):pt=o[167],o[168]!==I.dragBarRef?(ht=v.jsx("div",{className:"graphiql-horizontal-drag-bar",ref:I.dragBarRef}),o[168]=I.dragBarRef,o[169]=ht):ht=o[169],o[170]!==u.isFetching?(mt=u.isFetching?v.jsx(GA,{}):null,o[170]=u.isFetching,o[171]=mt):mt=o[171],o[172]!==t.editorTheme||o[173]!==t.keyMap||o[174]!==t.responseTooltip?(vt=v.jsx(OO,{editorTheme:t.editorTheme,responseTooltip:t.responseTooltip,keyMap:t.keyMap}),o[172]=t.editorTheme,o[173]=t.keyMap,o[174]=t.responseTooltip,o[175]=vt):vt=o[175],o[176]!==z||o[177]!==mt||o[178]!==vt?(gt=v.jsxs("div",{className:"graphiql-response",children:[mt,vt,z]}),o[176]=z,o[177]=mt,o[178]=vt,o[179]=gt):gt=o[179],o[180]!==I.secondRef||o[181]!==gt?(yt=v.jsx("div",{ref:I.secondRef,children:gt}),o[180]=I.secondRef,o[181]=gt,o[182]=yt):yt=o[182],o[183]!==He||o[184]!==pt||o[185]!==ht||o[186]!==yt?(bt=v.jsxs("div",{role:"tabpanel",id:"graphiql-session",className:"graphiql-session","aria-labelledby":He,children:[pt,ht,yt]}),o[183]=He,o[184]=pt,o[185]=ht,o[186]=yt,o[187]=bt):bt=o[187],o[188]!==A.secondRef||o[189]!==Ue||o[190]!==bt?(Et=v.jsxs("div",{ref:A.secondRef,className:"graphiql-sessions",children:[Ue,bt]}),o[188]=A.secondRef,o[189]=Ue,o[190]=bt,o[191]=Et):Et=o[191],o[192]!==Pe||o[193]!==je||o[194]!==Et?(xt=v.jsxs("div",{className:"graphiql-main",children:[Pe,je,Et]}),o[192]=Pe,o[193]=je,o[194]=Et,o[195]=xt):xt=o[195];const wt="short-keys"===j;let Tt;o[196]===Symbol.for("react.memo_cache_sentinel")?(Tt=v.jsxs("div",{className:"graphiql-dialog-header",children:[v.jsx(UA.Title,{className:"graphiql-dialog-title",children:"Short Keys"}),v.jsx(UA.Close,{})]}),o[196]=Tt):Tt=o[196];const Ct=t.keyMap||"sublime";let kt,St;o[197]!==Ct?(kt=v.jsx("div",{className:"graphiql-dialog-section",children:v.jsx(eL,{keyMap:Ct})}),o[197]=Ct,o[198]=kt):kt=o[198],o[199]!==wt||o[200]!==kt?(St=v.jsxs(UA,{open:wt,onOpenChange:fe,children:[Tt,kt]}),o[199]=wt,o[200]=kt,o[201]=St):St=o[201];const _t="settings"===j;let Nt,At,Dt,It,Ot,Lt;return o[202]===Symbol.for("react.memo_cache_sentinel")?(Nt=v.jsxs("div",{className:"graphiql-dialog-header",children:[v.jsx(UA.Title,{className:"graphiql-dialog-title",children:"Settings"}),v.jsx(UA.Close,{})]}),o[202]=Nt):Nt=o[202],o[203]!==l.shouldPersistHeaders||o[204]!==X||o[205]!==t.showPersistHeadersSettings?(At=t.showPersistHeadersSettings?v.jsxs("div",{className:"graphiql-dialog-section",children:[v.jsxs("div",{children:[v.jsx("div",{className:"graphiql-dialog-section-title",children:"Persist headers"}),v.jsxs("div",{className:"graphiql-dialog-section-caption",children:["Save headers upon reloading."," ",v.jsx("span",{className:"graphiql-warning-text",children:"Only enable if you trust this device."})]})]}),v.jsxs(jA,{children:[v.jsx(PA,{type:"button",id:"enable-persist-headers",className:l.shouldPersistHeaders?"active":"","data-value":"true",onClick:X,children:"On"}),v.jsx(PA,{type:"button",id:"disable-persist-headers",className:l.shouldPersistHeaders?"":"active",onClick:X,children:"Off"})]})]}):null,o[203]=l.shouldPersistHeaders,o[204]=X,o[205]=t.showPersistHeadersSettings,o[206]=At):At=o[206],o[207]!==m||o[208]!==Z||o[209]!==x?(Dt=!m&&v.jsxs("div",{className:"graphiql-dialog-section",children:[v.jsxs("div",{children:[v.jsx("div",{className:"graphiql-dialog-section-title",children:"Theme"}),v.jsx("div",{className:"graphiql-dialog-section-caption",children:"Adjust how the interface appears."})]}),v.jsxs(jA,{children:[v.jsx(PA,{type:"button",className:null===x?"active":"",onClick:Z,children:"System"}),v.jsx(PA,{type:"button",className:"light"===x?"active":"","data-theme":"light",onClick:Z,children:"Light"}),v.jsx(PA,{type:"button",className:"dark"===x?"active":"","data-theme":"dark",onClick:Z,children:"Dark"})]})]}),o[207]=m,o[208]=Z,o[209]=x,o[210]=Dt):Dt=o[210],o[211]!==B||o[212]!==K||o[213]!==p?(It=p?v.jsxs("div",{className:"graphiql-dialog-section",children:[v.jsxs("div",{children:[v.jsx("div",{className:"graphiql-dialog-section-title",children:"Clear storage"}),v.jsx("div",{className:"graphiql-dialog-section-caption",children:"Remove all locally stored data and start fresh."})]}),v.jsx(PA,{type:"button",state:B||void 0,disabled:"success"===B,onClick:K,children:{success:"Cleared data",error:"Failed"}[B]||"Clear data"})]}):null,o[211]=B,o[212]=K,o[213]=p,o[214]=It):It=o[214],o[215]!==_t||o[216]!==At||o[217]!==Dt||o[218]!==It?(Ot=v.jsxs(UA,{open:_t,onOpenChange:he,children:[Nt,At,Dt,It]}),o[215]=_t,o[216]=At,o[217]=Dt,o[218]=It,o[219]=Ot):Ot=o[219],o[220]!==Ce||o[221]!==Le||o[222]!==xt||o[223]!==St||o[224]!==Ot?(Lt=v.jsx(KA.Provider,{children:v.jsxs("div",{"data-testid":"graphiql-container",className:Ce,children:[Le,xt,St,Ot]})}),o[220]=Ce,o[221]=Le,o[222]=xt,o[223]=St,o[224]=Ot,o[225]=Lt):Lt=o[225],Lt}function KO(e){return aL(e,zO.Footer)}function QO(e){return aL(e,zO.Toolbar)}function XO(e){return aL(e,zO.Logo)}const JO=ED?"⌘":"Ctrl",ZO=Object.entries({"Search in editor":[JO,"F"],"Search in documentation":[JO,"K"],"Execute query":[JO,"Enter"],"Prettify editors":["Ctrl","Shift","P"],"Merge fragments definitions into operation definition":["Ctrl","Shift","M"],"Copy query":["Ctrl","Shift","C"],"Re-fetch schema using introspection":["Ctrl","Shift","R"]});function eL(e){const t=N.c(5),{keyMap:n}=e;let r,i,o,a;return t[0]===Symbol.for("react.memo_cache_sentinel")?(r=v.jsxs("table",{className:"graphiql-table",children:[v.jsx("thead",{children:v.jsxs("tr",{children:[v.jsx("th",{children:"Short Key"}),v.jsx("th",{children:"Function"})]})}),v.jsx("tbody",{children:ZO.map(tL)})]}),t[0]=r):r=t[0],t[1]===Symbol.for("react.memo_cache_sentinel")?(i=v.jsx("a",{href:"https://codemirror.net/5/doc/manual.html#keymaps",target:"_blank",rel:"noopener noreferrer",children:"CodeMirror Key Maps"}),t[1]=i):i=t[1],t[2]===Symbol.for("react.memo_cache_sentinel")?(o=v.jsx("em",{children:"i"}),t[2]=o):o=t[2],t[3]!==n?(a=v.jsxs("div",{children:[r,v.jsxs("p",{children:["The editors use"," ",i," ","that add more short keys. This instance of Graph",o,"QL uses"," ",v.jsx("code",{children:n}),"."]})]}),t[3]=n,t[4]=a):a=t[4],a}function tL(e){const[t,n]=e;return v.jsxs("tr",{children:[v.jsx("td",{children:n.map(nL)}),v.jsx("td",{children:t})]},t)}function nL(t,n,r){return v.jsxs(e.Fragment,{children:[v.jsx("code",{className:"graphiql-key",children:t}),n!==r.length-1&&" + "]},t)}function rL(e){const t=N.c(4);let n,r;return t[0]!==e.children?(n=e.children||v.jsxs("a",{className:"graphiql-logo-link",href:"https://github.com/graphql/graphiql",target:"_blank",rel:"noreferrer",children:["Graph",v.jsx("em",{children:"i"}),"QL"]}),t[0]=e.children,t[1]=n):n=t[1],t[2]!==n?(r=v.jsx("div",{className:"graphiql-logo",children:n}),t[2]=n,t[3]=r):r=t[3],r}function iL(e){const t=N.c(2);let n;return t[0]!==e.children?(n=v.jsx(v.Fragment,{children:e.children}),t[0]=e.children,t[1]=n):n=t[1],n}function oL(e){const t=N.c(2);let n;return t[0]!==e.children?(n=v.jsx("div",{className:"graphiql-footer",children:e.children}),t[0]=e.children,t[1]=n):n=t[1],n}function aL(e,t){var n;return!(!(null==(n=null==e?void 0:e.type)?void 0:n.displayName)||e.type.displayName!==t.displayName)||e.type===t}function sL(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function lL(e){return"object"===sL(e)}function cL(e,t){return e.length<124?e:t}rL.displayName="GraphiQLLogo",iL.displayName="GraphiQLToolbar",oL.displayName="GraphiQLFooter",zO.createFetcher=function(e){const t=e.fetch||"undefined"!=typeof window&&window.fetch;if(!t)throw new Error("No valid fetcher implementation available");e.enableIncrementalDelivery=!1!==e.enableIncrementalDelivery;const n=((e,t)=>async(n,r)=>(await t(e.url,{method:"POST",body:JSON.stringify(n),headers:Ha(Ha({"content-type":"application/json"},e.headers),null==r?void 0:r.headers)})).json())(e,t),r=e.enableIncrementalDelivery?is(e,t):n;return async(t,i)=>{if("IntrospectionQuery"===t.operationName)return(e.schemaFetcher||n)(t,i);if(null!=i&&i.documentAST&&((e,t)=>{let n=!1;return _t(e,{OperationDefinition(e){var r;t===(null==(r=e.name)?void 0:r.value)&&"subscription"===e.operation&&(n=!0)}}),n})(i.documentAST,t.operationName||void 0)){const n=await os(e,i);if(!n)throw new Error("Your GraphiQL createFetcher is not properly configured for websocket subscriptions yet. "+(e.subscriptionUrl?`Provided URL ${e.subscriptionUrl} failed`:"Please provide subscriptionUrl, wsClient or legacyClient option first."));return n(t)}return r(t,i)}},zO.createLocalStorage=function({namespace:e}){const t=`${e}:`,n=e=>`${t}${e}`;return{setItem:(e,t)=>localStorage.setItem(n(e),t),getItem:e=>localStorage.getItem(n(e)),removeItem:e=>localStorage.removeItem(n(e)),get length(){let e=0;for(const n in localStorage)0===n.indexOf(t)&&(e+=1);return e},clear(){for(const e in localStorage)0===e.indexOf(t)&&localStorage.removeItem(e)}}},zO.GraphQL=Fa,zO.React=qO;const uL="graphql-transport-ws";var dL,fL,pL,hL;function mL(e){if(!lL(e))throw new Error(`Message is expected to be an object, but got ${sL(e)}`);if(!e.type)throw new Error("Message is missing the 'type' property");if("string"!=typeof e.type)throw new Error(`Message is expects the 'type' property to be a string, but got ${sL(e.type)}`);switch(e.type){case pL.ConnectionInit:case pL.ConnectionAck:case pL.Ping:case pL.Pong:if(null!=e.payload&&!lL(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break;case pL.Subscribe:if("string"!=typeof e.id)throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${sL(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!lL(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${sL(e.payload)}`);if("string"!=typeof e.payload.query)throw new Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${sL(e.payload.query)}`);if(null!=e.payload.variables&&!lL(e.payload.variables))throw new Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${sL(e.payload.variables)}`);if(null!=e.payload.operationName&&"string"!==sL(e.payload.operationName))throw new Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${sL(e.payload.operationName)}`);if(null!=e.payload.extensions&&!lL(e.payload.extensions))throw new Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${sL(e.payload.extensions)}`);break;case pL.Next:if("string"!=typeof e.id)throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${sL(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!lL(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${sL(e.payload)}`);break;case pL.Error:if("string"!=typeof e.id)throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${sL(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(t=e.payload,!(Array.isArray(t)&&t.length>0&&t.every((e=>"message"in e))))throw new Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break;case pL.Complete:if("string"!=typeof e.id)throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${sL(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);break;default:throw new Error(`Invalid message 'type' property "${e.type}"`)}var t;return e}function vL(e,t){return mL("string"==typeof e?JSON.parse(e,t):e)}function gL(e,t){return mL(e),JSON.stringify(e,t)}(fL=dL||(dL={}))[fL.InternalServerError=4500]="InternalServerError",fL[fL.InternalClientError=4005]="InternalClientError",fL[fL.BadRequest=4400]="BadRequest",fL[fL.BadResponse=4004]="BadResponse",fL[fL.Unauthorized=4401]="Unauthorized",fL[fL.Forbidden=4403]="Forbidden",fL[fL.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",fL[fL.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",fL[fL.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",fL[fL.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",fL[fL.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests",(hL=pL||(pL={})).ConnectionInit="connection_init",hL.ConnectionAck="connection_ack",hL.Ping="ping",hL.Pong="pong",hL.Subscribe="subscribe",hL.Next="next",hL.Error="error",hL.Complete="complete";var yL=function(e){return this instanceof yL?(this.v=e,this):new yL(e)},bL=function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof yL?Promise.resolve(e.value.v).then(l,c):u(o[0][2],e)}(i[e](t))}catch(aN){u(o[0][3],aN)}}function l(e){s("next",e)}function c(e){s("throw",e)}function u(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}};function EL(e){return lL(e)&&"code"in e&&"reason"in e}const xL=Object.freeze(Object.defineProperty({__proto__:null,get CloseCode(){return dL},GRAPHQL_TRANSPORT_WS_PROTOCOL:uL,get MessageType(){return pL},createClient:function(e){const{url:t,connectionParams:n,lazy:r=!0,onNonLazyError:i=console.error,lazyCloseTimeout:o=0,keepAlive:a=0,disablePong:s,connectionAckWaitTimeout:l=0,retryAttempts:c=5,retryWait:u=async function(e){let t=1e3;for(let n=0;n<e;n++)t*=2;await new Promise((e=>setTimeout(e,t+Math.floor(2700*Math.random()+300))))},shouldRetry:d=EL,isFatalConnectionProblem:f,on:p,webSocketImpl:h,generateID:m=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))},jsonMessageReplacer:v,jsonMessageReviver:g}=e;let y;if(h){if(!("function"==typeof(b=h)&&"constructor"in b&&"CLOSED"in b&&"CLOSING"in b&&"CONNECTING"in b&&"OPEN"in b))throw new Error("Invalid WebSocket implementation provided");y=h}else"undefined"!=typeof WebSocket?y=WebSocket:"undefined"!=typeof global?y=global.WebSocket||global.MozWebSocket:"undefined"!=typeof window&&(y=window.WebSocket||window.MozWebSocket);var b;if(!y)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");const E=y,x=(()=>{const e=(()=>{const e={};return{on:(t,n)=>(e[t]=n,()=>{delete e[t]}),emit(t){var n;"id"in t&&(null===(n=e[t.id])||void 0===n||n.call(e,t))}}})(),t={connecting:(null==p?void 0:p.connecting)?[p.connecting]:[],opened:(null==p?void 0:p.opened)?[p.opened]:[],connected:(null==p?void 0:p.connected)?[p.connected]:[],ping:(null==p?void 0:p.ping)?[p.ping]:[],pong:(null==p?void 0:p.pong)?[p.pong]:[],message:(null==p?void 0:p.message)?[e.emit,p.message]:[e.emit],closed:(null==p?void 0:p.closed)?[p.closed]:[],error:(null==p?void 0:p.error)?[p.error]:[]};return{onMessage:e.on,on(e,n){const r=t[e];return r.push(n),()=>{r.splice(r.indexOf(n),1)}},emit(e,...n){for(const r of[...t[e]])r(...n)}}})();function w(e){const t=[x.on("error",(n=>{t.forEach((e=>e())),e(n)})),x.on("closed",(n=>{t.forEach((e=>e())),e(n)}))]}let T,C,k=0,S=!1,_=0,N=!1;async function A(){clearTimeout(C);const[e,r]=await(null!=T?T:T=new Promise(((e,r)=>(async()=>{if(S){if(await u(_),!k)return T=void 0,r({code:1e3,reason:"All Subscriptions Gone"});_++}x.emit("connecting");const i=new E("function"==typeof t?await t():t,uL);let o,c;function d(){isFinite(a)&&a>0&&(clearTimeout(c),c=setTimeout((()=>{i.readyState===E.OPEN&&(i.send(gL({type:pL.Ping})),x.emit("ping",!1,void 0))}),a))}w((e=>{T=void 0,clearTimeout(o),clearTimeout(c),r(e),EL(e)&&4499===e.code&&(i.close(4499,"Terminated"),i.onerror=null,i.onclose=null)})),i.onerror=e=>x.emit("error",e),i.onclose=e=>x.emit("closed",e),i.onopen=async()=>{try{x.emit("opened",i);const e="function"==typeof n?await n():n;if(i.readyState!==E.OPEN)return;i.send(gL(e?{type:pL.ConnectionInit,payload:e}:{type:pL.ConnectionInit},v)),isFinite(l)&&l>0&&(o=setTimeout((()=>{i.close(dL.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")}),l)),d()}catch(gR){x.emit("error",gR),i.close(dL.InternalClientError,cL(gR instanceof Error?gR.message:new Error(gR).message,"Internal client error"))}};let f=!1;i.onmessage=({data:t})=>{try{const n=vL(t,g);if(x.emit("message",n),"ping"===n.type||"pong"===n.type)return x.emit(n.type,!0,n.payload),void("pong"===n.type?d():s||(i.send(gL(n.payload?{type:pL.Pong,payload:n.payload}:{type:pL.Pong})),x.emit("pong",!1,n.payload)));if(f)return;if(n.type!==pL.ConnectionAck)throw new Error(`First message cannot be of type ${n.type}`);clearTimeout(o),f=!0,x.emit("connected",i,n.payload),S=!1,_=0,e([i,new Promise(((e,t)=>w(t)))])}catch(gR){i.onmessage=null,x.emit("error",gR),i.close(dL.BadResponse,cL(gR instanceof Error?gR.message:new Error(gR).message,"Bad response"))}}})())));e.readyState===E.CLOSING&&await r;let i=()=>{};const c=new Promise((e=>i=e));return[e,i,Promise.race([c.then((()=>{if(!k){const t=()=>e.close(1e3,"Normal Closure");isFinite(o)&&o>0?C=setTimeout((()=>{e.readyState===E.OPEN&&t()}),o):t()}})),r])]}function D(e){if(EL(e)&&(t=e.code,![1e3,1001,1006,1005,1012,1013,1013].includes(t)&&t>=1e3&&t<=1999||[dL.InternalServerError,dL.InternalClientError,dL.BadRequest,dL.BadResponse,dL.Unauthorized,dL.SubprotocolNotAcceptable,dL.SubscriberAlreadyExists,dL.TooManyInitialisationRequests].includes(e.code)))throw e;var t;if(N)return!1;if(EL(e)&&1e3===e.code)return k>0;if(!c||_>=c)throw e;if(!d(e))throw e;if(null==f?void 0:f(e))throw e;return S=!0}return r||(async()=>{for(k++;;)try{const[,,e]=await A();await e}catch(e){try{if(!D(e))return}catch(t){return null==i?void 0:i(t)}}})(),{on:x.on,subscribe(e,t){const n=m(e);let r=!1,i=!1,o=()=>{k--,r=!0};return(async()=>{for(k++;;)try{const[a,s,l]=await A();if(r)return s();const c=x.onMessage(n,(e=>{switch(e.type){case pL.Next:return void t.next(e.payload);case pL.Error:return i=!0,r=!0,t.error(e.payload),void o();case pL.Complete:return r=!0,void o()}}));return a.send(gL({id:n,type:pL.Subscribe,payload:e},v)),o=()=>{r||a.readyState!==E.OPEN||a.send(gL({id:n,type:pL.Complete},v)),k--,r=!0,s()},void(await l.finally(c))}catch(a){if(!D(a))return}})().then((()=>{i||t.complete()})).catch((e=>{t.error(e)})),()=>{r||o()}},iterate(e){const t=[],n={done:!1,error:null,resolve:()=>{}},r=this.subscribe(e,{next(e){t.push(e),n.resolve()},error(e){n.done=!0,n.error=e,n.resolve()},complete(){n.done=!0,n.resolve()}}),i=function(){return bL(this,arguments,(function*(){for(;;){for(t.length||(yield yL(new Promise((e=>n.resolve=e))));t.length;)yield yield yL(t.shift());if(n.error)throw n.error;if(n.done)return yield yL(void 0)}}))}();return i.throw=async e=>(n.done||(n.done=!0,n.error=e,n.resolve()),{done:!0,value:void 0}),i.return=async()=>(r(),{done:!0,value:void 0}),i},async dispose(){if(N=!0,T){const[e]=await T;e.close(1e3,"Normal Closure")}},terminate(){T&&x.emit("closed",{code:4499,reason:"Terminated",wasClean:!1})}}},parseMessage:vL,stringifyMessage:gL,validateMessage:mL},Symbol.toStringTag,{value:"Module"}));var wL,TL={exports:{}};function CL(){return wL||(wL=1,TL.exports=function(){var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),a=r||i||o,s=a&&(r?document.documentMode||6:+(o||i)[1]),l=!o&&/WebKit\//.test(e),c=l&&/Qt\/\d+\.\d+/.test(e),u=!o&&/Chrome\//.test(e),d=/Opera\//.test(e),f=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),h=/PhantomJS/.test(e),m=f&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),v=/Android/.test(e),g=m||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=m||/Mac/.test(t),b=/\bCrOS\b/.test(e),E=/win/i.test(t),x=d&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(d=!1,l=!0);var w=y&&(c||d&&(null==x||x<12.11)),T=n||a&&s>=9;function C(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var k,S=function(e,t){var n=e.className,r=C(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function _(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function N(e,t){return _(e).appendChild(t)}function A(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function D(e,t,n,r){var i=A(e,t,n,r);return i.setAttribute("role","presentation"),i}function I(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function O(){var e;try{e=document.activeElement}catch(aN){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function L(e,t){var n=e.className;C(t).test(n)||(e.className+=(n?" ":"")+t)}function F(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!C(n[r]).test(t)&&(t+=" "+n[r]);return t}k=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(aN){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var R=function(e){e.select()};function M(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function P(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function j(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=r||0,a=i||0;;){var s=e.indexOf("\t",o);if(s<0||s>=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}m?R=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(R=function(e){try{e.select()}catch(t){}});var V=function(){this.id=null,this.f=null,this.time=0,this.handler=M(this.onTimeout,this)};function B(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}V.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},V.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};var $=50,U={toString:function(){return"CodeMirror.Pass"}},H={scroll:!1},q={origin:"*mouse"},z={origin:"+move"};function W(e,t,n){for(var r=0,i=0;;){var o=e.indexOf("\t",r);-1==o&&(o=e.length);var a=o-r;if(o==e.length||i+a>=t)return r+Math.min(a,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var G=[""];function Y(e){for(;G.length<=e;)G.push(K(G)+" ");return G[e]}function K(e){return e[e.length-1]}function Q(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function X(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function J(){}function Z(e,t){var n;return Object.create?n=Object.create(e):(J.prototype=e,n=new J),t&&P(t,n),n}var ee=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function te(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||ee.test(e))}function ne(e,t){return t?!!(t.source.indexOf("\\w")>-1&&te(e))||t.test(e):te(e)}function re(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ie=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function oe(e){return e.charCodeAt(0)>=768&&ie.test(e)}function ae(e,t,n){for(;(n<0?t>0:t<e.length)&&oe(e.charAt(t));)t+=n;return t}function se(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function le(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<n&&a.to>t||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}var ce=null;function ue(e,t,n){var r;ce=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:ce=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:ce=i)}return null!=r?r:ce}var de=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?e.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?t.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,s=/[1n]/;function l(e,t,n){this.level=e,this.from=t,this.to=n}return function(e,t){var c="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!r.test(e))return!1;for(var u=e.length,d=[],f=0;f<u;++f)d.push(n(e.charCodeAt(f)));for(var p=0,h=c;p<u;++p){var m=d[p];"m"==m?d[p]=h:h=m}for(var v=0,g=c;v<u;++v){var y=d[v];"1"==y&&"r"==g?d[v]="n":o.test(y)&&(g=y,"r"==y&&(d[v]="R"))}for(var b=1,E=d[0];b<u-1;++b){var x=d[b];"+"==x&&"1"==E&&"1"==d[b+1]?d[b]="1":","!=x||E!=d[b+1]||"1"!=E&&"n"!=E||(d[b]=E),E=x}for(var w=0;w<u;++w){var T=d[w];if(","==T)d[w]="N";else if("%"==T){var C=void 0;for(C=w+1;C<u&&"%"==d[C];++C);for(var k=w&&"!"==d[w-1]||C<u&&"1"==d[C]?"1":"N",S=w;S<C;++S)d[S]=k;w=C-1}}for(var _=0,N=c;_<u;++_){var A=d[_];"L"==N&&"1"==A?d[_]="L":o.test(A)&&(N=A)}for(var D=0;D<u;++D)if(i.test(d[D])){var I=void 0;for(I=D+1;I<u&&i.test(d[I]);++I);for(var O="L"==(D?d[D-1]:c),L=O==("L"==(I<u?d[I]:c))?O?"L":"R":c,F=D;F<I;++F)d[F]=L;D=I-1}for(var R,M=[],P=0;P<u;)if(a.test(d[P])){var j=P;for(++P;P<u&&a.test(d[P]);++P);M.push(new l(0,j,P))}else{var V=P,B=M.length,$="rtl"==t?1:0;for(++P;P<u&&"L"!=d[P];++P);for(var U=V;U<P;)if(s.test(d[U])){V<U&&(M.splice(B,0,new l(1,V,U)),B+=$);var H=U;for(++U;U<P&&s.test(d[U]);++U);M.splice(B,0,new l(2,H,U)),B+=$,V=U}else++U;V<P&&M.splice(B,0,new l(1,V,P))}return"ltr"==t&&(1==M[0].level&&(R=e.match(/^\s+/))&&(M[0].from=R[0].length,M.unshift(new l(0,0,R[0].length))),1==K(M).level&&(R=e.match(/\s+$/))&&(K(M).to-=R[0].length,M.push(new l(0,u-R[0].length,u)))),"rtl"==t?M.reverse():M}}();function fe(e,t){var n=e.order;return null==n&&(n=e.order=de(e.text,t)),n}var pe=[],he=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||pe).concat(n)}};function me(e,t){return e._handlers&&e._handlers[t]||pe}function ve(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=B(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function ge(e,t){var n=me(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function ye(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ge(e,n||t.type,e,t),Ce(t)||t.codemirrorIgnore}function be(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==B(n,t[r])&&n.push(t[r])}function Ee(e,t){return me(e,t).length>0}function xe(e){e.prototype.on=function(e,t){he(this,e,t)},e.prototype.off=function(e,t){ve(this,e,t)}}function we(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Te(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ce(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function ke(e){we(e),Te(e)}function Se(e){return e.target||e.srcElement}function _e(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var Ne,Ae,De=function(){if(a&&s<9)return!1;var e=A("div");return"draggable"in e||"dragDrop"in e}();function Ie(e){if(null==Ne){var t=A("span","");N(e,A("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Ne=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=Ne?A("span",""):A("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Oe(e){if(null!=Ae)return Ae;var t=N(e,document.createTextNode("AخA")),n=k(t,0,1).getBoundingClientRect(),r=k(t,1,2).getBoundingClientRect();return _(e),!(!n||n.left==n.right)&&(Ae=r.right-n.right<3)}var Le=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Fe=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(aN){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(aN){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Re=function(){var e=A("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Me=null;function Pe(e){if(null!=Me)return Me;var t=N(e,A("span","x")),n=t.getBoundingClientRect(),r=k(t,0,1).getBoundingClientRect();return Me=Math.abs(n.left-r.left)>1}var je={},Ve={};function Be(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),je[e]=t}function $e(e,t){Ve[e]=t}function Ue(e){if("string"==typeof e&&Ve.hasOwnProperty(e))e=Ve[e];else if(e&&"string"==typeof e.name&&Ve.hasOwnProperty(e.name)){var t=Ve[e.name];"string"==typeof t&&(t={name:t}),(e=Z(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ue("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ue("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function He(e,t){t=Ue(t);var n=je[t.name];if(!n)return He(e,"text/plain");var r=n(e,t);if(qe.hasOwnProperty(t.name)){var i=qe[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var qe={};function ze(e,t){P(t,qe.hasOwnProperty(e)?qe[e]:qe[e]={})}function We(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Ge(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Ye(e,t,n){return!e.startState||e.startState(t,n)}var Ke=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Qe(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function Xe(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,(function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i})),r}function Je(e,t,n){var r=[];return e.iter(t,n,(function(e){r.push(e.text)})),r}function Ze(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function et(e){if(null==e.parent)return null;for(var t=e.parent,n=B(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function tt(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var a=0;a<e.lines.length;++a){var s=e.lines[a].height;if(t<s)break;t-=s}return n+a}function nt(e,t){return t>=e.first&&t<e.first+e.size}function rt(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function it(e,t,n){if(void 0===n&&(n=null),!(this instanceof it))return new it(e,t,n);this.line=e,this.ch=t,this.sticky=n}function ot(e,t){return e.line-t.line||e.ch-t.ch}function at(e,t){return e.sticky==t.sticky&&0==ot(e,t)}function st(e){return it(e.line,e.ch)}function lt(e,t){return ot(e,t)<0?t:e}function ct(e,t){return ot(e,t)<0?e:t}function ut(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function dt(e,t){if(t.line<e.first)return it(e.first,0);var n=e.first+e.size-1;return t.line>n?it(n,Qe(e,n).text.length):ft(t,Qe(e,t.line).text.length)}function ft(e,t){var n=e.ch;return null==n||n>t?it(e.line,t):n<0?it(e.line,0):e}function pt(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=dt(e,t[r]);return n}Ke.prototype.eol=function(){return this.pos>=this.string.length},Ke.prototype.sol=function(){return this.pos==this.lineStart},Ke.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ke.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ke.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Ke.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ke.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ke.prototype.skipToEnd=function(){this.pos=this.string.length},Ke.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ke.prototype.backUp=function(e){this.pos-=e},Ke.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=j(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?j(this.string,this.lineStart,this.tabSize):0)},Ke.prototype.indentation=function(){return j(this.string,null,this.tabSize)-(this.lineStart?j(this.string,this.lineStart,this.tabSize):0)},Ke.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Ke.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ke.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ke.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ke.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ht=function(e,t){this.state=e,this.lookAhead=t},mt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function vt(e,t,n,r){var i=[e.state.modeGen],o={};kt(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),o,r);for(var a=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],l=1,c=0;n.state=!0,kt(e,t.text,s.mode,n,(function(e,t){for(var n=l;c<e;){var r=i[l];r>e&&i.splice(l,1,e,i[l+1],r),l+=2,c=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;n<l;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"overlay "+t}}),o),n.state=a,n.baseTokens=null,n.baseTokenPos=1},l=0;l<e.state.overlays.length;++l)s(l);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function gt(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=yt(e,et(t)),i=t.text.length>e.options.maxHighlightLength&&We(e.doc.mode,r.state),o=vt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function yt(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new mt(r,!0,t);var o=St(e,t,n),a=o>r.first&&Qe(r,o-1).stateAfter,s=a?mt.fromSaved(r,a,o):new mt(r,Ye(r.mode),o);return r.iter(o,t,(function(n){bt(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&r<i.viewTo?s.save():null,s.nextLine()})),n&&(r.modeFrontier=s.line),s}function bt(e,t,n,r){var i=e.doc.mode,o=new Ke(t,e.options.tabSize,n);for(o.start=o.pos=r||0,""==t&&Et(i,n.state);!o.eol();)xt(i,o,n.state),o.start=o.pos}function Et(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=Ge(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function xt(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=Ge(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}mt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},mt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},mt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},mt.fromSaved=function(e,t,n){return t instanceof ht?new mt(e,We(e.mode,t.state),n,t.lookAhead):new mt(e,We(e.mode,t),n)},mt.prototype.save=function(e){var t=!1!==e?We(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ht(t,this.maxLookAhead):t};var wt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function Tt(e,t,n,r){var i,o,a=e.doc,s=a.mode,l=Qe(a,(t=dt(a,t)).line),c=yt(e,t.line,n),u=new Ke(l.text,e.options.tabSize,c);for(r&&(o=[]);(r||u.pos<t.ch)&&!u.eol();)u.start=u.pos,i=xt(s,u,c.state),r&&o.push(new wt(u,i,We(a.mode,c.state)));return r?o:new wt(u,i,c.state)}function Ct(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function kt(e,t,n,r,i,o,a){var s=n.flattenSpans;null==s&&(s=e.options.flattenSpans);var l,c=0,u=null,d=new Ke(t,e.options.tabSize,r),f=e.options.addModeClass&&[null];for(""==t&&Ct(Et(n,r.state),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(s=!1,a&&bt(e,t,r,d.pos),d.pos=t.length,l=null):l=Ct(xt(n,d,r.state,f),o),f){var p=f[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!s||u!=l){for(;c<d.start;)i(c=Math.min(d.start,c+5e3),u);u=l}d.start=d.pos}for(;c<d.pos;){var h=Math.min(d.pos,c+5e3);i(h,u),c=h}}function St(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=o.first)return o.first;var l=Qe(o,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof ht?c.lookAhead:0)<=o.modeFrontier))return s;var u=j(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}function _t(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var i=Qe(e,r).stateAfter;if(i&&(!(i instanceof ht)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}var Nt=!1,At=!1;function Dt(){Nt=!0}function It(){At=!0}function Ot(e,t,n){this.marker=e,this.from=t,this.to=n}function Lt(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function Ft(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function Rt(e,t,n){var r=n&&window.WeakSet&&(n.markedSpans||(n.markedSpans=new WeakSet));r&&e.markedSpans&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}function Mt(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==a.type&&(!n||!o.marker.insertLeft)){var s=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new Ot(a,o.from,s?null:o.to))}}return r}function Pt(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.to||(a.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new Ot(a,s?null:o.from-t,null==o.to?null:o.to-t))}}return r}function jt(e,t){if(t.full)return null;var n=nt(e,t.from.line)&&Qe(e,t.from.line).markedSpans,r=nt(e,t.to.line)&&Qe(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,a=0==ot(t.from,t.to),s=Mt(n,i,a),l=Pt(r,o,a),c=1==t.text.length,u=K(t.text).length+(c?i:0);if(s)for(var d=0;d<s.length;++d){var f=s[d];if(null==f.to){var p=Lt(l,f.marker);p?c&&(f.to=null==p.to?null:p.to+u):f.to=i}}if(l)for(var h=0;h<l.length;++h){var m=l[h];null!=m.to&&(m.to+=u),null==m.from?Lt(s,m.marker)||(m.from=u,c&&(s||(s=[])).push(m)):(m.from+=u,c&&(s||(s=[])).push(m))}s&&(s=Vt(s)),l&&l!=s&&(l=Vt(l));var v=[s];if(!c){var g,y=t.text.length-2;if(y>0&&s)for(var b=0;b<s.length;++b)null==s[b].to&&(g||(g=[])).push(new Ot(s[b].marker,null,null));for(var E=0;E<y;++E)v.push(g);v.push(l)}return v}function Vt(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Bt(e,t,n){var r=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=B(r,n)||(r||(r=[])).push(n)}})),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var a=r[o],s=a.find(0),l=0;l<i.length;++l){var c=i[l];if(!(ot(c.to,s.from)<0||ot(c.from,s.to)>0)){var u=[l,1],d=ot(c.from,s.from),f=ot(c.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:s.from}),(f>0||!a.inclusiveRight&&!f)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}function $t(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Ut(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Ht(e){return e.inclusiveLeft?-1:0}function qt(e){return e.inclusiveRight?1:0}function zt(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=ot(r.from,i.from)||Ht(e)-Ht(t);if(o)return-o;var a=ot(r.to,i.to)||qt(e)-qt(t);return a||t.id-e.id}function Wt(e,t){var n,r=At&&e.markedSpans;if(r)for(var i=void 0,o=0;o<r.length;++o)(i=r[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!n||zt(n,i.marker)<0)&&(n=i.marker);return n}function Gt(e){return Wt(e,!0)}function Yt(e){return Wt(e,!1)}function Kt(e,t){var n,r=At&&e.markedSpans;if(r)for(var i=0;i<r.length;++i){var o=r[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!n||zt(n,o.marker)<0)&&(n=o.marker)}return n}function Qt(e,t,n,r,i){var o=Qe(e,t),a=At&&o.markedSpans;if(a)for(var s=0;s<a.length;++s){var l=a[s];if(l.marker.collapsed){var c=l.marker.find(0),u=ot(c.from,n)||Ht(l.marker)-Ht(i),d=ot(c.to,r)||qt(l.marker)-qt(i);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ot(c.to,n)>=0:ot(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ot(c.from,r)<=0:ot(c.from,r)<0)))return!0}}}function Xt(e){for(var t;t=Gt(e);)e=t.find(-1,!0).line;return e}function Jt(e){for(var t;t=Yt(e);)e=t.find(1,!0).line;return e}function Zt(e){for(var t,n;t=Yt(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function en(e,t){var n=Qe(e,t),r=Xt(n);return n==r?t:et(r)}function tn(e,t){if(t>e.lastLine())return t;var n,r=Qe(e,t);if(!nn(e,r))return t;for(;n=Yt(r);)r=n.find(1,!0).line;return et(r)+1}function nn(e,t){var n=At&&t.markedSpans;if(n)for(var r=void 0,i=0;i<n.length;++i)if((r=n[i]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&rn(e,t,r))return!0}}function rn(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return rn(e,r.line,Lt(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&rn(e,t,i))return!0}function on(e){for(var t=0,n=(e=Xt(e)).parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;o=(n=o).parent)for(var a=0;a<o.children.length;++a){var s=o.children[a];if(s==n)break;t+=s.height}return t}function an(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=Gt(r);){var i=t.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}for(r=e;t=Yt(r);){var o=t.find(0,!0);n-=r.text.length-o.from.ch,n+=(r=o.to.line).text.length-o.to.ch}return n}function sn(e){var t=e.display,n=e.doc;t.maxLine=Qe(n,n.first),t.maxLineLength=an(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=an(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var ln=function(e,t,n){this.text=e,Ut(this,t),this.height=n?n(this):1};function cn(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),$t(e),Ut(e,n);var i=r?r(e):1;i!=e.height&&Ze(e,i)}function un(e){e.parent=null,$t(e)}ln.prototype.lineNo=function(){return et(this)},xe(ln);var dn={},fn={};function pn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?fn:dn;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function hn(e,t){var n=D("span",null,null,l?"padding-right: .1px":null),r={pre:D("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;r.pos=0,r.addToken=vn,Oe(e.display.measure)&&(a=fe(o,e.doc.direction))&&(r.addToken=yn(r.addToken,a)),r.map=[],En(o,r,gt(e,o,t!=e.display.externalMeasured&&et(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=F(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=F(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Ie(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return ge(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=F(r.pre.className,r.textClass||"")),r}function mn(e){var t=A("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function vn(e,t,n,r,i,o,l){if(t){var c,u=e.splitSpaces?gn(t,e.trailingSpace):t,d=e.cm.state.specialChars,f=!1;if(d.test(t)){c=document.createDocumentFragment();for(var p=0;;){d.lastIndex=p;var h=d.exec(t),m=h?h.index-p:t.length-p;if(m){var v=document.createTextNode(u.slice(p,p+m));a&&s<9?c.appendChild(A("span",[v])):c.appendChild(v),e.map.push(e.pos,e.pos+m,v),e.col+=m,e.pos+=m}if(!h)break;p+=m+1;var g=void 0;if("\t"==h[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(g=c.appendChild(A("span",Y(b),"cm-tab"))).setAttribute("role","presentation"),g.setAttribute("cm-text","\t"),e.col+=b}else"\r"==h[0]||"\n"==h[0]?((g=c.appendChild(A("span","\r"==h[0]?"␍":"","cm-invalidchar"))).setAttribute("cm-text",h[0]),e.col+=1):((g=e.cm.options.specialCharPlaceholder(h[0])).setAttribute("cm-text",h[0]),a&&s<9?c.appendChild(A("span",[g])):c.appendChild(g),e.col+=1);e.map.push(e.pos,e.pos+1,g),e.pos++}}else e.col+=t.length,c=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,c),a&&s<9&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),n||r||i||f||o||l){var E=n||"";r&&(E+=r),i&&(E+=i);var x=A("span",[c],E,o);if(l)for(var w in l)l.hasOwnProperty(w)&&"style"!=w&&"class"!=w&&x.setAttribute(w,l[w]);return e.content.appendChild(x)}e.content.appendChild(c)}}function gn(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!n||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),r+=o,n=" "==o}return r}function yn(e,t){return function(n,r,i,o,a,s,l){i=i?i+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+r.length;;){for(var d=void 0,f=0;f<t.length&&!((d=t[f]).to>c&&d.from<=c);f++);if(d.to>=u)return e(n,r,i,o,a,s,l);e(n,r.slice(0,d.to-c),i,o,null,s,l),o=null,r=r.slice(d.to-c),c=d.to}}}function bn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function En(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,c,u,d,f,p=i.length,h=0,m=1,v="",g=0;;){if(g==h){l=c=u=s="",f=null,d=null,g=1/0;for(var y=[],b=void 0,E=0;E<r.length;++E){var x=r[E],w=x.marker;if("bookmark"==w.type&&x.from==h&&w.widgetNode)y.push(w);else if(x.from<=h&&(null==x.to||x.to>h||w.collapsed&&x.to==h&&x.from==h)){if(null!=x.to&&x.to!=h&&g>x.to&&(g=x.to,c=""),w.className&&(l+=" "+w.className),w.css&&(s=(s?s+";":"")+w.css),w.startStyle&&x.from==h&&(u+=" "+w.startStyle),w.endStyle&&x.to==g&&(b||(b=[])).push(w.endStyle,x.to),w.title&&((f||(f={})).title=w.title),w.attributes)for(var T in w.attributes)(f||(f={}))[T]=w.attributes[T];w.collapsed&&(!d||zt(d.marker,w)<0)&&(d=x)}else x.from>h&&g>x.from&&(g=x.from)}if(b)for(var C=0;C<b.length;C+=2)b[C+1]==g&&(c+=" "+b[C]);if(!d||d.from==h)for(var k=0;k<y.length;++k)bn(t,0,y[k]);if(d&&(d.from||0)==h){if(bn(t,(null==d.to?p+1:d.to)-h,d.marker,null==d.from),null==d.to)return;d.to==h&&(d=!1)}}if(h>=p)break;for(var S=Math.min(p,g);;){if(v){var _=h+v.length;if(!d){var N=_>S?v.slice(0,S-h):v;t.addToken(t,N,a?a+l:l,u,h+N.length==g?c:"",s,f)}if(_>=S){v=v.slice(S-h),h=S;break}h=_,u=""}v=i.slice(o,o=n[m++]),a=pn(n[m++],t.cm.options)}}else for(var A=1;A<n.length;A+=2)t.addToken(t,i.slice(o,o=n[A]),pn(n[A+1],t.cm.options))}function xn(e,t,n){this.line=t,this.rest=Zt(t),this.size=this.rest?et(K(this.rest))-n+1:1,this.node=this.text=null,this.hidden=nn(e,t)}function wn(e,t,n){for(var r,i=[],o=t;o<n;o=r){var a=new xn(e.doc,Qe(e.doc,o),o);r=o+a.size,i.push(a)}return i}var Tn=null;function Cn(e){Tn?Tn.ops.push(e):e.ownsGroup=Tn={ops:[e],delayedCallbacks:[]}}function kn(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}function Sn(e,t){var n=e.ownsGroup;if(n)try{kn(n)}finally{Tn=null,t(n)}}var _n=null;function Nn(e,t){var n=me(e,t);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);Tn?r=Tn.delayedCallbacks:_n?r=_n:(r=_n=[],setTimeout(An,0));for(var o=function(e){r.push((function(){return n[e].apply(null,i)}))},a=0;a<n.length;++a)o(a)}}function An(){var e=_n;_n=null;for(var t=0;t<e.length;++t)e[t]()}function Dn(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?Fn(e,t):"gutter"==o?Mn(e,t,n,r):"class"==o?Rn(e,t):"widget"==o&&Pn(e,t,r)}t.changes=null}function In(e){return e.node==e.text&&(e.node=A("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),a&&s<8&&(e.node.style.zIndex=2)),e.node}function On(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=In(t);t.background=r.insertBefore(A("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function Ln(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):hn(e,t)}function Fn(e,t){var n=t.text.className,r=Ln(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,Rn(e,t)):n&&(t.text.className=n)}function Rn(e,t){On(e,t),t.line.wrapClass?In(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function Mn(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=In(t);t.gutterBackground=A("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var a=In(t),s=t.gutter=A("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(s.setAttribute("aria-hidden","true"),e.display.input.setUneditable(s),a.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(A("div",rt(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var l=0;l<e.display.gutterSpecs.length;++l){var c=e.display.gutterSpecs[l].className,u=o.hasOwnProperty(c)&&o[c];u&&s.appendChild(A("div",[u],"CodeMirror-gutter-elt","left: "+r.gutterLeft[c]+"px; width: "+r.gutterWidth[c]+"px"))}}}function Pn(e,t,n){t.alignable&&(t.alignable=null);for(var r=C("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);Vn(e,t,n)}function jn(e,t,n,r){var i=Ln(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Rn(e,t),Mn(e,t,n,r),Vn(e,t,r),t.node}function Vn(e,t,n){if(Bn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)Bn(e,t.rest[r],t,n,!1)}function Bn(e,t,n,r,i){if(t.widgets)for(var o=In(n),a=0,s=t.widgets;a<s.length;++a){var l=s[a],c=A("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),$n(l,c,n,r),e.display.input.setUneditable(c),i&&l.above?o.insertBefore(c,n.gutter||n.text):o.appendChild(c),Nn(l,"redraw")}}function $n(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function Un(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!I(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),N(t.display.measure,A("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function Hn(e,t){for(var n=Se(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function qn(e){return e.lineSpace.offsetTop}function zn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Wn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=N(e.measure,A("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function Gn(e){return $-e.display.nativeBarWidth}function Yn(e){return e.display.scroller.clientWidth-Gn(e)-e.display.barWidth}function Kn(e){return e.display.scroller.clientHeight-Gn(e)-e.display.barHeight}function Qn(e,t,n){var r=e.options.lineWrapping,i=r&&Yn(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),s=0;s<a.length-1;s++){var l=a[s],c=a[s+1];Math.abs(l.bottom-c.bottom)>2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Xn(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(et(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function Jn(e,t){var n=et(t=Xt(t)),r=e.display.externalMeasured=new xn(e.doc,t,n);r.lineN=n;var i=r.built=hn(e,r);return r.text=i.pre,N(e.display.lineMeasure,i.pre),r}function Zn(e,t,n,r){return nr(e,tr(e,t),n,r)}function er(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Rr(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function tr(e,t){var n=et(t),r=er(e,n);r&&!r.text?r=null:r&&r.changes&&(Dn(e,r,n,Dr(e)),e.curOp.forceUpdate=!0),r||(r=Jn(e,t));var i=Xn(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function nr(e,t,n,r,i){t.before&&(n=-1);var o,a=n+(r||"");return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Qn(e,t.view,t.rect),t.hasHeights=!0),(o=sr(e,t,n,r)).bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var rr,ir={left:0,right:0,top:0,bottom:0};function or(e,t,n){for(var r,i,o,a,s,l,c=0;c<e.length;c+=3)if(s=e[c],l=e[c+1],t<s?(i=0,o=1,a="left"):t<l?o=1+(i=t-s):(c==e.length-3||t==l&&e[c+3]>t)&&(i=(o=l-s)-1,t>=l&&(a="right")),null!=i){if(r=e[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],a="left";if("right"==n&&i==l-s)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)r=e[(c+=3)+2],a="right";break}return{node:r,start:i,end:o,collapse:a,coverStart:s,coverEnd:l}}function ar(e,t){var n=ir;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;i>=0&&(n=e[i]).left==n.right;i--);return n}function sr(e,t,n,r){var i,o=or(t.map,n,r),l=o.node,c=o.start,u=o.end,d=o.collapse;if(3==l.nodeType){for(var f=0;f<4;f++){for(;c&&oe(t.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u<o.coverEnd&&oe(t.line.text.charAt(o.coverStart+u));)++u;if((i=a&&s<9&&0==c&&u==o.coverEnd-o.coverStart?l.parentNode.getBoundingClientRect():ar(k(l,c,u).getClientRects(),r)).left||i.right||0==c)break;u=c,c-=1,d="right"}a&&s<11&&(i=lr(e.display.measure,i))}else{var p;c>0&&(d=r="right"),i=e.options.lineWrapping&&(p=l.getClientRects()).length>1?p["right"==r?p.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!i||!i.left&&!i.right)){var h=l.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+Ar(e.display),top:h.top,bottom:h.bottom}:ir}for(var m=i.top-t.rect.top,v=i.bottom-t.rect.top,g=(m+v)/2,y=t.view.measure.heights,b=0;b<y.length-1&&!(g<y[b]);b++);var E=b?y[b-1]:0,x=y[b],w={left:("right"==d?i.right:i.left)-t.rect.left,right:("left"==d?i.left:i.right)-t.rect.left,top:E,bottom:x};return i.left||i.right||(w.bogus=!0),e.options.singleCursorHeightPerLine||(w.rtop=m,w.rbottom=v),w}function lr(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Pe(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}function cr(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function ur(e){e.display.externalMeasure=null,_(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)cr(e.display.view[t])}function dr(e){ur(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function fr(){return u&&v?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function pr(){return u&&v?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function hr(e){var t=Xt(e).widgets,n=0;if(t)for(var r=0;r<t.length;++r)t[r].above&&(n+=Un(t[r]));return n}function mr(e,t,n,r,i){if(!i){var o=hr(t);n.top+=o,n.bottom+=o}if("line"==r)return n;r||(r="local");var a=on(t);if("local"==r?a+=qn(e.display):a-=e.display.viewOffset,"page"==r||"window"==r){var s=e.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==r?0:pr());var l=s.left+("window"==r?0:fr());n.left+=l,n.right+=l}return n.top+=a,n.bottom+=a,n}function vr(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=fr(),i-=pr();else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:r-a.left,top:i-a.top}}function gr(e,t,n,r,i){return r||(r=Qe(e.doc,t.line)),mr(e,r,Zn(e,r,t.ch,i),n)}function yr(e,t,n,r,i,o){function a(t,a){var s=nr(e,i,t,a?"right":"left",o);return a?s.left=s.right:s.right=s.left,mr(e,r,s,n)}r=r||Qe(e.doc,t.line),i||(i=tr(e,r));var s=fe(r,e.doc.direction),l=t.ch,c=t.sticky;if(l>=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(e,t,n){return a(n?e-1:e,1==s[t].level!=n)}var d=ue(s,l,c),f=ce,p=u(l,d,"before"==c);return null!=f&&(p.other=u(l,f,"before"!=c)),p}function br(e,t){var n=0;t=dt(e.doc,t),e.options.lineWrapping||(n=Ar(e.display)*t.ch);var r=Qe(e.doc,t.line),i=on(r)+qn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Er(e,t,n,r,i){var o=it(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function xr(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Er(r.first,0,null,-1,-1);var i=tt(r,n),o=r.first+r.size-1;if(i>o)return Er(r.first+r.size-1,Qe(r,o).text.length,null,1,1);t<0&&(t=0);for(var a=Qe(r,i);;){var s=kr(e,a,i,t,n),l=Kt(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==i)return c;a=Qe(r,i=c.line)}}function wr(e,t,n,r){r-=hr(t);var i=t.text.length,o=se((function(t){return nr(e,n,t-1).bottom<=r}),i,0);return{begin:o,end:i=se((function(t){return nr(e,n,t).top>r}),o,i)}}function Tr(e,t,n,r){return n||(n=tr(e,t)),wr(e,t,n,mr(e,t,nr(e,n,r),"line").top)}function Cr(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function kr(e,t,n,r,i){i-=on(t);var o=tr(e,t),a=hr(t),s=0,l=t.text.length,c=!0,u=fe(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?_r:Sr)(e,t,n,o,u,r,i);s=(c=1!=d.level)?d.from:d.to-1,l=c?d.to:d.from-1}var f,p,h=null,m=null,v=se((function(t){var n=nr(e,o,t);return n.top+=a,n.bottom+=a,!!Cr(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(h=t,m=n),!0)}),s,l),g=!1;if(m){var y=r-m.left<m.right-r,b=y==c;v=h+(b?0:1),p=b?"after":"before",f=y?m.left:m.right}else{c||v!=l&&v!=s||v++,p=0==v?"after":v==t.text.length?"before":nr(e,o,v-(c?1:0)).bottom+a<=i==c?"after":"before";var E=yr(e,it(n,v,p),"line",t,o);f=E.left,g=i<E.top?-1:i>=E.bottom?1:0}return Er(n,v=ae(t.text,v,1),p,g,r-f)}function Sr(e,t,n,r,i,o,a){var s=se((function(s){var l=i[s],c=1!=l.level;return Cr(yr(e,it(n,c?l.to:l.from,c?"before":"after"),"line",t,r),o,a,!0)}),0,i.length-1),l=i[s];if(s>0){var c=1!=l.level,u=yr(e,it(n,c?l.from:l.to,c?"after":"before"),"line",t,r);Cr(u,o,a,!0)&&u.top>a&&(l=i[s-1])}return l}function _r(e,t,n,r,i,o,a){var s=wr(e,t,r,a),l=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,f=0;f<i.length;f++){var p=i[f];if(!(p.from>=c||p.to<=l)){var h=nr(e,r,1!=p.level?Math.min(c,p.to)-1:Math.max(l,p.from)).right,m=h<o?o-h+1e9:h-o;(!u||d>m)&&(u=p,d=m)}}return u||(u=i[i.length-1]),u.from<l&&(u={from:l,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function Nr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==rr){rr=A("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)rr.appendChild(document.createTextNode("x")),rr.appendChild(A("br"));rr.appendChild(document.createTextNode("x"))}N(e.measure,rr);var n=rr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),_(e.measure),n||1}function Ar(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=A("span","xxxxxxxxxx"),n=A("pre",[t],"CodeMirror-line-like");N(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Dr(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=e.display.gutterSpecs[a].className;n[s]=o.offsetLeft+o.clientLeft+i,r[s]=o.clientWidth}return{fixedPos:Ir(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Ir(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Or(e){var t=Nr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Ar(e.display)-3);return function(i){if(nn(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return n?o+(Math.ceil(i.text.length/r)||1)*t:o+t}}function Lr(e){var t=e.doc,n=Or(e);t.iter((function(e){var t=n(e);t!=e.height&&Ze(e,t)}))}function Fr(e,t,n,r){var i=e.display;if(!n&&"true"==Se(t).getAttribute("cm-not-content"))return null;var o,a,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,a=t.clientY-s.top}catch(d){return null}var l,c=xr(e,o,a);if(r&&c.xRel>0&&(l=Qe(e.doc,c.line).text).length==c.ch){var u=j(l,l.length,e.options.tabSize)-l.length;c=it(c.line,Math.max(0,Math.round((o-Wn(e.display).left)/Ar(e.display))-u))}return c}function Rr(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function Mr(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)At&&en(e.doc,t)<i.viewTo&&jr(e);else if(n<=i.viewFrom)At&&tn(e.doc,n+r)>i.viewFrom?jr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)jr(e);else if(t<=i.viewFrom){var o=Vr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):jr(e)}else if(n>=i.viewTo){var a=Vr(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):jr(e)}else{var s=Vr(e,t,t,-1),l=Vr(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(wn(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):jr(e)}var c=i.externalMeasured;c&&(n<c.lineN?c.lineN+=r:t<c.lineN+c.size&&(i.externalMeasured=null))}function Pr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[Rr(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==B(a,n)&&a.push(n)}}}function jr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Vr(e,t,n,r){var i,o=Rr(e,t),a=e.display.view;if(!At||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=e.display.viewFrom,l=0;l<o;l++)s+=a[l].size;if(s!=t){if(r>0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,n+=i}for(;en(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function Br(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=wn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=wn(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Rr(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(wn(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,Rr(e,n)))),r.viewTo=n}function $r(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function Ur(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Hr(e,t){void 0===t&&(t=!0);var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),a=e.options.$customCursor;a&&(t=!0);for(var s=0;s<n.sel.ranges.length;s++)if(t||s!=n.sel.primIndex){var l=n.sel.ranges[s];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var c=l.empty();if(a){var u=a(e,l);u&&qr(e,u,i)}else(c||e.options.showCursorWhenSelecting)&&qr(e,l.head,i);c||Wr(e,l,o)}}return r}function qr(e,t,n){var r=yr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(A("div"," ","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var o=gr(e,t,"div",null,null),a=o.right-o.left;i.style.width=(a>0?a:e.defaultCharWidth())+"px"}if(r.other){var s=n.appendChild(A("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));s.style.display="",s.style.left=r.other.left+"px",s.style.top=r.other.top+"px",s.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function zr(e,t){return e.top-t.top||e.left-t.left}function Wr(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),a=Wn(e.display),s=a.left,l=Math.max(r.sizerWidth,Yn(e)-r.sizer.offsetLeft)-a.right,c="ltr"==i.direction;function u(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),o.appendChild(A("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?l-e:n)+"px;\n height: "+(r-t)+"px"))}function d(t,n,r){var o,a,d=Qe(i,t),f=d.text.length;function p(n,r){return gr(e,it(t,n),"div",d,r)}function h(t,n,r){var i=Tr(e,d,null,t),o="ltr"==n==("after"==r)?"left":"right";return p("after"==r?i.begin:i.end-(/\s/.test(d.text.charAt(i.end-1))?2:1),o)[o]}var m=fe(d,i.direction);return le(m,n||0,null==r?f:r,(function(e,t,i,d){var v="ltr"==i,g=p(e,v?"left":"right"),y=p(t-1,v?"right":"left"),b=null==n&&0==e,E=null==r&&t==f,x=0==d,w=!m||d==m.length-1;if(y.top-g.top<=3){var T=(c?E:b)&&w,C=(c?b:E)&&x?s:(v?g:y).left,k=T?l:(v?y:g).right;u(C,g.top,k-C,g.bottom)}else{var S,_,N,A;v?(S=c&&b&&x?s:g.left,_=c?l:h(e,i,"before"),N=c?s:h(t,i,"after"),A=c&&E&&w?l:y.right):(S=c?h(e,i,"before"):s,_=!c&&b&&x?l:g.right,N=!c&&E&&w?s:y.left,A=c?h(t,i,"after"):l),u(S,g.top,_-S,g.bottom),g.bottom<y.top&&u(s,g.bottom,null,y.top),u(N,y.top,A-N,y.bottom)}(!o||zr(g,o)<0)&&(o=g),zr(y,o)<0&&(o=y),(!a||zr(g,a)<0)&&(a=g),zr(y,a)<0&&(a=y)})),{start:o,end:a}}var f=t.from(),p=t.to();if(f.line==p.line)d(f.line,f.ch,p.ch);else{var h=Qe(i,f.line),m=Qe(i,p.line),v=Xt(h)==Xt(m),g=d(f.line,f.ch,v?h.text.length+1:null).end,y=d(p.line,v?0:null,p.ch).start;v&&(g.top<y.top-2?(u(g.right,g.top,null,g.bottom),u(s,y.top,y.left,y.bottom)):u(g.right,g.top,y.left-g.right,g.bottom)),g.bottom<y.top&&u(s,g.bottom,null,y.top)}n.appendChild(o)}function Gr(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||Xr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Yr(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Qr(e))}function Kr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Xr(e))}),100)}function Qr(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ge(e,"focus",e,t),e.state.focused=!0,L(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),Gr(e))}function Xr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ge(e,"blur",e,t),e.state.focused=!1,S(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Jr(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,l=0;l<t.view.length;l++){var c=t.view[l],u=e.options.lineWrapping,d=void 0,f=0;if(!c.hidden){if(i+=c.line.height,a&&s<8){var p=c.node.offsetTop+c.node.offsetHeight;d=p-n,n=p}else{var h=c.node.getBoundingClientRect();d=h.bottom-h.top,!u&&c.text.firstChild&&(f=c.text.firstChild.getBoundingClientRect().right-h.left-1)}var m=c.line.height-d;if((m>.005||m<-.005)&&(i<r&&(o-=m),Ze(c.line,d),Zr(c.line),c.rest))for(var v=0;v<c.rest.length;v++)Zr(c.rest[v]);if(f>e.display.sizerWidth){var g=Math.ceil(f/Ar(e.display));g>e.display.maxLineLength&&(e.display.maxLineLength=g,e.display.maxLine=c.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function Zr(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function ei(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-qn(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=tt(t,r),a=tt(t,i);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;s<o?(o=s,a=tt(t,on(Qe(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=a&&(o=tt(t,on(Qe(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function ti(e,t){if(!ye(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!h){var o=A("div","",null,"position: absolute;\n top: "+(t.top-n.viewOffset-qn(e.display))+"px;\n height: "+(t.bottom-t.top+Gn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function ni(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==t.sticky?it(t.line,t.ch+1,"before"):t,t=t.ch?it(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var a=!1,s=yr(e,t),l=n&&n!=t?yr(e,n):s,c=ii(e,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(di(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(pi(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return i}function ri(e,t){var n=ii(e,t);null!=n.scrollTop&&di(e,n.scrollTop),null!=n.scrollLeft&&pi(e,n.scrollLeft)}function ii(e,t){var n=e.display,r=Nr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=Kn(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+zn(n),l=t.top<r,c=t.bottom>s-r;if(t.top<i)a.scrollTop=l?0:t.top;else if(t.bottom>i+o){var u=Math.min(t.top,(c?s:t.bottom)-o);u!=i&&(a.scrollTop=u)}var d=e.options.fixedGutter?0:n.gutters.offsetWidth,f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-d,p=Yn(e)-n.gutters.offsetWidth,h=t.right-t.left>p;return h&&(t.right=t.left+p),t.left<10?a.scrollLeft=0:t.left<f?a.scrollLeft=Math.max(0,t.left+d-(h?0:10)):t.right>p+f-3&&(a.scrollLeft=t.right+(h?0:10)-p),a}function oi(e,t){null!=t&&(ci(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function ai(e){ci(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function si(e,t,n){null==t&&null==n||ci(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function li(e,t){ci(e),e.curOp.scrollToPos=t}function ci(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,ui(e,br(e,t.from),br(e,t.to),t.margin))}function ui(e,t,n,r){var i=ii(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});si(e,i.scrollLeft,i.scrollTop)}function di(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||Ui(e,{top:t}),fi(e,t,!0),n&&Ui(e),Fi(e,100))}function fi(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function pi(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,Wi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function hi(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+zn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Gn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var mi=function(e,t,n){this.cm=n;var r=this.vert=A("div",[A("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=A("div",[A("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),he(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),he(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};mi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},mi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},mi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},mi.prototype.zeroWidthHack=function(){var e=y&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new V,this.disableVert=new V},mi.prototype.enableZeroWidthBar=function(e,t,n){function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}e.style.pointerEvents="auto",t.set(1e3,r)},mi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var vi=function(){};function gi(e,t){t||(t=hi(e));var n=e.display.barWidth,r=e.display.barHeight;yi(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Jr(e),yi(e,hi(e)),n=e.display.barWidth,r=e.display.barHeight}function yi(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}vi.prototype.update=function(){return{bottom:0,right:0}},vi.prototype.setScrollLeft=function(){},vi.prototype.setScrollTop=function(){},vi.prototype.clear=function(){};var bi={native:mi,null:vi};function Ei(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&S(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new bi[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),he(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?pi(e,t):di(e,t)}),e),e.display.scrollbars.addClass&&L(e.display.wrapper,e.display.scrollbars.addClass)}var xi=0;function wi(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++xi,markArrays:null},Cn(e.curOp)}function Ti(e){var t=e.curOp;t&&Sn(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;Ci(e)}))}function Ci(e){for(var t=e.ops,n=0;n<t.length;n++)ki(t[n]);for(var r=0;r<t.length;r++)Si(t[r]);for(var i=0;i<t.length;i++)_i(t[i]);for(var o=0;o<t.length;o++)Ni(t[o]);for(var a=0;a<t.length;a++)Ai(t[a])}function ki(e){var t=e.cm,n=t.display;Pi(t),e.updateMaxLine&&sn(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Mi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Si(e){e.updatedDisplay=e.mustUpdate&&Bi(e.cm,e.update)}function _i(e){var t=e.cm,n=t.display;e.updatedDisplay&&Jr(t),e.barMeasure=hi(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Zn(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Gn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Yn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Ni(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&pi(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==O();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&gi(t,e.barMeasure),e.updatedDisplay&&zi(t,e.barMeasure),e.selectionChanged&&Gr(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Yr(e.cm)}function Ai(e){var t=e.cm,n=t.display,r=t.doc;e.updatedDisplay&&$i(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&fi(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&pi(t,e.scrollLeft,!0,!0),e.scrollToPos&&ti(t,ni(t,dt(r,e.scrollToPos.from),dt(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var a=0;a<i.length;++a)i[a].lines.length||ge(i[a],"hide");if(o)for(var s=0;s<o.length;++s)o[s].lines.length&&ge(o[s],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ge(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Di(e,t){if(e.curOp)return t();wi(e);try{return t()}finally{Ti(e)}}function Ii(e,t){return function(){if(e.curOp)return t.apply(e,arguments);wi(e);try{return t.apply(e,arguments)}finally{Ti(e)}}}function Oi(e){return function(){if(this.curOp)return e.apply(this,arguments);wi(this);try{return e.apply(this,arguments)}finally{Ti(this)}}}function Li(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);wi(t);try{return e.apply(this,arguments)}finally{Ti(t)}}}function Fi(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,M(Ri,e))}function Ri(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=yt(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(r.line>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength?We(t.mode,r.state):null,l=vt(e,o,r,!0);s&&(r.state=s),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),f=0;!d&&f<a.length;++f)d=a[f]!=o.styles[f];d&&i.push(r.line),o.stateAfter=r.save(),r.nextLine()}else o.text.length<=e.options.maxHighlightLength&&bt(e,o.text,r),o.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return Fi(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Di(e,(function(){for(var t=0;t<i.length;t++)Pr(e,i[t],"text")}))}}var Mi=function(e,t,n){var r=e.display;this.viewport=t,this.visible=ei(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Yn(e),this.force=n,this.dims=Dr(e),this.events=[]};function Pi(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Gn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Gn(e)+"px",t.scrollbarsClipped=!0)}function ji(e){if(e.hasFocus())return null;var t=O();if(!t||!I(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&I(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function Vi(e){if(e&&e.activeElt&&e.activeElt!=O()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&I(document.body,e.anchorNode)&&I(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}function Bi(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return jr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==$r(e))return!1;Gi(e)&&(jr(e),t.dims=Dr(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),At&&(o=en(e.doc,o),a=tn(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Br(e,o,a),n.viewOffset=on(Qe(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var l=$r(e);if(!s&&0==l&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=ji(e);return l>4&&(n.lineDiv.style.display="none"),Hi(e,n.updateLineNumbers,t.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Vi(c),_(n.cursorDiv),_(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Fi(e,400)),n.updateLineNumbers=null,!0}function $i(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Yn(e))r&&(t.visible=ei(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+zn(e.display)-Kn(e),n.top)}),t.visible=ei(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!Bi(e,t))break;Jr(e);var i=hi(e);Ur(e),gi(e,i),zi(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Ui(e,t){var n=new Mi(e,t);if(Bi(e,n)){Jr(e),$i(e,n);var r=hi(e);Ur(e),gi(e,r),zi(e,r),n.finish()}}function Hi(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function s(t){var n=t.nextSibling;return l&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=r.view,u=r.viewFrom,d=0;d<c.length;d++){var f=c[d];if(f.hidden);else if(f.node&&f.node.parentNode==o){for(;a!=f.node;)a=s(a);var p=i&&null!=t&&t<=u&&f.lineNumber;f.changes&&(B(f.changes,"gutter")>-1&&(p=!1),Dn(e,f,u,n)),p&&(_(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(rt(e.options,u)))),a=f.node.nextSibling}else{var h=jn(e,f,u,n);o.insertBefore(h,a)}u+=f.size}for(;a;)a=s(a)}function qi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Nn(e,"gutterChanged",e)}function zi(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Gn(e)+"px"}function Wi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=Ir(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=o),n[a].gutterBackground&&(n[a].gutterBackground.style.left=o));var s=n[a].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function Gi(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=rt(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(A("div",[A("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-a)+1,r.lineNumWidth=r.lineNumInnerWidth+a,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",qi(e.display),!0}return!1}function Yi(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var o=e[i],a=null;if("string"!=typeof o&&(a=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!t)continue;r=!0}n.push({className:o,style:a})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function Ki(e){var t=e.gutters,n=e.gutterSpecs;_(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],o=i.className,a=i.style,s=t.appendChild(A("div",null,"CodeMirror-gutter "+o));a&&(s.style.cssText=a),"CodeMirror-linenumbers"==o&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",qi(e)}function Qi(e){Ki(e.display),Mr(e),Wi(e)}function Xi(e,t,r,i){var o=this;this.input=r,o.scrollbarFiller=A("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=A("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=D("div",null,"CodeMirror-code"),o.selectionDiv=A("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=A("div",null,"CodeMirror-cursors"),o.measure=A("div",null,"CodeMirror-measure"),o.lineMeasure=A("div",null,"CodeMirror-measure"),o.lineSpace=D("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var c=D("div",[o.lineSpace],"CodeMirror-lines");o.mover=A("div",[c],null,"position: relative"),o.sizer=A("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=A("div",null,null,"position: absolute; height: "+$+"px; width: 1px;"),o.gutters=A("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=A("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=A("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),o.wrapper.setAttribute("translate","no"),a&&s<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),l||n&&g||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=Yi(i.gutters,i.lineNumbers),Ki(o),r.init(o)}Mi.prototype.signal=function(e,t){Ee(e,t)&&this.events.push(arguments)},Mi.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ge.apply(null,this.events[e])};var Ji=0,Zi=null;function eo(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function to(e){var t=eo(e);return t.x*=Zi,t.y*=Zi,t}function no(e,t){var r=eo(t),i=r.x,o=r.y,a=Zi;0===t.deltaMode&&(i=t.deltaX,o=t.deltaY,a=1);var s=e.display,c=s.scroller,u=c.scrollWidth>c.clientWidth,f=c.scrollHeight>c.clientHeight;if(i&&u||o&&f){if(o&&y&&l)e:for(var p=t.target,h=s.view;p!=c;p=p.parentNode)for(var m=0;m<h.length;m++)if(h[m].node==p){e.display.currentWheelTarget=p;break e}if(i&&!n&&!d&&null!=a)return o&&f&&di(e,Math.max(0,c.scrollTop+o*a)),pi(e,Math.max(0,c.scrollLeft+i*a)),(!o||o&&f)&&we(t),void(s.wheelStartX=null);if(o&&null!=a){var v=o*a,g=e.doc.scrollTop,b=g+s.wrapper.clientHeight;v<0?g=Math.max(0,g+v-50):b=Math.min(e.doc.height,b+v+50),Ui(e,{top:g,bottom:b})}Ji<20&&0!==t.deltaMode&&(null==s.wheelStartX?(s.wheelStartX=c.scrollLeft,s.wheelStartY=c.scrollTop,s.wheelDX=i,s.wheelDY=o,setTimeout((function(){if(null!=s.wheelStartX){var e=c.scrollLeft-s.wheelStartX,t=c.scrollTop-s.wheelStartY,n=t&&s.wheelDY&&t/s.wheelDY||e&&s.wheelDX&&e/s.wheelDX;s.wheelStartX=s.wheelStartY=null,n&&(Zi=(Zi*Ji+n)/(Ji+1),++Ji)}}),200)):(s.wheelDX+=i,s.wheelDY+=o))}}a?Zi=-.53:n?Zi=15:u?Zi=-.7:f&&(Zi=-1/3);var ro=function(e,t){this.ranges=e,this.primIndex=t};ro.prototype.primary=function(){return this.ranges[this.primIndex]},ro.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!at(n.anchor,r.anchor)||!at(n.head,r.head))return!1}return!0},ro.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new io(st(this.ranges[t].anchor),st(this.ranges[t].head));return new ro(e,this.primIndex)},ro.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},ro.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(ot(t,r.from())>=0&&ot(e,r.to())<=0)return n}return-1};var io=function(e,t){this.anchor=e,this.head=t};function oo(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return ot(e.from(),t.from())})),n=B(t,i);for(var o=1;o<t.length;o++){var a=t[o],s=t[o-1],l=ot(s.to(),a.from());if(r&&!a.empty()?l>0:l>=0){var c=ct(s.from(),a.from()),u=lt(s.to(),a.to()),d=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,t.splice(--o,2,new io(d?u:c,d?c:u))}}return new ro(t,n)}function ao(e,t){return new ro([new io(e,t||e)],0)}function so(e){return e.text?it(e.from.line+e.text.length-1,K(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function lo(e,t){if(ot(e,t.from)<0)return e;if(ot(e,t.to)<=0)return so(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=so(t).ch-t.to.ch),it(n,r)}function co(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new io(lo(i.anchor,t),lo(i.head,t)))}return oo(e.cm,n,e.sel.primIndex)}function uo(e,t,n){return e.line==t.line?it(n.line,e.ch-t.ch+n.ch):it(n.line+(e.line-t.line),e.ch)}function fo(e,t,n){for(var r=[],i=it(e.first,0),o=i,a=0;a<t.length;a++){var s=t[a],l=uo(s.from,i,o),c=uo(so(s),i,o);if(i=s.to,o=c,"around"==n){var u=e.sel.ranges[a],d=ot(u.head,u.anchor)<0;r[a]=new io(d?c:l,d?l:c)}else r[a]=new io(l,l)}return new ro(r,e.sel.primIndex)}function po(e){e.doc.mode=He(e.options,e.doc.modeOption),ho(e)}function ho(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Fi(e,100),e.state.modeGen++,e.curOp&&Mr(e)}function mo(e,t){return 0==t.from.ch&&0==t.to.ch&&""==K(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function vo(e,t,n,r){function i(e){return n?n[e]:null}function o(e,n,i){cn(e,n,i,r),Nn(e,"change",e,t)}function a(e,t){for(var n=[],o=e;o<t;++o)n.push(new ln(c[o],i(o),r));return n}var s=t.from,l=t.to,c=t.text,u=Qe(e,s.line),d=Qe(e,l.line),f=K(c),p=i(c.length-1),h=l.line-s.line;if(t.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(mo(e,t)){var m=a(0,c.length-1);o(d,d.text,p),h&&e.remove(s.line,h),m.length&&e.insert(s.line,m)}else if(u==d)if(1==c.length)o(u,u.text.slice(0,s.ch)+f+u.text.slice(l.ch),p);else{var v=a(1,c.length-1);v.push(new ln(f+u.text.slice(l.ch),p,r)),o(u,u.text.slice(0,s.ch)+c[0],i(0)),e.insert(s.line+1,v)}else if(1==c.length)o(u,u.text.slice(0,s.ch)+c[0]+d.text.slice(l.ch),i(0)),e.remove(s.line+1,h);else{o(u,u.text.slice(0,s.ch)+c[0],i(0)),o(d,f+d.text.slice(l.ch),p);var g=a(1,c.length-1);h>1&&e.remove(s.line+1,h-1),e.insert(s.line+1,g)}Nn(e,"change",e,t)}function go(e,t,n){function r(e,i,o){if(e.linked)for(var a=0;a<e.linked.length;++a){var s=e.linked[a];if(s.doc!=i){var l=o&&s.sharedHist;n&&!l||(t(s.doc,l),r(s.doc,e,l))}}}r(e,null,!0)}function yo(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Lr(e),po(e),bo(e),e.options.direction=t.direction,e.options.lineWrapping||sn(e),e.options.mode=t.modeOption,Mr(e)}function bo(e){("rtl"==e.doc.direction?L:S)(e.display.lineDiv,"CodeMirror-rtl")}function Eo(e){Di(e,(function(){bo(e),Mr(e)}))}function xo(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function wo(e,t){var n={from:st(t.from),to:so(t),text:Xe(e,t.from,t.to)};return Ao(e,n,t.from.line,t.to.line+1),go(e,(function(e){return Ao(e,n,t.from.line,t.to.line+1)}),!0),n}function To(e){for(;e.length&&K(e).ranges;)e.pop()}function Co(e,t){return t?(To(e.done),K(e.done)):e.done.length&&!K(e.done).ranges?K(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),K(e.done)):void 0}function ko(e,t,n,r){var i=e.history;i.undone.length=0;var o,a,s=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=Co(i,i.lastOp==r)))a=K(o.changes),0==ot(t.from,t.to)&&0==ot(t.from,a.to)?a.to=so(t):o.changes.push(wo(e,t));else{var l=K(i.done);for(l&&l.ranges||No(e.sel,i.done),o={changes:[wo(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||ge(e,"historyAdded")}function So(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function _o(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||So(e,o,K(i.done),t))?i.done[i.done.length-1]=t:No(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&To(i.undone)}function No(e,t){var n=K(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Ao(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o}))}function Do(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function Io(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(Do(n[i]));return r}function Oo(e,t){var n=Io(e,t),r=jt(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],a=r[i];if(o&&a)e:for(var s=0;s<a.length;++s){for(var l=a[s],c=0;c<o.length;++c)if(o[c].marker==l.marker)continue e;o.push(l)}else a&&(n[i]=a)}return n}function Lo(e,t,n){for(var r=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)r.push(n?ro.prototype.deepCopy.call(o):o);else{var a=o.changes,s=[];r.push({changes:s});for(var l=0;l<a.length;++l){var c=a[l],u=void 0;if(s.push({from:c.from,to:c.to,text:c.text}),t)for(var d in c)(u=d.match(/^spans_(\d+)$/))&&B(t,Number(u[1]))>-1&&(K(s)[d]=c[d],delete c[d])}}}return r}function Fo(e,t,n,r){if(r){var i=e.anchor;if(n){var o=ot(t,i)<0;o!=ot(n,i)<0?(i=t,t=n):o!=ot(t,n)<0&&(t=n)}return new io(i,t)}return new io(n||t,t)}function Ro(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),$o(e,new ro([Fo(e.sel.primary(),t,n,i)],0),r)}function Mo(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)r[o]=Fo(e.sel.ranges[o],t[o],null,i);$o(e,oo(e.cm,r,e.sel.primIndex),n)}function Po(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,$o(e,oo(e.cm,i,e.sel.primIndex),r)}function jo(e,t,n,r){$o(e,ao(t,n),r)}function Vo(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new io(dt(e,t[n].anchor),dt(e,t[n].head))},origin:n&&n.origin};return ge(e,"beforeSelectionChange",e,r),e.cm&&ge(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?oo(e.cm,r.ranges,r.ranges.length-1):t}function Bo(e,t,n){var r=e.history.done,i=K(r);i&&i.ranges?(r[r.length-1]=t,Uo(e,t,n)):$o(e,t,n)}function $o(e,t,n){Uo(e,t,n),_o(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function Uo(e,t,n){(Ee(e,"beforeSelectionChange")||e.cm&&Ee(e.cm,"beforeSelectionChange"))&&(t=Vo(e,t,n));var r=n&&n.bias||(ot(t.primary().head,e.sel.primary().head)<0?-1:1);Ho(e,zo(e,t,r,!0)),n&&!1===n.scroll||!e.cm||"nocursor"==e.cm.getOption("readOnly")||ai(e.cm)}function Ho(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,be(e.cm)),Nn(e,"cursorActivity",e))}function qo(e){Ho(e,zo(e,e.sel,null,!1))}function zo(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],l=Go(e,a.anchor,s&&s.anchor,n,r),c=Go(e,a.head,s&&s.head,n,r);(i||l!=a.anchor||c!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new io(l,c))}return i?oo(e.cm,i,t.primIndex):t}function Wo(e,t,n,r,i){var o=Qe(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var s=o.markedSpans[a],l=s.marker,c="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,u="selectRight"in l?!l.selectRight:l.inclusiveRight;if((null==s.from||(c?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(u?s.to>=t.ch:s.to>t.ch))){if(i&&(ge(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var d=l.find(r<0?1:-1),f=void 0;if((r<0?u:c)&&(d=Yo(e,d,-r,d&&d.line==t.line?o:null)),d&&d.line==t.line&&(f=ot(d,n))&&(r<0?f<0:f>0))return Wo(e,d,t,r,i)}var p=l.find(r<0?-1:1);return(r<0?c:u)&&(p=Yo(e,p,r,p.line==t.line?o:null)),p?Wo(e,p,t,r,i):null}}return t}function Go(e,t,n,r,i){var o=r||1,a=Wo(e,t,n,o,i)||!i&&Wo(e,t,n,o,!0)||Wo(e,t,n,-o,i)||!i&&Wo(e,t,n,-o,!0);return a||(e.cantEdit=!0,it(e.first,0))}function Yo(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?dt(e,it(t.line-1)):null:n>0&&t.ch==(r||Qe(e,t.line)).text.length?t.line<e.first+e.size-1?it(t.line+1,0):null:new it(t.line,t.ch+n)}function Ko(e){e.setSelection(it(e.firstLine(),0),it(e.lastLine()),H)}function Qo(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,i,o){t&&(r.from=dt(e,t)),n&&(r.to=dt(e,n)),i&&(r.text=i),void 0!==o&&(r.origin=o)}),ge(e,"beforeChange",e,r),e.cm&&ge(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function Xo(e,t,n){if(e.cm){if(!e.cm.curOp)return Ii(e.cm,Xo)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(Ee(e,"beforeChange")||e.cm&&Ee(e.cm,"beforeChange"))||(t=Qo(e,t,!0))){var r=Nt&&!n&&Bt(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)Jo(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else Jo(e,t)}}function Jo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=ot(t.from,t.to)){var n=co(e,t);ko(e,t,n,e.cm?e.cm.curOp.id:NaN),ta(e,t,n,jt(e,t));var r=[];go(e,(function(e,n){n||-1!=B(r,e.history)||(aa(e.history,t),r.push(e.history)),ta(e,t,null,jt(e,t))}))}}function Zo(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,a=e.sel,s="undo"==t?o.done:o.undone,l="undo"==t?o.undone:o.done,c=0;c<s.length&&(i=s[c],n?!i.ranges||i.equals(e.sel):i.ranges);c++);if(c!=s.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(!(i=s.pop()).ranges){if(r)return void s.push(i);break}if(No(i,l),n&&!i.equals(e.sel))return void $o(e,i,{clearRedo:!1});a=i}var u=[];No(a,l),l.push({changes:u,generation:o.generation}),o.generation=i.generation||++o.maxGeneration;for(var d=Ee(e,"beforeChange")||e.cm&&Ee(e.cm,"beforeChange"),f=function(n){var r=i.changes[n];if(r.origin=t,d&&!Qo(e,r,!1))return s.length=0,{};u.push(wo(e,r));var o=n?co(e,r):K(s);ta(e,r,o,Oo(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:so(r)});var a=[];go(e,(function(e,t){t||-1!=B(a,e.history)||(aa(e.history,r),a.push(e.history)),ta(e,r,null,Oo(e,r))}))},p=i.changes.length-1;p>=0;--p){var h=f(p);if(h)return h.v}}}}function ea(e,t){if(0!=t&&(e.first+=t,e.sel=new ro(Q(e.sel.ranges,(function(e){return new io(it(e.anchor.line+t,e.anchor.ch),it(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){Mr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)Pr(e.cm,r,"gutter")}}function ta(e,t,n,r){if(e.cm&&!e.cm.curOp)return Ii(e.cm,ta)(e,t,n,r);if(t.to.line<e.first)ea(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);ea(e,i),t={from:it(e.first,0),to:it(t.to.line+i,t.to.ch),text:[K(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:it(o,Qe(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Xe(e,t.from,t.to),n||(n=co(e,t)),e.cm?na(e.cm,t,r):vo(e,t,r),Uo(e,n,H),e.cantEdit&&Go(e,it(e.firstLine(),0))&&(e.cantEdit=!1)}}function na(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,s=!1,l=o.line;e.options.lineWrapping||(l=et(Xt(Qe(r,o.line))),r.iter(l,a.line+1,(function(e){if(e==i.maxLine)return s=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&be(e),vo(r,t,n,Or(e)),e.options.lineWrapping||(r.iter(l,o.line+t.text.length,(function(e){var t=an(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),_t(r,o.line),Fi(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?Mr(e):o.line!=a.line||1!=t.text.length||mo(e.doc,t)?Mr(e,o.line,a.line+1,c):Pr(e,o.line,"text");var u=Ee(e,"changes"),d=Ee(e,"change");if(d||u){var f={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&Nn(e,"change",e,f),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}function ra(e,t,n,r,i){var o;r||(r=n),ot(r,n)<0&&(n=(o=[r,n])[0],r=o[1]),"string"==typeof t&&(t=e.splitLines(t)),Xo(e,{from:n,to:r,text:t,origin:i})}function ia(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function oa(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var s=0;s<o.ranges.length;s++)ia(o.ranges[s].anchor,t,n,r),ia(o.ranges[s].head,t,n,r)}else{for(var l=0;l<o.changes.length;++l){var c=o.changes[l];if(n<c.from.line)c.from=it(c.from.line+r,c.from.ch),c.to=it(c.to.line+r,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function aa(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;oa(e.done,n,r,i),oa(e.undone,n,r,i)}function sa(e,t,n,r){var i=t,o=t;return"number"==typeof t?o=Qe(e,ut(e,t)):i=et(t),null==i?null:(r(o,i)&&e.cm&&Pr(e.cm,i,n),o)}function la(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function ca(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}io.prototype.from=function(){return ct(this.anchor,this.head)},io.prototype.to=function(){return lt(this.anchor,this.head)},io.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},la.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,un(i),Nn(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},ca.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var o=Math.min(t,i-e),a=r.height;if(r.removeInner(e,o),this.height-=a-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof la))){var s=[];this.collapse(s),this.children=[new la(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,s=a;s<i.lines.length;){var l=new la(i.lines.slice(s,s+=25));i.height-=l.height,this.children.splice(++r,0,l),l.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new ca(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=B(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new ca(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var ua=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};function da(e,t,n){on(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&oi(e,n)}function fa(e,t,n,r){var i=new ua(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),sa(e,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==i.insertAt?n.push(i):n.splice(Math.min(n.length,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!nn(e,t)){var r=on(t)<e.scrollTop;Ze(t,t.height+Un(i)),r&&oi(o,i.height),o.curOp.forceUpdate=!0}return!0})),o&&Nn(o,"lineWidgetAdded",o,i,"number"==typeof t?t:et(t)),i}ua.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=et(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=Un(this);Ze(n,Math.max(0,n.height-o)),e&&(Di(e,(function(){da(e,n,-o),Pr(e,r,"widget")})),Nn(e,"lineWidgetCleared",e,this,r))}},ua.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=Un(this)-t;i&&(nn(this.doc,r)||Ze(r,r.height+i),n&&Di(n,(function(){n.curOp.forceUpdate=!0,da(n,r,i),Nn(n,"lineWidgetChanged",n,e,et(r))})))},xe(ua);var pa=0,ha=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++pa};function ma(e,t,n,r,i){if(r&&r.shared)return ga(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return Ii(e.cm,ma)(e,t,n,r,i);var o=new ha(e,i),a=ot(t,n);if(r&&P(r,o,!1),a>0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=D("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Qt(e,t.line,t,n,o)||t.line!=n.line&&Qt(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");It()}o.addToHistory&&ko(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,c=e.cm;if(e.iter(l,n.line+1,(function(r){c&&o.collapsed&&!c.options.lineWrapping&&Xt(r)==c.display.maxLine&&(s=!0),o.collapsed&&l!=t.line&&Ze(r,0),Rt(r,new Ot(o,l==t.line?t.ch:null,l==n.line?n.ch:null),e.cm&&e.cm.curOp),++l})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){nn(e,t)&&Ze(t,0)})),o.clearOnEnter&&he(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(Dt(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++pa,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)Mr(c,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=t.line;u<=n.line;u++)Pr(c,u,"text");o.atomic&&qo(c.doc),Nn(c,"markerAdded",c,o)}return o}ha.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&wi(e),Ee(this,"clear")){var n=this.find();n&&Nn(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],s=Lt(a.markedSpans,this);e&&!this.collapsed?Pr(e,et(a),"text"):e&&(null!=s.to&&(i=et(a)),null!=s.from&&(r=et(a))),a.markedSpans=Ft(a.markedSpans,s),null==s.from&&this.collapsed&&!nn(this.doc,a)&&e&&Ze(a,Nr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var c=Xt(this.lines[l]),u=an(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Mr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&qo(e.doc)),e&&Nn(e,"markerCleared",e,this,r,i),t&&Ti(e),this.parent&&this.parent.clear()}},ha.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],a=Lt(o.markedSpans,this);if(null!=a.from&&(n=it(t?o:et(o),a.from),-1==e))return n;if(null!=a.to&&(r=it(t?o:et(o),a.to),1==e))return r}return n&&{from:n,to:r}},ha.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;t&&r&&Di(r,(function(){var i=t.line,o=et(t.line),a=er(r,o);if(a&&(cr(a),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!nn(n.doc,i)&&null!=n.height){var s=n.height;n.height=null;var l=Un(n)-s;l&&Ze(i,i.height+l)}Nn(r,"markerChanged",r,e)}))},ha.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=B(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ha.prototype.detachLine=function(e){if(this.lines.splice(B(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},xe(ha);var va=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function ga(e,t,n,r,i){(r=P(r)).shared=!1;var o=[ma(e,t,n,r,i)],a=o[0],s=r.widgetNode;return go(e,(function(e){s&&(r.widgetNode=s.cloneNode(!0)),o.push(ma(e,dt(e,t),dt(e,n),r,i));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;a=K(o)})),new va(o,a)}function ya(e){return e.findMarks(it(e.first,0),e.clipPos(it(e.lastLine())),(function(e){return e.parent}))}function ba(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(ot(o,a)){var s=ma(e,o,a,r.primary,r.primary.type);r.markers.push(s),s.parent=r}}}function Ea(e){for(var t=function(t){var n=e[t],r=[n.primary.doc];go(n.primary.doc,(function(e){return r.push(e)}));for(var i=0;i<n.markers.length;i++){var o=n.markers[i];-1==B(r,o.doc)&&(o.parent=null,n.markers.splice(i--,1))}},n=0;n<e.length;n++)t(n)}va.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Nn(this,"clear")}},va.prototype.find=function(e,t){return this.primary.find(e,t)},xe(va);var xa=0,wa=function(e,t,n,r,i){if(!(this instanceof wa))return new wa(e,t,n,r,i);null==n&&(n=0),ca.call(this,[new la([new ln("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=it(n,0);this.sel=ao(o),this.history=new xo(null),this.id=++xa,this.modeOption=t,this.lineSep=r,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),vo(this,{from:o,to:o,text:e}),$o(this,ao(o),H)};wa.prototype=Z(ca.prototype,{constructor:wa,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Je(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:Li((function(e){var t=it(this.first,0),n=this.first+this.size-1;Xo(this,{from:t,to:it(n,Qe(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&si(this.cm,0,0),$o(this,ao(t),H)})),replaceRange:function(e,t,n,r){ra(this,e,t=dt(this,t),n=n?dt(this,n):t,r)},getRange:function(e,t,n){var r=Xe(this,dt(this,e),dt(this,t));return!1===n?r:""===n?r.join(""):r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(nt(this,e))return Qe(this,e)},getLineNumber:function(e){return et(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Qe(this,e)),Xt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return dt(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Li((function(e,t,n){jo(this,dt(this,"number"==typeof e?it(e,t||0):e),null,n)})),setSelection:Li((function(e,t,n){jo(this,dt(this,e),dt(this,t||e),n)})),extendSelection:Li((function(e,t,n){Ro(this,dt(this,e),t&&dt(this,t),n)})),extendSelections:Li((function(e,t){Mo(this,pt(this,e),t)})),extendSelectionsBy:Li((function(e,t){Mo(this,pt(this,Q(this.sel.ranges,e)),t)})),setSelections:Li((function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new io(dt(this,e[i].anchor),dt(this,e[i].head||e[i].anchor));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),$o(this,oo(this.cm,r,t),n)}})),addSelection:Li((function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new io(dt(this,e),dt(this,t||e))),$o(this,oo(this.cm,r,r.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=Xe(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=Xe(this,n[r].from(),n[r].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:Li((function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];r[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:n}}for(var s=t&&"end"!=t&&fo(this,r,t),l=r.length-1;l>=0;l--)Xo(this,r[l]);s?Bo(this,s):this.cm&&ai(this.cm)})),undo:Li((function(){Zo(this,"undo")})),redo:Li((function(){Zo(this,"redo")})),undoSelection:Li((function(){Zo(this,"undo",!0)})),redoSelection:Li((function(){Zo(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new xo(this.history),go(this,(function(t){return t.history=e.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Lo(this.history.done),undone:Lo(this.history.undone)}},setHistory:function(e){var t=this.history=new xo(this.history);t.done=Lo(e.done.slice(0),null,!0),t.undone=Lo(e.undone.slice(0),null,!0)},setGutterMarker:Li((function(e,t,n){return sa(this,e,"gutter",(function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&re(r)&&(e.gutterMarkers=null),!0}))})),clearGutter:Li((function(e){var t=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&sa(t,n,"gutter",(function(){return n.gutterMarkers[e]=null,re(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!nt(this,e))return null;if(t=e,!(e=Qe(this,e)))return null}else if(null==(t=et(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Li((function(e,t,n){return sa(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(C(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0}))})),removeLineClass:Li((function(e,t,n){return sa(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[r];if(!i)return!1;if(null==n)e[r]=null;else{var o=i.match(C(n));if(!o)return!1;var a=o.index+o[0].length;e[r]=i.slice(0,o.index)+(o.index&&a!=i.length?" ":"")+i.slice(a)||null}return!0}))})),addLineWidget:Li((function(e,t,n){return fa(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return ma(this,dt(this,e),dt(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return ma(this,e=dt(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=Qe(this,(e=dt(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=dt(this,e),t=dt(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s<a.length;s++){var l=a[s];null!=l.to&&i==e.line&&e.ch>=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)})),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter((function(i){var o=i.text.length+r;if(o>e)return t=e,!0;e-=o,++n})),dt(this,it(n,t))},indexFromPos:function(e){var t=(e=dt(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+n})),t},copy:function(e){var t=new wa(Je(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new wa(Je(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],ba(r,ya(this)),r},unlinkDoc:function(e){if(e instanceof Ms&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Ea(ya(this));break}if(e.history==this.history){var n=[e.id];go(e,(function(e){return n.push(e.id)}),!0),e.history=new xo(null),e.history.done=Lo(this.history.done,n),e.history.undone=Lo(this.history.undone,n)}},iterLinkedDocs:function(e){go(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Le(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:Li((function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&Eo(this.cm))}))}),wa.prototype.eachLine=wa.prototype.iter;var Ta=0;function Ca(e){var t=this;if(_a(t),!ye(t,e)&&!Hn(t.display,e)){we(e),a&&(Ta=+new Date);var n=Fr(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),s=0,l=function(){++s==i&&Ii(t,(function(){var e={from:n=dt(t.doc,n),to:n,text:t.doc.splitLines(o.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};Xo(t.doc,e),Bo(t.doc,ao(dt(t.doc,n),dt(t.doc,so(e))))}))()},c=function(e,n){if(t.options.allowDropFileTypes&&-1==B(t.options.allowDropFileTypes,e.type))l();else{var r=new FileReader;r.onerror=function(){return l()},r.onload=function(){var e=r.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(o[n]=e),l()},r.readAsText(e)}},u=0;u<r.length;u++)c(r[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var d=e.dataTransfer.getData("Text");if(d){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),Uo(t.doc,ao(n,n)),f)for(var p=0;p<f.length;++p)ra(t.doc,"",f[p].anchor,f[p].head,"drag");t.replaceSelection(d,"around","paste"),t.display.input.focus()}}catch(h){}}}}function ka(e,t){if(a&&(!e.state.draggingText||+new Date-Ta<100))ke(t);else if(!ye(e,t)&&!Hn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!f)){var n=A("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}function Sa(e,t){var n=Fr(e,t);if(n){var r=document.createDocumentFragment();qr(e,n,r),e.display.dragCursor||(e.display.dragCursor=A("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),N(e.display.dragCursor,r)}}function _a(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Na(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation((function(){for(var t=0;t<n.length;t++)e(n[t])}))}}var Aa=!1;function Da(){Aa||(Ia(),Aa=!0)}function Ia(){var e;he(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Na(Oa)}),100))})),he(window,"blur",(function(){return Na(Xr)}))}function Oa(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var La={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Fa=0;Fa<10;Fa++)La[Fa+48]=La[Fa+96]=String(Fa);for(var Ra=65;Ra<=90;Ra++)La[Ra]=String.fromCharCode(Ra);for(var Ma=1;Ma<=12;Ma++)La[Ma+111]=La[Ma+63235]="F"+Ma;var Pa={};function ja(e){var t,n,r,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var a=0;a<o.length-1;a++){var s=o[a];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function Va(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=Q(n.split(" "),ja),o=0;o<i.length;o++){var a=void 0,s=void 0;o==i.length-1?(s=i.join(" "),a=r):(s=i.slice(0,o+1).join(" "),a="...");var l=t[s];if(l){if(l!=a)throw new Error("Inconsistent bindings for "+s)}else t[s]=a}delete e[n]}for(var c in t)e[c]=t[c];return e}function Ba(e,t,n,r){var i=(t=qa(t)).call?t.call(e,r):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Ba(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var a=Ba(e,t.fallthrough[o],n,r);if(a)return a}}}function $a(e){var t="string"==typeof e?e:La[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Ua(e,t,n){var r=e;return t.altKey&&"Alt"!=r&&(e="Alt-"+e),(w?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(w?t.ctrlKey:t.metaKey)&&"Mod"!=r&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=r&&(e="Shift-"+e),e}function Ha(e,t){if(d&&34==e.keyCode&&e.char)return!1;var n=La[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),Ua(n,e,t))}function qa(e){return"string"==typeof e?Pa[e]:e}function za(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&ot(o.from,K(r).to)<=0;){var a=r.pop();if(ot(a.from,o.from)<0){o.from=a.from;break}}r.push(o)}Di(e,(function(){for(var t=r.length-1;t>=0;t--)ra(e.doc,"",r[t].from,r[t].to,"+delete");ai(e)}))}function Wa(e,t,n){var r=ae(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Ga(e,t,n){var r=Wa(e,t.ch,n);return null==r?null:new it(t.line,r,n<0?"after":"before")}function Ya(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=fe(n,t.doc.direction);if(o){var a,s=i<0?K(o):o[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=tr(t,n);a=i<0?n.text.length-1:0;var u=nr(t,c,a).top;a=se((function(e){return nr(t,c,e).top==u}),i<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=Wa(n,a,1))}else a=i<0?s.to:s.from;return new it(r,a,l)}}return new it(r,i<0?n.text.length:0,i<0?"before":"after")}function Ka(e,t,n,r){var i=fe(t,e.doc.direction);if(!i)return Ga(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=ue(i,n.ch,n.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from<n.ch))return Ga(t,n,r);var s,l=function(e,n){return Wa(t,e instanceof it?e.ch:e,n)},c=function(n){return e.options.lineWrapping?(s=s||tr(e,t),Tr(e,t,s,n)):{begin:0,end:t.text.length}},u=c("before"==n.sticky?l(n,-1):n.ch);if("rtl"==e.doc.direction||1==a.level){var d=1==a.level==r<0,f=l(n,d?1:-1);if(null!=f&&(d?f<=a.to&&f<=u.end:f>=a.from&&f>=u.begin)){var p=d?"before":"after";return new it(n.line,f,p)}}var h=function(e,t,r){for(var o=function(e,t){return t?new it(n.line,l(e,1),"before"):new it(n.line,e,"after")};e>=0&&e<i.length;e+=t){var a=i[e],s=t>0==(1!=a.level),c=s?r.begin:l(r.end,-1);if(a.from<=c&&c<a.to)return o(c,s);if(c=s?a.from:l(a.to,-1),r.begin<=c&&c<r.end)return o(c,s)}},m=h(o+r,r,u);if(m)return m;var v=r>0?u.end:l(u.begin,-1);return null==v||r>0&&v==t.text.length||!(m=h(r>0?0:i.length-1,r,c(v)))?null:m}Pa.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Pa.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Pa.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Pa.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Pa.default=y?Pa.macDefault:Pa.pcDefault;var Qa={selectAll:Ko,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),H)},killLine:function(e){return za(e,(function(t){if(t.empty()){var n=Qe(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:it(t.head.line+1,0)}:{from:t.head,to:it(t.head.line,n)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return za(e,(function(t){return{from:it(t.from().line,0),to:dt(e.doc,it(t.to().line+1,0))}}))},delLineLeft:function(e){return za(e,(function(e){return{from:it(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return za(e,(function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return za(e,(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}}))},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(it(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(it(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return Xa(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return Za(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return Ja(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")}),z)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")}),z)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?Za(e,t.head):r}),z)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),a=j(e.getLine(o.line),o.ch,r);t.push(Y(r-a%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Di(e,(function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,o=Qe(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new it(i.line,i.ch-1)),i.ch>0)i=new it(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),it(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Qe(e.doc,i.line-1).text;a&&(i=new it(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),it(i.line-1,a.length-1),i,"+transpose"))}n.push(new io(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return Di(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);ai(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Xa(e,t){var n=Qe(e.doc,t),r=Xt(n);return r!=n&&(t=et(r)),Ya(!0,e,r,t,1)}function Ja(e,t){var n=Qe(e.doc,t),r=Jt(n);return r!=n&&(t=et(r)),Ya(!0,e,n,t,-1)}function Za(e,t){var n=Xa(e,t.line),r=Qe(e.doc,n.line),i=fe(r,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(n.ch,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return it(n.line,a?0:o,n.sticky)}return n}function es(e,t,n){if("string"==typeof t&&!(t=Qa[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=U}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function ts(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=Ba(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&Ba(t,e.options.extraKeys,n,e)||Ba(t,e.options.keyMap,n,e)}var ns=new V;function rs(e,t,n,r){var i=e.state.keySeq;if(i){if($a(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:ns.set(50,(function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())})),is(e,i+" "+t,n,r))return!0}return is(e,t,n,r)}function is(e,t,n,r){var i=ts(e,t,r);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&Nn(e,"keyHandled",e,t,n),"handled"!=i&&"multi"!=i||(we(n),Gr(e)),!!i}function os(e,t){var n=Ha(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?rs(e,"Shift-"+n,t,(function(t){return es(e,t,!0)}))||rs(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return es(e,t)})):rs(e,n,t,(function(t){return es(e,t)})))}function as(e,t,n){return rs(e,"'"+n+"'",t,(function(t){return es(e,t,!0)}))}var ss=null;function ls(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=O(),ye(t,e)))){a&&s<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var i=os(t,e);d&&(ss=i?r:null,i||88!=r||Re||!(y?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),n&&!y&&!i&&46==r&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||cs(t)}}function cs(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(S(t,"CodeMirror-crosshair"),ve(document,"keyup",n),ve(document,"mouseover",n))}L(t,"CodeMirror-crosshair"),he(document,"keyup",n),he(document,"mouseover",n)}function us(e){16==e.keyCode&&(this.doc.sel.shift=!1),ye(this,e)}function ds(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||Hn(t.display,e)||ye(t,e)||e.ctrlKey&&!e.altKey||y&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(d&&n==ss)return ss=null,void we(e);if(!d||e.which&&!(e.which<10)||!os(t,e)){var i=String.fromCharCode(null==r?n:r);"\b"!=i&&(as(t,e,i)||t.display.input.onKeyPress(e))}}}var fs,ps,hs=400,ms=function(e,t,n){this.time=e,this.pos=t,this.button=n};function vs(e,t){var n=+new Date;return ps&&ps.compare(n,e,t)?(fs=ps=null,"triple"):fs&&fs.compare(n,e,t)?(ps=new ms(n,e,t),fs=null,"double"):(fs=new ms(n,e,t),ps=null,"single")}function gs(e){var t=this,n=t.display;if(!(ye(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,Hn(n,e))l||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!Ss(t,e)){var r=Fr(t,e),i=_e(e),o=r?vs(r,i):"single";window.focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),r&&ys(t,i,r,o,e)||(1==i?r?Es(t,r,o,e):Se(e)==n.scroller&&we(e):2==i?(r&&Ro(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(T?t.display.input.onContextMenu(e):Kr(t)))}}function ys(e,t,n,r,i){var o="Click";return"double"==r?o="Double"+o:"triple"==r&&(o="Triple"+o),rs(e,Ua(o=(1==t?"Left":2==t?"Middle":"Right")+o,i),i,(function(t){if("string"==typeof t&&(t=Qa[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=U}finally{e.state.suppressEdits=!1}return r}))}function bs(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(null==i.unit){var o=b?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),null==i.addNew&&(i.addNew=y?n.metaKey:n.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(y?n.altKey:n.ctrlKey)),i}function Es(e,t,n,r){a?setTimeout(M(Yr,e),0):e.curOp.focus=O();var i,o=bs(e,n,r),s=e.doc.sel;e.options.dragDrop&&De&&!e.isReadOnly()&&"single"==n&&(i=s.contains(t))>-1&&(ot((i=s.ranges[i]).from(),t)<0||t.xRel>0)&&(ot(i.to(),t)>0||t.xRel<0)?xs(e,r,t,o):Ts(e,r,t,o)}function xs(e,t,n,r){var i=e.display,o=!1,c=Ii(e,(function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Kr(e)),ve(i.wrapper.ownerDocument,"mouseup",c),ve(i.wrapper.ownerDocument,"mousemove",u),ve(i.scroller,"dragstart",d),ve(i.scroller,"drop",c),o||(we(t),r.addNew||Ro(e.doc,n,null,null,r.extend),l&&!f||a&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return o=!0};l&&(i.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,he(i.wrapper.ownerDocument,"mouseup",c),he(i.wrapper.ownerDocument,"mousemove",u),he(i.scroller,"dragstart",d),he(i.scroller,"drop",c),e.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}function ws(e,t,n){if("char"==n)return new io(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new io(it(t.line,0),dt(e.doc,it(t.line+1,0)));var r=n(e,t);return new io(r.from,r.to)}function Ts(e,t,n,r){a&&Kr(e);var i=e.display,o=e.doc;we(t);var s,l,c=o.sel,u=c.ranges;if(r.addNew&&!r.extend?(l=o.sel.contains(n),s=l>-1?u[l]:new io(n,n)):(s=o.sel.primary(),l=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(s=new io(n,n)),n=Fr(e,t,!0,!0),l=-1;else{var d=ws(e,n,r.unit);s=r.extend?Fo(s,d.anchor,d.head,r.extend):d}r.addNew?-1==l?(l=u.length,$o(o,oo(e,u.concat([s]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&"char"==r.unit&&!r.extend?($o(o,oo(e,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),c=o.sel):Po(o,l,s,q):(l=0,$o(o,new ro([s],0),q),c=o.sel);var f=n;function p(t){if(0!=ot(f,t))if(f=t,"rectangle"==r.unit){for(var i=[],a=e.options.tabSize,u=j(Qe(o,n.line).text,n.ch,a),d=j(Qe(o,t.line).text,t.ch,a),p=Math.min(u,d),h=Math.max(u,d),m=Math.min(n.line,t.line),v=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=v;m++){var g=Qe(o,m).text,y=W(g,p,a);p==h?i.push(new io(it(m,y),it(m,y))):g.length>y&&i.push(new io(it(m,y),it(m,W(g,h,a))))}i.length||i.push(new io(n,n)),$o(o,oo(e,c.ranges.slice(0,l).concat(i),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,E=s,x=ws(e,t,r.unit),w=E.anchor;ot(x.anchor,w)>0?(b=x.head,w=ct(E.from(),x.anchor)):(b=x.anchor,w=lt(E.to(),x.head));var T=c.ranges.slice(0);T[l]=Cs(e,new io(dt(o,w),b)),$o(o,oo(e,T,l),q)}}var h=i.wrapper.getBoundingClientRect(),m=0;function v(t){var n=++m,a=Fr(e,t,!0,"rectangle"==r.unit);if(a)if(0!=ot(a,f)){e.curOp.focus=O(),p(a);var s=ei(i,o);(a.line>=s.to||a.line<s.from)&&setTimeout(Ii(e,(function(){m==n&&v(t)})),150)}else{var l=t.clientY<h.top?-20:t.clientY>h.bottom?20:0;l&&setTimeout(Ii(e,(function(){m==n&&(i.scroller.scrollTop+=l,v(t))})),50)}}function g(t){e.state.selectingText=!1,m=1/0,t&&(we(t),i.input.focus()),ve(i.wrapper.ownerDocument,"mousemove",y),ve(i.wrapper.ownerDocument,"mouseup",b),o.history.lastSelOrigin=null}var y=Ii(e,(function(e){0!==e.buttons&&_e(e)?v(e):g(e)})),b=Ii(e,g);e.state.selectingText=b,he(i.wrapper.ownerDocument,"mousemove",y),he(i.wrapper.ownerDocument,"mouseup",b)}function Cs(e,t){var n=t.anchor,r=t.head,i=Qe(e.doc,n.line);if(0==ot(n,r)&&n.sticky==r.sticky)return t;var o=fe(i);if(!o)return t;var a=ue(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==o.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=ue(o,r.ch,r.sticky),d=u-a||(r.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?d<0:d>0}var f=o[c+(l?-1:0)],p=l==(1==f.level),h=p?f.from:f.to,m=p?"after":"before";return n.ch==h&&n.sticky==m?t:new io(new it(n.line,h,m),r)}function ks(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(u){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&we(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!Ee(e,n))return Ce(t);o-=s.top-a.viewOffset;for(var l=0;l<e.display.gutterSpecs.length;++l){var c=a.gutters.childNodes[l];if(c&&c.getBoundingClientRect().right>=i)return ge(e,n,e,tt(e.doc,o),e.display.gutterSpecs[l].className,t),Ce(t)}}function Ss(e,t){return ks(e,t,"gutterClick",!0)}function _s(e,t){Hn(e.display,t)||Ns(e,t)||ye(e,t,"contextmenu")||T||e.display.input.onContextMenu(t)}function Ns(e,t){return!!Ee(e,"gutterContextMenu")&&ks(e,t,"gutterContextMenu",!1)}function As(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),dr(e)}ms.prototype.compare=function(e,t,n){return this.time+hs>e&&0==ot(t,this.pos)&&n==this.button};var Ds={toString:function(){return"CodeMirror.Init"}},Is={},Os={};function Ls(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=Ds&&i(e,t,n)}:i)}e.defineOption=n,e.Init=Ds,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,po(e)}),!0),n("indentUnit",2,po,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){ho(e),dr(e),Mr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(it(r,o))}r++}));for(var i=n.length-1;i>=0;i--)ra(e.doc,t,n[i],it(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Ds&&e.refresh()})),n("specialCharPlaceholder",mn,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",g?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!E),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){As(e),Qi(e)}),!0),n("keyMap","default",(function(e,t,n){var r=qa(t),i=n!=Ds&&qa(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Rs,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=Yi(t,e.options.lineNumbers),Qi(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?Ir(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return gi(e)}),!0),n("scrollbarStyle","native",(function(e){Ei(e),gi(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=Yi(e.options.gutters,t),Qi(e)}),!0),n("firstLineNumber",1,Qi,!0),n("lineNumberFormatter",(function(e){return e}),Qi,!0),n("showCursorWhenSelecting",!1,Ur,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Xr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,Fs),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,Ur,!0),n("singleCursorHeightPerLine",!0,Ur,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,ho,!0),n("addModeClass",!1,ho,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,ho,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}function Fs(e,t,n){if(!t!=!(n&&n!=Ds)){var r=e.display.dragFunctions,i=t?he:ve;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function Rs(e){e.options.lineWrapping?(L(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(S(e.display.wrapper,"CodeMirror-wrap"),sn(e)),Lr(e),Mr(e),dr(e),setTimeout((function(){return gi(e)}),100)}function Ms(e,t){var n=this;if(!(this instanceof Ms))return new Ms(e,t);this.options=t=t?P(t):{},P(Is,t,!1);var r=t.value;"string"==typeof r?r=new wa(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Ms.inputStyles[t.inputStyle](this),o=this.display=new Xi(e,r,i,t);for(var c in o.wrapper.CodeMirror=this,As(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ei(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new V,keySeq:null,specialChars:null},t.autofocus&&!g&&o.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),Ps(this),Da(),wi(this),this.curOp.forceUpdate=!0,yo(this,r),t.autofocus&&!g||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Qr(n)}),20):Xr(this),Os)Os.hasOwnProperty(c)&&Os[c](this,t[c],Ds);Gi(this),t.finishInit&&t.finishInit(this);for(var u=0;u<js.length;++u)js[u](this);Ti(this),l&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function Ps(e){var t=e.display;he(t.scroller,"mousedown",Ii(e,gs)),he(t.scroller,"dblclick",a&&s<11?Ii(e,(function(t){if(!ye(e,t)){var n=Fr(e,t);if(n&&!Ss(e,t)&&!Hn(e.display,t)){we(t);var r=e.findWordAt(n);Ro(e.doc,r.anchor,r.head)}}})):function(t){return ye(e,t)||we(t)}),he(t.scroller,"contextmenu",(function(t){return _s(e,t)})),he(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||_s(e,n)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function o(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function l(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}he(t.scroller,"touchstart",(function(i){if(!ye(e,i)&&!o(i)&&!Ss(e,i)){t.input.ensurePolled(),clearTimeout(n);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),he(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),he(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!Hn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,a=e.coordsChar(t.activeTouch,"page");o=!r.prev||l(r,r.prev)?new io(a,a):!r.prev.prev||l(r,r.prev.prev)?e.findWordAt(a):new io(it(a.line,0),dt(e.doc,it(a.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),we(n)}i()})),he(t.scroller,"touchcancel",i),he(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(di(e,t.scroller.scrollTop),pi(e,t.scroller.scrollLeft,!0),ge(e,"scroll",e))})),he(t.scroller,"mousewheel",(function(t){return no(e,t)})),he(t.scroller,"DOMMouseScroll",(function(t){return no(e,t)})),he(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){ye(e,t)||ke(t)},over:function(t){ye(e,t)||(Sa(e,t),ke(t))},start:function(t){return ka(e,t)},drop:Ii(e,Ca),leave:function(t){ye(e,t)||_a(e)}};var c=t.input.getField();he(c,"keyup",(function(t){return us.call(e,t)})),he(c,"keydown",Ii(e,ls)),he(c,"keypress",Ii(e,ds)),he(c,"focus",(function(t){return Qr(e,t)})),he(c,"blur",(function(t){return Xr(e,t)}))}Ms.defaults=Is,Ms.optionHandlers=Os;var js=[];function Vs(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=yt(e,t).state:n="prev");var a=e.options.tabSize,s=Qe(o,t),l=j(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var c,u=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&((c=o.mode.indent(i,s.text.slice(u.length),s.text))==U||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?j(Qe(o,t-1).text,null,a):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var d="",f=0;if(e.options.indentWithTabs)for(var p=Math.floor(c/a);p;--p)f+=a,d+="\t";if(f<c&&(d+=Y(c-f)),d!=u)return ra(o,d,it(t,0),it(t,u.length),"+input"),s.stateAfter=null,!0;for(var h=0;h<o.sel.ranges.length;h++){var m=o.sel.ranges[h];if(m.head.line==t&&m.head.ch<u.length){var v=it(t,u.length);Po(o,h,new io(v,v));break}}}Ms.defineInitHook=function(e){return js.push(e)};var Bs=null;function $s(e){Bs=e}function Us(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r||(r=o.sel);var a=+new Date-200,s="paste"==i||e.state.pasteIncoming>a,l=Le(t),c=null;if(s&&r.ranges.length>1)if(Bs&&Bs.text.join("\n")==t){if(r.ranges.length%Bs.text.length==0){c=[];for(var u=0;u<Bs.text.length;u++)c.push(o.splitLines(Bs.text[u]))}}else l.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(c=Q(l,(function(e){return[e]})));for(var d=e.curOp.updateInput,f=r.ranges.length-1;f>=0;f--){var p=r.ranges[f],h=p.from(),m=p.to();p.empty()&&(n&&n>0?h=it(h.line,h.ch-n):e.state.overwrite&&!s?m=it(m.line,Math.min(Qe(o,m.line).text.length,m.ch+K(l).length)):s&&Bs&&Bs.lineWise&&Bs.text.join("\n")==l.join("\n")&&(h=m=it(h.line,0)));var v={from:h,to:m,text:c?c[f%c.length]:l,origin:i||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};Xo(e.doc,v),Nn(e,"inputRead",e,v)}t&&!s&&qs(e,t),ai(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Hs(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Di(t,(function(){return Us(t,n,0,null,"paste")})),!0}function qs(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(t.indexOf(o.electricChars.charAt(s))>-1){a=Vs(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Qe(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Vs(e,i.head.line,"smart"));a&&Nn(e,"electricInput",e,i.head.line)}}}function zs(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:it(i,0),head:it(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function Ws(e,t,n,r){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function Gs(){var e=A("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=A("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return l?e.style.width="1000px":e.setAttribute("wrap","off"),m&&(e.style.border="1px solid black"),Ws(e),t}function Ys(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&Ii(this,t[e])(this,n,i),ge(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](qa(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:Oi((function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");X(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(e){return e.priority})),this.state.modeGen++,Mr(this)})),removeOverlay:Oi((function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void Mr(this)}})),indentLine:Oi((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),nt(this.doc,e)&&Vs(this,e,t,n)})),indentSelection:Oi((function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(Vs(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&ai(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l<n;++l)Vs(this,l,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[r].from().ch>0&&Po(this.doc,r,new io(o,c[r].to()),H)}}})),getTokenAt:function(e,t){return Tt(this,e,t)},getLineTokens:function(e,t){return Tt(this,it(e),t,!0)},getTokenTypeAt:function(e){e=dt(this.doc,e);var t,n=gt(this,Qe(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]<o)){t=n[2*a+2];break}r=a+1}}var s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!n.hasOwnProperty(t))return r;var i=n[t],o=this.getModeAt(e);if("string"==typeof o[t])i[o[t]]&&r.push(i[o[t]]);else if(o[t])for(var a=0;a<o[t].length;a++){var s=i[o[t][a]];s&&r.push(s)}else o.helperType&&i[o.helperType]?r.push(i[o.helperType]):i[o.name]&&r.push(i[o.name]);for(var l=0;l<i._global.length;l++){var c=i._global[l];c.pred(o,this)&&-1==B(r,c.val)&&r.push(c.val)}return r},getStateAfter:function(e,t){var n=this.doc;return yt(this,(e=ut(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return yr(this,null==e?n.head:"object"==typeof e?dt(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return gr(this,dt(this.doc,e),t||"page")},coordsChar:function(e,t){return xr(this,(e=vr(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=vr(this,{top:e,left:0},t||"page").top,tt(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,i=!0),r=Qe(this.doc,e)}else r=e;return mr(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-on(r):0)},defaultTextHeight:function(){return Nr(this.display)},defaultCharWidth:function(){return Ar(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display,a=(e=yr(this,dt(this.doc,e))).bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var l=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(a=e.bottom),s+t.offsetWidth>c&&(s=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&ri(this,{left:s,top:a,right:s+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:Oi(ls),triggerOnKeyPress:Oi(ds),triggerOnKeyUp:us,triggerOnMouseDown:Oi(gs),execCommand:function(e){if(Qa.hasOwnProperty(e))return Qa[e].call(null,this)},triggerElectric:Oi((function(e){qs(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=dt(this.doc,e),a=0;a<t&&!(o=Ks(this.doc,o,i,n,r)).hitSide;++a);return o},moveH:Oi((function(e,t){var n=this;this.extendSelectionsBy((function(r){return n.display.shift||n.doc.extend||r.empty()?Ks(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()}),z)})),deleteH:Oi((function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):za(this,(function(n){var i=Ks(r,n.head,e,t,!1);return e<0?{from:i,to:n.head}:{from:n.head,to:i}}))})),findPosV:function(e,t,n,r){var i=1,o=r;t<0&&(i=-1,t=-t);for(var a=dt(this.doc,e),s=0;s<t;++s){var l=yr(this,a,"div");if(null==o?o=l.left:l.left=o,(a=Qs(this,l,i,n)).hitSide)break}return a},moveV:Oi((function(e,t){var n=this,r=this.doc,i=[],o=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy((function(a){if(o)return e<0?a.from():a.to();var s=yr(n,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),i.push(s.left);var l=Qs(n,s,e,t);return"page"==t&&a==r.sel.primary()&&oi(n,gr(n,l,"div").top-s.top),l}),z),i.length)for(var a=0;a<r.sel.ranges.length;a++)r.sel.ranges[a].goalColumn=i[a]})),findWordAt:function(e){var t=Qe(this.doc,e.line).text,n=e.ch,r=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&r!=t.length||!n?++r:--n;for(var o=t.charAt(n),a=ne(o,i)?function(e){return ne(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!ne(e)};n>0&&a(t.charAt(n-1));)--n;for(;r<t.length&&a(t.charAt(r));)++r}return new io(it(e.line,n),it(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?L(this.display.cursorDiv,"CodeMirror-overwrite"):S(this.display.cursorDiv,"CodeMirror-overwrite"),ge(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==O()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Oi((function(e,t){si(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Gn(this)-this.display.barHeight,width:e.scrollWidth-Gn(this)-this.display.barWidth,clientHeight:Kn(this),clientWidth:Yn(this)}},scrollIntoView:Oi((function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:it(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?li(this,e):ui(this,e.from,e.to,e.margin)})),setSize:Oi((function(e,t){var n=this,r=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&ur(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Pr(n,i,"widget");break}++i})),this.curOp.forceUpdate=!0,ge(this,"refresh",this)})),operation:function(e){return Di(this,e)},startOperation:function(){return wi(this)},endOperation:function(){return Ti(this)},refresh:Oi((function(){var e=this.display.cachedTextHeight;Mr(this),this.curOp.forceUpdate=!0,dr(this),si(this,this.doc.scrollLeft,this.doc.scrollTop),qi(this.display),(null==e||Math.abs(e-Nr(this.display))>.5||this.options.lineWrapping)&&Lr(this),ge(this,"refresh",this)})),swapDoc:Oi((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),yo(this,e),dr(this),this.display.input.reset(),si(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Nn(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},xe(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}function Ks(e,t,n,r,i){var o=t,a=n,s=Qe(e,t.line),l=i&&"rtl"==e.direction?-n:n;function c(){var n=t.line+l;return!(n<e.first||n>=e.first+e.size)&&(t=new it(n,t.ch,t.sticky),s=Qe(e,n))}function u(o){var a;if("codepoint"==r){var u=s.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(u))a=null;else{var d=n>0?u>=55296&&u<56320:u>=56320&&u<57343;a=new it(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(d?2:1))),-n)}}else a=i?Ka(e.cm,s,t,n):Ga(s,t,n);if(null==a){if(o||!c())return!1;t=Ya(i,e.cm,s,t.line,l)}else t=a;return!0}if("char"==r||"codepoint"==r)u();else if("column"==r)u(!0);else if("word"==r||"group"==r)for(var d=null,f="group"==r,p=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;!(n<0)||u(!h);h=!1){var m=s.text.charAt(t.ch)||"\n",v=ne(m,p)?"w":f&&"\n"==m?"n":!f||/\s/.test(m)?null:"p";if(!f||h||v||(v="s"),d&&d!=v){n<0&&(n=1,u(),t.sticky="after");break}if(v&&(d=v),n>0&&!u(!h))break}var g=Go(e,t,o,a,!0);return at(o,g)&&(g.hitSide=!0),g}function Qs(e,t,n,r){var i,o,a=e.doc,s=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*Nr(e.display),3);i=(n>0?t.bottom:t.top)+n*c}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(o=xr(e,s,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var Xs=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new V,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Js(e,t){var n=er(e,t.line);if(!n||n.hidden)return null;var r=Qe(e.doc,t.line),i=Xn(n,r,t.line),o=fe(r,e.doc.direction),a="left";o&&(a=ue(o,t.ch)%2?"right":"left");var s=or(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Zs(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function el(e,t){return t&&(e.bad=!0),e}function tl(e,t,n,r,i){var o="",a=!1,s=e.doc.lineSeparator(),l=!1;function c(e){return function(t){return t.id==e}}function u(){a&&(o+=s,l&&(o+=s),a=l=!1)}function d(e){e&&(u(),o+=e)}function f(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void d(n);var o,p=t.getAttribute("cm-marker");if(p){var h=e.findMarks(it(r,0),it(i+1,0),c(+p));return void(h.length&&(o=h[0].find(0))&&d(Xe(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var m=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;m&&u();for(var v=0;v<t.childNodes.length;v++)f(t.childNodes[v]);/^(pre|p)$/i.test(t.nodeName)&&(l=!0),m&&(a=!0)}else 3==t.nodeType&&d(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;f(t),t!=n;)t=t.nextSibling,l=!1;return o}function nl(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return el(e.clipPos(it(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==r)return rl(o,t,n)}}function rl(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!I(r,t))return el(it(et(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var o=e.rest?K(e.rest):e.line;return el(it(et(o),o.text.length),i)}var a=3==t.nodeType?t:null,s=t;for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,n&&(n=a.nodeValue.length));s.parentNode!=r;)s=s.parentNode;var l=e.measure,c=l.maps;function u(t,n,r){for(var i=-1;i<(c?c.length:0);i++)for(var o=i<0?l.map:c[i],a=0;a<o.length;a+=3){var s=o[a+2];if(s==t||s==n){var u=et(i<0?e.line:e.rest[i]),d=o[a]+r;return(r<0||s!=t)&&(d=o[a+(r?1:0)]),it(u,d)}}}var d=u(a,s,n);if(d)return el(d,i);for(var f=s.nextSibling,p=a?a.nodeValue.length-n:0;f;f=f.nextSibling){if(d=u(f,f.firstChild,0))return el(it(d.line,d.ch-p),i);p+=f.textContent.length}for(var h=s.previousSibling,m=n;h;h=h.previousSibling){if(d=u(h,h.firstChild,-1))return el(it(d.line,d.ch+m),i);m+=h.textContent.length}}Xs.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;function o(e){for(var t=e.target;t;t=t.parentNode){if(t==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function a(e){if(o(e)&&!ye(r,e)){if(r.somethingSelected())$s({lineWise:!1,text:r.getSelections()}),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=zs(r);$s({lineWise:!0,text:t.text}),"cut"==e.type&&r.operation((function(){r.setSelections(t.ranges,0,H),r.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var a=Bs.text.join("\n");if(e.clipboardData.setData("Text",a),e.clipboardData.getData("Text")==a)return void e.preventDefault()}var s=Gs(),l=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),l.value=Bs.text.join("\n");var c=O();R(l),setTimeout((function(){r.display.lineSpace.removeChild(s),c.focus(),c==i&&n.showPrimarySelection()}),50)}}i.contentEditable=!0,Ws(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize),he(i,"paste",(function(e){!o(e)||ye(r,e)||Hs(e,r)||s<=11&&setTimeout(Ii(r,(function(){return t.updateFromDOM()})),20)})),he(i,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),he(i,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),he(i,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),he(i,"touchstart",(function(){return n.forceCompositionEnd()})),he(i,"input",(function(){t.composing||t.readFromDOMSoon()})),he(i,"copy",a),he(i,"cut",a)},Xs.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Xs.prototype.prepareSelection=function(){var e=Hr(this.cm,!1);return e.focus=O()==this.div,e},Xs.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Xs.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Xs.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),i=r.from(),o=r.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var a=nl(t,e.anchorNode,e.anchorOffset),s=nl(t,e.focusNode,e.focusOffset);if(!a||a.bad||!s||s.bad||0!=ot(ct(a,s),i)||0!=ot(lt(a,s),o)){var l=t.display.view,c=i.line>=t.display.viewFrom&&Js(t,i)||{node:l[0].measure.map[2],offset:0},u=o.line<t.display.viewTo&&Js(t,o);if(!u){var d=l[l.length-1].measure,f=d.maps?d.maps[d.maps.length-1]:d.map;u={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(c&&u){var p,h=e.rangeCount&&e.getRangeAt(0);try{p=k(c.node,c.offset,u.offset,u.node)}catch(aN){}p&&(!n&&t.state.focused?(e.collapse(c.node,c.offset),p.collapsed||(e.removeAllRanges(),e.addRange(p))):(e.removeAllRanges(),e.addRange(p)),h&&null==e.anchorNode?e.addRange(h):n&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Xs.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation((function(){return e.cm.curOp.selectionChanged=!0}))}),20)},Xs.prototype.showMultipleSelections=function(e){N(this.cm.display.cursorDiv,e.cursors),N(this.cm.display.selectionDiv,e.selection)},Xs.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Xs.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return I(this.div,t)},Xs.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&O()==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Xs.prototype.blur=function(){this.div.blur()},Xs.prototype.getField=function(){return this.div},Xs.prototype.supportsTouch=function(){return!0},Xs.prototype.receivedFocus=function(){var e=this,t=this;function n(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,n))}this.selectionInEditor()?setTimeout((function(){return e.pollSelection()}),20):Di(this.cm,(function(){return t.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,n)},Xs.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Xs.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(v&&u&&this.cm.display.gutterSpecs.length&&Zs(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=nl(t,e.anchorNode,e.anchorOffset),r=nl(t,e.focusNode,e.focusOffset);n&&r&&Di(t,(function(){$o(t.doc,ao(n,r),H),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)}))}}},Xs.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,r=this.cm,i=r.display,o=r.doc.sel.primary(),a=o.from(),s=o.to();if(0==a.ch&&a.line>r.firstLine()&&(a=it(a.line-1,Qe(r.doc,a.line-1).length)),s.ch==Qe(r.doc,s.line).text.length&&s.line<r.lastLine()&&(s=it(s.line+1,0)),a.line<i.viewFrom||s.line>i.viewTo-1)return!1;a.line==i.viewFrom||0==(e=Rr(r,a.line))?(t=et(i.view[0].line),n=i.view[0].node):(t=et(i.view[e].line),n=i.view[e-1].node.nextSibling);var l,c,u=Rr(r,s.line);if(u==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=et(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(tl(r,n,c,t,l)),f=Xe(r.doc,it(t,0),it(l,Qe(r.doc,l).text.length));d.length>1&&f.length>1;)if(K(d)==K(f))d.pop(),f.pop(),l--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),t++}for(var p=0,h=0,m=d[0],v=f[0],g=Math.min(m.length,v.length);p<g&&m.charCodeAt(p)==v.charCodeAt(p);)++p;for(var y=K(d),b=K(f),E=Math.min(y.length-(1==d.length?p:0),b.length-(1==f.length?p:0));h<E&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)++h;if(1==d.length&&1==f.length&&t==a.line)for(;p&&p>a.ch&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)p--,h++;d[d.length-1]=y.slice(0,y.length-h).replace(/^\u200b+/,""),d[0]=d[0].slice(p).replace(/\u200b+$/,"");var x=it(t,p),w=it(l,f.length?K(f).length-h:0);return d.length>1||d[0]||ot(x,w)?(ra(r.doc,d,x,w,"+input"),!0):void 0},Xs.prototype.ensurePolled=function(){this.forceCompositionEnd()},Xs.prototype.reset=function(){this.forceCompositionEnd()},Xs.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Xs.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Xs.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Di(this.cm,(function(){return Mr(e.cm)}))},Xs.prototype.setUneditable=function(e){e.contentEditable="false"},Xs.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Ii(this.cm,Us)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Xs.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Xs.prototype.onContextMenu=function(){},Xs.prototype.resetPosition=function(){},Xs.prototype.needsContentAttribute=!0;var il=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new V,this.hasSelection=!1,this.composing=null};function ol(e,t){if((t=t?P(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=O();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(he(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(aN){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(ve(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=Ms((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s}function al(e){e.off=ve,e.on=he,e.wheelEventPixels=to,e.Doc=wa,e.splitLines=Le,e.countColumn=j,e.findColumn=W,e.isWordChar=te,e.Pass=U,e.signal=ge,e.Line=ln,e.changeEnd=so,e.scrollbarModel=bi,e.Pos=it,e.cmpPos=ot,e.modes=je,e.mimeModes=Ve,e.resolveMode=Ue,e.getMode=He,e.modeExtensions=qe,e.extendMode=ze,e.copyState=We,e.startState=Ye,e.innerMode=Ge,e.commands=Qa,e.keyMap=Pa,e.keyName=Ha,e.isModifierKey=$a,e.lookupKey=Ba,e.normalizeKeyMap=Va,e.StringStream=Ke,e.SharedTextMarker=va,e.TextMarker=ha,e.LineWidget=ua,e.e_preventDefault=we,e.e_stopPropagation=Te,e.e_stop=ke,e.addClass=L,e.contains=I,e.rmClass=S,e.keyNames=La}il.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!ye(r,e)){if(r.somethingSelected())$s({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=zs(r);$s({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,H):(n.prevInput="",i.value=t.text.join("\n"),R(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),he(i,"input",(function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),he(i,"paste",(function(e){ye(r,e)||Hs(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),he(i,"cut",o),he(i,"copy",o),he(e.scroller,"paste",(function(t){if(!Hn(e,t)&&!ye(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),he(e.lineSpace,"selectstart",(function(t){Hn(e,t)||we(t)})),he(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),he(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},il.prototype.createField=function(e){this.wrapper=Gs(),this.textarea=this.wrapper.firstChild},il.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},il.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Hr(e);if(e.options.moveInputWithCursor){var i=yr(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},il.prototype.showSelection=function(e){var t=this.cm.display;N(t.cursorDiv,e.cursors),N(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},il.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&R(this.textarea),a&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},il.prototype.getField=function(){return this.textarea},il.prototype.supportsTouch=function(){return!1},il.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!g||O()!=this.textarea))try{this.textarea.focus()}catch(aN){}},il.prototype.blur=function(){this.textarea.blur()},il.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},il.prototype.receivedFocus=function(){this.slowPoll()},il.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},il.prototype.fastPoll=function(){var e=!1,t=this;function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}t.pollingFast=!0,t.polling.set(20,n)},il.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Fe(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r=""),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,i.length);l<c&&r.charCodeAt(l)==i.charCodeAt(l);)++l;return Di(t,(function(){Us(t,i.slice(l),r.length-l,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},il.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},il.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},il.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Fr(n,e),c=r.scroller.scrollTop;if(o&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&Ii(n,$o)(n.doc,ao(o),H);var u,f=i.style.cssText,p=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),r.input.focus(),l&&window.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=g,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&v(),T){ke(e);var m=function(){ve(window,"mouseup",m),setTimeout(g,20)};he(window,"mouseup",m)}else setTimeout(g,50)}function v(){if(null!=i.selectionStart){var e=n.somethingSelected(),o=""+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function g(){if(t.contextMenuPending==g&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,i.style.cssText=f,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!a||a&&s<9)&&v();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&""==t.prevInput?Ii(n,Ko)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},il.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},il.prototype.setUneditable=function(){},il.prototype.needsContentAttribute=!1,Ls(Ms),Ys(Ms);var sl="iter insert remove copy getEditor constructor".split(" ");for(var ll in wa.prototype)wa.prototype.hasOwnProperty(ll)&&B(sl,ll)<0&&(Ms.prototype[ll]=function(e){return function(){return e.apply(this.doc,arguments)}}(wa.prototype[ll]));return xe(wa),Ms.inputStyles={textarea:il,contenteditable:Xs},Ms.defineMode=function(e){Ms.defaults.mode||"null"==e||(Ms.defaults.mode=e),Be.apply(this,arguments)},Ms.defineMIME=$e,Ms.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Ms.defineMIME("text/plain","null"),Ms.defineExtension=function(e,t){Ms.prototype[e]=t},Ms.defineDocExtension=function(e,t){wa.prototype[e]=t},Ms.fromTextArea=ol,al(Ms),Ms.version="5.65.3",Ms}()),TL.exports}var kL=CL();const SL=a(kL),_L=r({__proto__:null,default:SL},[kL]);!function(e){var t="CodeMirror-hint",n="CodeMirror-hint-active";function r(e,t){if(this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var n=this;e.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}}e.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var r={hint:t};if(n)for(var i in n)r[i]=n[i];return e.showHint(r)},e.defineExtension("showHint",(function(t){t=a(this,this.getCursor("start"),t);var n=this.listSelections();if(!(n.length>1)){if(this.somethingSelected()){if(!t.hint.supportsSelection)return;for(var i=0;i<n.length;i++)if(n[i].head.line!=n[i].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var o=this.state.completionActive=new r(this,t);o.options.hint&&(e.signal(this,"startCompletion",this),o.update(!0))}})),e.defineExtension("closeHint",(function(){this.state.completionActive&&this.state.completionActive.close()}));var i=window.requestAnimationFrame||function(e){return setTimeout(e,1e3/60)},o=window.cancelAnimationFrame||clearTimeout;function a(e,t,n){var r=e.options.hintOptions,i={};for(var o in h)i[o]=h[o];if(r)for(var o in r)void 0!==r[o]&&(i[o]=r[o]);if(n)for(var o in n)void 0!==n[o]&&(i[o]=n[o]);return i.hint.resolve&&(i.hint=i.hint.resolve(e,t)),i}function s(e){return"string"==typeof e?e:e.text}function l(e,t){var n={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(1-t.menuSize(),!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close};/Mac/.test(navigator.platform)&&(n["Ctrl-P"]=function(){t.moveFocus(-1)},n["Ctrl-N"]=function(){t.moveFocus(1)});var r=e.options.customKeys,i=r?{}:n;function o(e,r){var o;o="string"!=typeof r?function(e){return r(e,t)}:n.hasOwnProperty(r)?n[r]:r,i[e]=o}if(r)for(var a in r)r.hasOwnProperty(a)&&o(a,r[a]);var s=e.options.extraKeys;if(s)for(var a in s)s.hasOwnProperty(a)&&o(a,s[a]);return i}function c(e,t){for(;t&&t!=e;){if("LI"===t.nodeName.toUpperCase()&&t.parentNode==e)return t;t=t.parentNode}}function u(r,i){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=r,this.data=i,this.picked=!1;var o=this,a=r.cm,u=a.getInputField().ownerDocument,d=u.defaultView||u.parentWindow,f=this.hints=u.createElement("ul");f.setAttribute("role","listbox"),f.setAttribute("aria-expanded","true"),f.id=this.id;var p=r.cm.options.theme;f.className="CodeMirror-hints "+p,this.selectedHint=i.selectedHint||0;for(var h=i.list,m=0;m<h.length;++m){var v=f.appendChild(u.createElement("li")),g=h[m],y=t+(m!=this.selectedHint?"":" "+n);null!=g.className&&(y=g.className+" "+y),v.className=y,m==this.selectedHint&&v.setAttribute("aria-selected","true"),v.id=this.id+"-"+m,v.setAttribute("role","option"),g.render?g.render(v,i,g):v.appendChild(u.createTextNode(g.displayText||s(g))),v.hintId=m}var b=r.options.container||u.body,E=a.cursorCoords(r.options.alignWithWord?i.from:null),x=E.left,w=E.bottom,T=!0,C=0,k=0;if(b!==u.body){var S=-1!==["absolute","relative","fixed"].indexOf(d.getComputedStyle(b).position)?b:b.offsetParent,_=S.getBoundingClientRect(),N=u.body.getBoundingClientRect();C=_.left-N.left-S.scrollLeft,k=_.top-N.top-S.scrollTop}f.style.left=x-C+"px",f.style.top=w-k+"px";var A=d.innerWidth||Math.max(u.body.offsetWidth,u.documentElement.offsetWidth),D=d.innerHeight||Math.max(u.body.offsetHeight,u.documentElement.offsetHeight);b.appendChild(f),a.getInputField().setAttribute("aria-autocomplete","list"),a.getInputField().setAttribute("aria-owns",this.id),a.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var I,O=r.options.moveOnOverlap?f.getBoundingClientRect():new DOMRect,L=!!r.options.paddingForScrollbar&&f.scrollHeight>f.clientHeight+1;if(setTimeout((function(){I=a.getScrollInfo()})),O.bottom-D>0){var F=O.bottom-O.top;if(E.top-(E.bottom-O.top)-F>0)f.style.top=(w=E.top-F-k)+"px",T=!1;else if(F>D){f.style.height=D-5+"px",f.style.top=(w=E.bottom-O.top-k)+"px";var R=a.getCursor();i.from.ch!=R.ch&&(E=a.cursorCoords(R),f.style.left=(x=E.left-C)+"px",O=f.getBoundingClientRect())}}var M,P=O.right-A;if(L&&(P+=a.display.nativeBarWidth),P>0&&(O.right-O.left>A&&(f.style.width=A-5+"px",P-=O.right-O.left-A),f.style.left=(x=E.left-P-C)+"px"),L)for(var j=f.firstChild;j;j=j.nextSibling)j.style.paddingRight=a.display.nativeBarWidth+"px";a.addKeyMap(this.keyMap=l(r,{moveFocus:function(e,t){o.changeActive(o.selectedHint+e,t)},setFocus:function(e){o.changeActive(e)},menuSize:function(){return o.screenAmount()},length:h.length,close:function(){r.close()},pick:function(){o.pick()},data:i})),r.options.closeOnUnfocus&&(a.on("blur",this.onBlur=function(){M=setTimeout((function(){r.close()}),100)}),a.on("focus",this.onFocus=function(){clearTimeout(M)})),a.on("scroll",this.onScroll=function(){var e=a.getScrollInfo(),t=a.getWrapperElement().getBoundingClientRect();I||(I=a.getScrollInfo());var n=w+I.top-e.top,i=n-(d.pageYOffset||(u.documentElement||u.body).scrollTop);if(T||(i+=f.offsetHeight),i<=t.top||i>=t.bottom)return r.close();f.style.top=n+"px",f.style.left=x+I.left-e.left+"px"}),e.on(f,"dblclick",(function(e){var t=c(f,e.target||e.srcElement);t&&null!=t.hintId&&(o.changeActive(t.hintId),o.pick())})),e.on(f,"click",(function(e){var t=c(f,e.target||e.srcElement);t&&null!=t.hintId&&(o.changeActive(t.hintId),r.options.completeOnSingleClick&&o.pick())})),e.on(f,"mousedown",(function(){setTimeout((function(){a.focus()}),20)}));var V=this.getSelectedHintRange();return 0===V.from&&0===V.to||this.scrollToActive(),e.signal(i,"select",h[this.selectedHint],f.childNodes[this.selectedHint]),!0}function d(e,t){if(!e.somethingSelected())return t;for(var n=[],r=0;r<t.length;r++)t[r].supportsSelection&&n.push(t[r]);return n}function f(e,t,n,r){if(e.async)e(t,r,n);else{var i=e(t,n);i&&i.then?i.then(r):r(i)}}function p(t,n){var r,i=t.getHelpers(n,"hint");if(i.length){var o=function(e,t,n){var r=d(e,i);function o(i){if(i==r.length)return t(null);f(r[i],e,n,(function(e){e&&e.list.length>0?t(e):o(i+1)}))}o(0)};return o.async=!0,o.supportsSelection=!0,o}return(r=t.getHelper(t.getCursor(),"hintWords"))?function(t){return e.hint.fromList(t,{words:r})}:e.hint.anyword?function(t,n){return e.hint.anyword(t,n)}:function(){}}r.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&e.signal(this.data,"close"),this.widget&&this.widget.close(),e.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,n){var r=t.list[n],i=this;this.cm.operation((function(){r.hint?r.hint(i.cm,t,r):i.cm.replaceRange(s(r),r.from||t.from,r.to||t.to,"complete"),e.signal(t,"pick",r),i.cm.scrollIntoView()})),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(o(this.debounce),this.debounce=0);var e=this.startPos;this.data&&(e=this.data.from);var t=this.cm.getCursor(),n=this.cm.getLine(t.line);if(t.line!=this.startPos.line||n.length-t.ch!=this.startLen-this.startPos.ch||t.ch<e.ch||this.cm.somethingSelected()||!t.ch||this.options.closeCharacters.test(n.charAt(t.ch-1)))this.close();else{var r=this;this.debounce=i((function(){r.update()})),this.widget&&this.widget.disable()}},update:function(e){if(null!=this.tick){var t=this,n=++this.tick;f(this.options.hint,this.cm,this.options,(function(r){t.tick==n&&t.finishUpdate(r,e)}))}},finishUpdate:function(t,n){this.data&&e.signal(this.data,"update");var r=this.widget&&this.widget.picked||n&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=t,t&&t.list.length&&(r&&1==t.list.length?this.pick(t,0):(this.widget=new u(this,t),e.signal(t,"shown")))}},u.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var e=this.completion.cm.getInputField();e.removeAttribute("aria-activedescendant"),e.removeAttribute("aria-owns");var t=this.completion.cm;this.completion.options.closeOnUnfocus&&(t.off("blur",this.onBlur),t.off("focus",this.onFocus)),t.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var e=this;this.keyMap={Enter:function(){e.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(t,r){if(t>=this.data.list.length?t=r?this.data.list.length-1:0:t<0&&(t=r?0:this.data.list.length-1),this.selectedHint!=t){var i=this.hints.childNodes[this.selectedHint];i&&(i.className=i.className.replace(" "+n,""),i.removeAttribute("aria-selected")),(i=this.hints.childNodes[this.selectedHint=t]).className+=" "+n,i.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",i.id),this.scrollToActive(),e.signal(this.data,"select",this.data.list[this.selectedHint],i)}},scrollToActive:function(){var e=this.getSelectedHintRange(),t=this.hints.childNodes[e.from],n=this.hints.childNodes[e.to],r=this.hints.firstChild;t.offsetTop<this.hints.scrollTop?this.hints.scrollTop=t.offsetTop-r.offsetTop:n.offsetTop+n.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=n.offsetTop+n.offsetHeight-this.hints.clientHeight+r.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var e=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-e),to:Math.min(this.data.list.length-1,this.selectedHint+e)}}},e.registerHelper("hint","auto",{resolve:p}),e.registerHelper("hint","fromList",(function(t,n){var r,i=t.getCursor(),o=t.getTokenAt(i),a=e.Pos(i.line,o.start),s=i;o.start<i.ch&&/\w/.test(o.string.charAt(i.ch-o.start-1))?r=o.string.substr(0,i.ch-o.start):(r="",a=i);for(var l=[],c=0;c<n.words.length;c++){var u=n.words[c];u.slice(0,r.length)==r&&l.push(u)}if(l.length)return{list:l,from:a,to:s}})),e.commands.autocomplete=e.showHint;var h={hint:e.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};e.defineOption("hintOptions",null)}(CL());var NL={};const AL=r({__proto__:null,default:a(NL)},[NL]);!function(e){var t=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),n=e.Pos,r={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function i(e){return e&&e.bracketRegex||/[(){}[\]]/}function o(e,t,o){var s=e.getLineHandle(t.line),l=t.ch-1,c=o&&o.afterCursor;null==c&&(c=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var u=i(o),d=!c&&l>=0&&u.test(s.text.charAt(l))&&r[s.text.charAt(l)]||u.test(s.text.charAt(l+1))&&r[s.text.charAt(++l)];if(!d)return null;var f=">"==d.charAt(1)?1:-1;if(o&&o.strict&&f>0!=(l==t.ch))return null;var p=e.getTokenTypeAt(n(t.line,l+1)),h=a(e,n(t.line,l+(f>0?1:0)),f,p,o);return null==h?null:{from:n(t.line,l),to:h&&h.pos,match:h&&h.ch==d.charAt(0),forward:f>0}}function a(e,t,o,a,s){for(var l=s&&s.maxScanLineLength||1e4,c=s&&s.maxScanLines||1e3,u=[],d=i(s),f=o>0?Math.min(t.line+c,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-c),p=t.line;p!=f;p+=o){var h=e.getLine(p);if(h){var m=o>0?0:h.length-1,v=o>0?h.length:-1;if(!(h.length>l))for(p==t.line&&(m=t.ch-(o<0?1:0));m!=v;m+=o){var g=h.charAt(m);if(d.test(g)&&(void 0===a||(e.getTokenTypeAt(n(p,m+1))||"")==(a||""))){var y=r[g];if(y&&">"==y.charAt(1)==o>0)u.push(g);else{if(!u.length)return{pos:n(p,m),ch:g};u.pop()}}}}}return p-o!=(o>0?e.lastLine():e.firstLine())&&null}function s(e,r,i){for(var a=e.state.matchBrackets.maxHighlightLineLength||1e3,s=i&&i.highlightNonMatching,l=[],c=e.listSelections(),u=0;u<c.length;u++){var d=c[u].empty()&&o(e,c[u].head,i);if(d&&(d.match||!1!==s)&&e.getLine(d.from.line).length<=a){var f=d.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";l.push(e.markText(d.from,n(d.from.line,d.from.ch+1),{className:f})),d.to&&e.getLine(d.to.line).length<=a&&l.push(e.markText(d.to,n(d.to.line,d.to.ch+1),{className:f}))}}if(l.length){t&&e.state.focused&&e.focus();var p=function(){e.operation((function(){for(var e=0;e<l.length;e++)l[e].clear()}))};if(!r)return p;setTimeout(p,800)}}function l(e){e.operation((function(){e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null),e.state.matchBrackets.currentlyHighlighted=s(e,!1,e.state.matchBrackets)}))}function c(e){e.state.matchBrackets&&e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null)}e.defineOption("matchBrackets",!1,(function(t,n,r){r&&r!=e.Init&&(t.off("cursorActivity",l),t.off("focus",l),t.off("blur",c),c(t)),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",l),t.on("focus",l),t.on("blur",c))})),e.defineExtension("matchBrackets",(function(){s(this,!0)})),e.defineExtension("findMatchingBracket",(function(e,t,n){return(n||"boolean"==typeof t)&&(n?(n.strict=t,t=n):t=t?{strict:!0}:null),o(this,e,t)})),e.defineExtension("scanForBracket",(function(e,t,n,r){return a(this,e,t,n,r)}))}(CL());var DL={};const IL=r({__proto__:null,default:a(DL)},[DL]);!function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,a){a&&a!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),n&&(o(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(i))}));var i={Backspace:l,Enter:c};function o(e){for(var t=0;t<e.length;t++){var n=e.charAt(t),r="'"+n+"'";i[r]||(i[r]=a(n))}}function a(e){return function(t){return f(t,e)}}function s(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function l(t){var i=s(t);if(!i||t.getOption("disableInput"))return e.Pass;for(var o=r(i,"pairs"),a=t.listSelections(),l=0;l<a.length;l++){if(!a[l].empty())return e.Pass;var c=p(t,a[l].head);if(!c||o.indexOf(c)%2!=0)return e.Pass}for(l=a.length-1;l>=0;l--){var u=a[l].head;t.replaceRange("",n(u.line,u.ch-1),n(u.line,u.ch+1),"+delete")}}function c(t){var n=s(t),i=n&&r(n,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var o=t.listSelections(),a=0;a<o.length;a++){if(!o[a].empty())return e.Pass;var l=p(t,o[a].head);if(!l||i.indexOf(l)%2!=0)return e.Pass}t.operation((function(){var e=t.lineSeparator()||"\n";t.replaceSelection(e+e,null),u(t,-1),o=t.listSelections();for(var n=0;n<o.length;n++){var r=o[n].head.line;t.indentLine(r,null,!0),t.indentLine(r+1,null,!0)}}))}function u(e,t){for(var n=[],r=e.listSelections(),i=0,o=0;o<r.length;o++){var a=r[o];a.head==e.getCursor()&&(i=o);var s=a.head.ch||t>0?{line:a.head.line,ch:a.head.ch+t}:{line:a.head.line-1};n.push({anchor:s,head:s})}e.setSelections(n,i)}function d(t){var r=e.cmpPos(t.anchor,t.head)>0;return{anchor:new n(t.anchor.line,t.anchor.ch+(r?-1:1)),head:new n(t.head.line,t.head.ch+(r?1:-1))}}function f(t,i){var o=s(t);if(!o||t.getOption("disableInput"))return e.Pass;var a=r(o,"pairs"),l=a.indexOf(i);if(-1==l)return e.Pass;for(var c,f=r(o,"closeBefore"),p=r(o,"triples"),m=a.charAt(l+1)==i,v=t.listSelections(),g=l%2==0,y=0;y<v.length;y++){var b,E=v[y],x=E.head,w=t.getRange(x,n(x.line,x.ch+1));if(g&&!E.empty())b="surround";else if(!m&&g||w!=i)if(m&&x.ch>1&&p.indexOf(i)>=0&&t.getRange(n(x.line,x.ch-2),x)==i+i){if(x.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(x.line,x.ch-2))))return e.Pass;b="addFour"}else if(m){var T=0==x.ch?" ":t.getRange(n(x.line,x.ch-1),x);if(e.isWordChar(w)||T==i||e.isWordChar(T))return e.Pass;b="both"}else{if(!g||!(0===w.length||/\s/.test(w)||f.indexOf(w)>-1))return e.Pass;b="both"}else b=m&&h(t,x)?"both":p.indexOf(i)>=0&&t.getRange(x,n(x.line,x.ch+3))==i+i+i?"skipThree":"skip";if(c){if(c!=b)return e.Pass}else c=b}var C=l%2?a.charAt(l-1):i,k=l%2?i:a.charAt(l+1);t.operation((function(){if("skip"==c)u(t,1);else if("skipThree"==c)u(t,3);else if("surround"==c){for(var e=t.getSelections(),n=0;n<e.length;n++)e[n]=C+e[n]+k;for(t.replaceSelections(e,"around"),e=t.listSelections().slice(),n=0;n<e.length;n++)e[n]=d(e[n]);t.setSelections(e)}else"both"==c?(t.replaceSelection(C+k,null),t.triggerElectric(C+k),u(t,-1)):"addFour"==c&&(t.replaceSelection(C+C+C+C,"before"),u(t,1))}))}function p(e,t){var r=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return 2==r.length?r:null}function h(e,t){var r=e.getTokenAt(n(t.line,t.ch+1));return/\bstring/.test(r.type)&&r.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}o(t.pairs+"`")}(CL());var OL={};const LL=r({__proto__:null,default:a(OL)},[OL]);!function(e){function t(t){return function(n,r){var i=r.line,o=n.getLine(i);function a(t){for(var a,s=r.ch,l=0;;){var c=s<=0?-1:o.lastIndexOf(t[0],s-1);if(-1!=c){if(1==l&&c<r.ch)break;if(a=n.getTokenTypeAt(e.Pos(i,c+1)),!/^(comment|string)/.test(a))return{ch:c+1,tokenType:a,pair:t};s=c-1}else{if(1==l)break;l=1,s=o.length}}}function s(t){var r,o,a=1,s=n.lastLine(),l=t.ch;e:for(var c=i;c<=s;++c)for(var u=n.getLine(c),d=c==i?l:0;;){var f=u.indexOf(t.pair[0],d),p=u.indexOf(t.pair[1],d);if(f<0&&(f=u.length),p<0&&(p=u.length),(d=Math.min(f,p))==u.length)break;if(n.getTokenTypeAt(e.Pos(c,d+1))==t.tokenType)if(d==f)++a;else if(! --a){r=c,o=d;break e}++d}return null==r||i==r?null:{from:e.Pos(i,l),to:e.Pos(r,o)}}for(var l=[],c=0;c<t.length;c++){var u=a(t[c]);u&&l.push(u)}for(l.sort((function(e,t){return e.ch-t.ch})),c=0;c<l.length;c++){var d=s(l[c]);if(d)return d}return null}}e.registerHelper("fold","brace",t([["{","}"],["[","]"]])),e.registerHelper("fold","brace-paren",t([["{","}"],["[","]"],["(",")"]])),e.registerHelper("fold","import",(function(t,n){function r(n){if(n<t.firstLine()||n>t.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));if(/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"keyword"!=r.type||"import"!=r.string)return null;for(var i=n,o=Math.min(t.lastLine(),n+10);i<=o;++i){var a=t.getLine(i).indexOf(";");if(-1!=a)return{startCh:r.end,end:e.Pos(i,a)}}}var i,o=n.line,a=r(o);if(!a||r(o-1)||(i=r(o-2))&&i.end.line==o-1)return null;for(var s=a.end;;){var l=r(s.line+1);if(null==l)break;s=l.end}return{from:t.clipPos(e.Pos(o,a.startCh+1)),to:s}})),e.registerHelper("fold","include",(function(t,n){function r(n){if(n<t.firstLine()||n>t.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));return/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"meta"==r.type&&"#include"==r.string.slice(0,8)?r.start+8:void 0}var i=n.line,o=r(i);if(null==o||null!=r(i-1))return null;for(var a=i;null!=r(a+1);)++a;return{from:e.Pos(i,o+1),to:t.clipPos(e.Pos(a))}}))}(CL());var FL={};const RL=r({__proto__:null,default:a(FL)},[FL]);var ML,PL={};function jL(){return ML||(ML=1,function(e){function t(t,r,o,a){if(o&&o.call){var s=o;o=null}else s=i(t,o,"rangeFinder");"number"==typeof r&&(r=e.Pos(r,0));var l=i(t,o,"minFoldSize");function c(e){var n=s(t,r);if(!n||n.to.line-n.from.line<l)return null;if("fold"===a)return n;for(var i=t.findMarksAt(n.from),o=0;o<i.length;++o)if(i[o].__isFold){if(!e)return null;n.cleared=!0,i[o].clear()}return n}var u=c(!0);if(i(t,o,"scanUp"))for(;!u&&r.line>t.firstLine();)r=e.Pos(r.line-1,0),u=c(!1);if(u&&!u.cleared&&"unfold"!==a){var d=n(t,o,u);e.on(d,"mousedown",(function(t){f.clear(),e.e_preventDefault(t)}));var f=t.markText(u.from,u.to,{replacedWith:d,clearOnEnter:i(t,o,"clearOnEnter"),__isFold:!0});f.on("clear",(function(n,r){e.signal(t,"unfold",t,n,r)})),e.signal(t,"fold",t,u.from,u.to)}}function n(e,t,n){var r=i(e,t,"widget");if("function"==typeof r&&(r=r(n.from,n.to)),"string"==typeof r){var o=document.createTextNode(r);(r=document.createElement("span")).appendChild(o),r.className="CodeMirror-foldmarker"}else r&&(r=r.cloneNode(!0));return r}e.newFoldFunction=function(e,n){return function(r,i){t(r,i,{rangeFinder:e,widget:n})}},e.defineExtension("foldCode",(function(e,n,r){t(this,e,n,r)})),e.defineExtension("isFolded",(function(e){for(var t=this.findMarksAt(e),n=0;n<t.length;++n)if(t[n].__isFold)return!0})),e.commands.toggleFold=function(e){e.foldCode(e.getCursor())},e.commands.fold=function(e){e.foldCode(e.getCursor(),null,"fold")},e.commands.unfold=function(e){e.foldCode(e.getCursor(),{scanUp:!1},"unfold")},e.commands.foldAll=function(t){t.operation((function(){for(var n=t.firstLine(),r=t.lastLine();n<=r;n++)t.foldCode(e.Pos(n,0),{scanUp:!1},"fold")}))},e.commands.unfoldAll=function(t){t.operation((function(){for(var n=t.firstLine(),r=t.lastLine();n<=r;n++)t.foldCode(e.Pos(n,0),{scanUp:!1},"unfold")}))},e.registerHelper("fold","combine",(function(){var e=Array.prototype.slice.call(arguments,0);return function(t,n){for(var r=0;r<e.length;++r){var i=e[r](t,n);if(i)return i}}})),e.registerHelper("fold","auto",(function(e,t){for(var n=e.getHelpers(t,"fold"),r=0;r<n.length;r++){var i=n[r](e,t);if(i)return i}}));var r={rangeFinder:e.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1,clearOnEnter:!0};function i(e,t,n){if(t&&void 0!==t[n])return t[n];var i=e.options.foldOptions;return i&&void 0!==i[n]?i[n]:r[n]}e.defineOption("foldOptions",null),e.defineExtension("foldOption",(function(e,t){return i(this,e,t)}))}(CL())),PL}!function(e){e.defineOption("foldGutter",!1,(function(t,i,o){o&&o!=e.Init&&(t.clearGutter(t.state.foldGutter.options.gutter),t.state.foldGutter=null,t.off("gutterClick",c),t.off("changes",u),t.off("viewportChange",d),t.off("fold",f),t.off("unfold",f),t.off("swapDoc",u)),i&&(t.state.foldGutter=new n(r(i)),l(t),t.on("gutterClick",c),t.on("changes",u),t.on("viewportChange",d),t.on("fold",f),t.on("unfold",f),t.on("swapDoc",u))}));var t=e.Pos;function n(e){this.options=e,this.from=this.to=0}function r(e){return!0===e&&(e={}),null==e.gutter&&(e.gutter="CodeMirror-foldgutter"),null==e.indicatorOpen&&(e.indicatorOpen="CodeMirror-foldgutter-open"),null==e.indicatorFolded&&(e.indicatorFolded="CodeMirror-foldgutter-folded"),e}function i(e,n){for(var r=e.findMarks(t(n,0),t(n+1,0)),i=0;i<r.length;++i)if(r[i].__isFold){var o=r[i].find(-1);if(o&&o.line===n)return r[i]}}function o(e){if("string"==typeof e){var t=document.createElement("div");return t.className=e+" CodeMirror-guttermarker-subtle",t}return e.cloneNode(!0)}function a(e,n,r){var a=e.state.foldGutter.options,l=n-1,c=e.foldOption(a,"minFoldSize"),u=e.foldOption(a,"rangeFinder"),d="string"==typeof a.indicatorFolded&&s(a.indicatorFolded),f="string"==typeof a.indicatorOpen&&s(a.indicatorOpen);e.eachLine(n,r,(function(n){++l;var r=null,s=n.gutterMarkers;if(s&&(s=s[a.gutter]),i(e,l)){if(d&&s&&d.test(s.className))return;r=o(a.indicatorFolded)}else{var p=t(l,0),h=u&&u(e,p);if(h&&h.to.line-h.from.line>=c){if(f&&s&&f.test(s.className))return;r=o(a.indicatorOpen)}}(r||s)&&e.setGutterMarker(n,a.gutter,r)}))}function s(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function l(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation((function(){a(e,t.from,t.to)})),n.from=t.from,n.to=t.to)}function c(e,n,r){var o=e.state.foldGutter;if(o){var a=o.options;if(r==a.gutter){var s=i(e,n);s?s.clear():e.foldCode(t(n,0),a)}}}function u(e){var t=e.state.foldGutter;if(t){var n=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){l(e)}),n.foldOnChangeTimeSpan||600)}}function d(e){var t=e.state.foldGutter;if(t){var n=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){var n=e.getViewport();t.from==t.to||n.from-t.to>20||t.from-n.to>20?l(e):e.operation((function(){n.from<t.from&&(a(e,n.from,t.from),t.from=n.from),n.to>t.to&&(a(e,t.to,n.to),t.to=n.to)}))}),n.updateViewportTimeSpan||400)}}function f(e,t){var n=e.state.foldGutter;if(n){var r=t.line;r>=n.from&&r<n.to&&a(e,r,r+1)}}}(CL(),jL());var VL={};const BL=r({__proto__:null,default:a(VL)},[VL]);!function(e){var t="CodeMirror-lint-markers",n="CodeMirror-lint-line-";function r(t,n,r){var i=document.createElement("div");function o(t){if(!i.parentNode)return e.off(document,"mousemove",o);i.style.top=Math.max(0,t.clientY-i.offsetHeight-5)+"px",i.style.left=t.clientX+5+"px"}return i.className="CodeMirror-lint-tooltip cm-s-"+t.options.theme,i.appendChild(r.cloneNode(!0)),t.state.lint.options.selfContain?t.getWrapperElement().appendChild(i):document.body.appendChild(i),e.on(document,"mousemove",o),o(n),null!=i.style.opacity&&(i.style.opacity=1),i}function i(e){e.parentNode&&e.parentNode.removeChild(e)}function o(e){e.parentNode&&(null==e.style.opacity&&i(e),e.style.opacity=0,setTimeout((function(){i(e)}),600))}function a(t,n,i,a){var s=r(t,n,i);function l(){e.off(a,"mouseout",l),s&&(o(s),s=null)}var c=setInterval((function(){if(s)for(var e=a;;e=e.parentNode){if(e&&11==e.nodeType&&(e=e.host),e==document.body)return;if(!e){l();break}}if(!s)return clearInterval(c)}),400);e.on(a,"mouseout",l)}function s(e,t,n){for(var r in this.marked=[],t instanceof Function&&(t={getAnnotations:t}),t&&!0!==t||(t={}),this.options={},this.linterOptions=t.options||{},l)this.options[r]=l[r];for(var r in t)l.hasOwnProperty(r)?null!=t[r]&&(this.options[r]=t[r]):t.options||(this.linterOptions[r]=t[r]);this.timeout=null,this.hasGutter=n,this.onMouseOver=function(t){E(e,t)},this.waitingFor=0}var l={highlightLines:!1,tooltips:!0,delay:500,lintOnChange:!0,getAnnotations:null,async:!1,selfContain:null,formatAnnotation:null,onUpdateLinting:null};function c(e){var n=e.state.lint;n.hasGutter&&e.clearGutter(t),n.options.highlightLines&&u(e);for(var r=0;r<n.marked.length;++r)n.marked[r].clear();n.marked.length=0}function u(e){e.eachLine((function(t){var n=t.wrapClass&&/\bCodeMirror-lint-line-\w+\b/.exec(t.wrapClass);n&&e.removeLineClass(t,"wrap",n[0])}))}function d(t,n,r,i,o){var s=document.createElement("div"),l=s;return s.className="CodeMirror-lint-marker CodeMirror-lint-marker-"+r,i&&((l=s.appendChild(document.createElement("div"))).className="CodeMirror-lint-marker CodeMirror-lint-marker-multiple"),0!=o&&e.on(l,"mouseover",(function(e){a(t,e,n,l)})),s}function f(e,t){return"error"==e?e:t}function p(e){for(var t=[],n=0;n<e.length;++n){var r=e[n],i=r.from.line;(t[i]||(t[i]=[])).push(r)}return t}function h(e){var t=e.severity;t||(t="error");var n=document.createElement("div");return n.className="CodeMirror-lint-message CodeMirror-lint-message-"+t,void 0!==e.messageHTML?n.innerHTML=e.messageHTML:n.appendChild(document.createTextNode(e.message)),n}function m(t,n){var r=t.state.lint,i=++r.waitingFor;function o(){i=-1,t.off("change",o)}t.on("change",o),n(t.getValue(),(function(n,a){t.off("change",o),r.waitingFor==i&&(a&&n instanceof e&&(n=a),t.operation((function(){g(t,n)})))}),r.linterOptions,t)}function v(t){var n=t.state.lint;if(n){var r=n.options,i=r.getAnnotations||t.getHelper(e.Pos(0,0),"lint");if(i)if(r.async||i.async)m(t,i);else{var o=i(t.getValue(),n.linterOptions,t);if(!o)return;o.then?o.then((function(e){t.operation((function(){g(t,e)}))})):t.operation((function(){g(t,o)}))}}}function g(e,r){var i=e.state.lint;if(i){var o=i.options;c(e);for(var a=p(r),s=0;s<a.length;++s){var l=a[s];if(l){var u=[];l=l.filter((function(e){return!(u.indexOf(e.message)>-1)&&u.push(e.message)}));for(var m=null,v=i.hasGutter&&document.createDocumentFragment(),g=0;g<l.length;++g){var y=l[g],b=y.severity;b||(b="error"),m=f(m,b),o.formatAnnotation&&(y=o.formatAnnotation(y)),i.hasGutter&&v.appendChild(h(y)),y.to&&i.marked.push(e.markText(y.from,y.to,{className:"CodeMirror-lint-mark CodeMirror-lint-mark-"+b,__annotation:y}))}i.hasGutter&&e.setGutterMarker(s,t,d(e,v,m,a[s].length>1,o.tooltips)),o.highlightLines&&e.addLineClass(s,"wrap",n+m)}}o.onUpdateLinting&&o.onUpdateLinting(r,a,e)}}function y(e){var t=e.state.lint;t&&(clearTimeout(t.timeout),t.timeout=setTimeout((function(){v(e)}),t.options.delay))}function b(e,t,n){for(var r=n.target||n.srcElement,i=document.createDocumentFragment(),o=0;o<t.length;o++){var s=t[o];i.appendChild(h(s))}a(e,n,i,r)}function E(e,t){var n=t.target||t.srcElement;if(/\bCodeMirror-lint-mark-/.test(n.className)){for(var r=n.getBoundingClientRect(),i=(r.left+r.right)/2,o=(r.top+r.bottom)/2,a=e.findMarksAt(e.coordsChar({left:i,top:o},"client")),s=[],l=0;l<a.length;++l){var c=a[l].__annotation;c&&s.push(c)}s.length&&b(e,s,t)}}e.defineOption("lint",!1,(function(n,r,i){if(i&&i!=e.Init&&(c(n),!1!==n.state.lint.options.lintOnChange&&n.off("change",y),e.off(n.getWrapperElement(),"mouseover",n.state.lint.onMouseOver),clearTimeout(n.state.lint.timeout),delete n.state.lint),r){for(var o=n.getOption("gutters"),a=!1,l=0;l<o.length;++l)o[l]==t&&(a=!0);var u=n.state.lint=new s(n,r,a);u.options.lintOnChange&&n.on("change",y),0!=u.options.tooltips&&"gutter"!=u.options.tooltips&&e.on(n.getWrapperElement(),"mouseover",u.onMouseOver),v(n)}})),e.defineExtension("performLint",(function(){v(this)}))}(CL());var $L={};const UL=r({__proto__:null,default:a($L)},[$L]);!function(e){var t,n,r=e.Pos;function i(e){var t=e.flags;return null!=t?t:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}function o(e,t){for(var n=i(e),r=n,o=0;o<t.length;o++)-1==r.indexOf(t.charAt(o))&&(r+=t.charAt(o));return n==r?e:new RegExp(e.source,r)}function a(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function s(e,t,n){t=o(t,"g");for(var i=n.line,a=n.ch,s=e.lastLine();i<=s;i++,a=0){t.lastIndex=a;var l=e.getLine(i),c=t.exec(l);if(c)return{from:r(i,c.index),to:r(i,c.index+c[0].length),match:c}}}function l(e,t,n){if(!a(t))return s(e,t,n);t=o(t,"gm");for(var i,l=1,c=n.line,u=e.lastLine();c<=u;){for(var d=0;d<l&&!(c>u);d++){var f=e.getLine(c++);i=null==i?f:i+"\n"+f}l*=2,t.lastIndex=n.ch;var p=t.exec(i);if(p){var h=i.slice(0,p.index).split("\n"),m=p[0].split("\n"),v=n.line+h.length-1,g=h[h.length-1].length;return{from:r(v,g),to:r(v+m.length-1,1==m.length?g+m[0].length:m[m.length-1].length),match:p}}}}function c(e,t,n){for(var r,i=0;i<=e.length;){t.lastIndex=i;var o=t.exec(e);if(!o)break;var a=o.index+o[0].length;if(a>e.length-n)break;(!r||a>r.index+r[0].length)&&(r=o),i=o.index+1}return r}function u(e,t,n){t=o(t,"g");for(var i=n.line,a=n.ch,s=e.firstLine();i>=s;i--,a=-1){var l=e.getLine(i),u=c(l,t,a<0?0:l.length-a);if(u)return{from:r(i,u.index),to:r(i,u.index+u[0].length),match:u}}}function d(e,t,n){if(!a(t))return u(e,t,n);t=o(t,"gm");for(var i,s=1,l=e.getLine(n.line).length-n.ch,d=n.line,f=e.firstLine();d>=f;){for(var p=0;p<s&&d>=f;p++){var h=e.getLine(d--);i=null==i?h:h+"\n"+i}s*=2;var m=c(i,t,l);if(m){var v=i.slice(0,m.index).split("\n"),g=m[0].split("\n"),y=d+v.length,b=v[v.length-1].length;return{from:r(y,b),to:r(y+g.length-1,1==g.length?b+g[0].length:g[g.length-1].length),match:m}}}}function f(e,t,n,r){if(e.length==t.length)return n;for(var i=0,o=n+Math.max(0,e.length-t.length);;){if(i==o)return i;var a=i+o>>1,s=r(e.slice(0,a)).length;if(s==n)return a;s>n?o=a:i=a+1}}function p(e,i,o,a){if(!i.length)return null;var s=a?t:n,l=s(i).split(/\r|\n\r?/);e:for(var c=o.line,u=o.ch,d=e.lastLine()+1-l.length;c<=d;c++,u=0){var p=e.getLine(c).slice(u),h=s(p);if(1==l.length){var m=h.indexOf(l[0]);if(-1==m)continue e;return o=f(p,h,m,s)+u,{from:r(c,f(p,h,m,s)+u),to:r(c,f(p,h,m+l[0].length,s)+u)}}var v=h.length-l[0].length;if(h.slice(v)==l[0]){for(var g=1;g<l.length-1;g++)if(s(e.getLine(c+g))!=l[g])continue e;var y=e.getLine(c+l.length-1),b=s(y),E=l[l.length-1];if(b.slice(0,E.length)==E)return{from:r(c,f(p,h,v,s)+u),to:r(c+l.length-1,f(y,b,E.length,s))}}}}function h(e,i,o,a){if(!i.length)return null;var s=a?t:n,l=s(i).split(/\r|\n\r?/);e:for(var c=o.line,u=o.ch,d=e.firstLine()-1+l.length;c>=d;c--,u=-1){var p=e.getLine(c);u>-1&&(p=p.slice(0,u));var h=s(p);if(1==l.length){var m=h.lastIndexOf(l[0]);if(-1==m)continue e;return{from:r(c,f(p,h,m,s)),to:r(c,f(p,h,m+l[0].length,s))}}var v=l[l.length-1];if(h.slice(0,v.length)==v){var g=1;for(o=c-l.length+1;g<l.length-1;g++)if(s(e.getLine(o+g))!=l[g])continue e;var y=e.getLine(c+1-l.length),b=s(y);if(b.slice(b.length-l[0].length)==l[0])return{from:r(c+1-l.length,f(y,b,y.length-l[0].length,s)),to:r(c,f(p,h,v.length,s))}}}}function m(e,t,n,i){var a;this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=e,n=n?e.clipPos(n):r(0,0),this.pos={from:n,to:n},"object"==typeof i?a=i.caseFold:(a=i,i=null),"string"==typeof t?(null==a&&(a=!1),this.matches=function(n,r){return(n?h:p)(e,t,r,a)}):(t=o(t,"gm"),i&&!1===i.multiline?this.matches=function(n,r){return(n?u:s)(e,t,r)}:this.matches=function(n,r){return(n?d:l)(e,t,r)})}String.prototype.normalize?(t=function(e){return e.normalize("NFD").toLowerCase()},n=function(e){return e.normalize("NFD")}):(t=function(e){return e.toLowerCase()},n=function(e){return e}),m.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){var n=this.doc.clipPos(t?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(n=r(n.line,n.ch),t?(n.ch--,n.ch<0&&(n.line--,n.ch=(this.doc.getLine(n.line)||"").length)):(n.ch++,n.ch>(this.doc.getLine(n.line)||"").length&&(n.ch=0,n.line++)),0!=e.cmpPos(n,this.doc.clipPos(n))))return this.atOccurrence=!1;var i=this.matches(t,n);if(this.afterEmptyMatch=i&&0==e.cmpPos(i.from,i.to),i)return this.pos=i,this.atOccurrence=!0,this.pos.match||!0;var o=r(t?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:o,to:o},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(t,n){if(this.atOccurrence){var i=e.splitLines(t);this.doc.replaceRange(i,this.pos.from,this.pos.to,n),this.pos.to=r(this.pos.from.line+i.length-1,i[i.length-1].length+(1==i.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",(function(e,t,n){return new m(this.doc,e,t,n)})),e.defineDocExtension("getSearchCursor",(function(e,t,n){return new m(this,e,t,n)})),e.defineExtension("selectMatches",(function(t,n){for(var r=[],i=this.getSearchCursor(t,this.getCursor("from"),n);i.findNext()&&!(e.cmpPos(i.to(),this.getCursor("to"))>0);)r.push({anchor:i.from(),head:i.to()});r.length&&this.setSelections(r,0)}))}(CL());var HL={};const qL=r({__proto__:null,default:a(HL)},[HL]);var zL,WL={};function GL(){return zL||(zL=1,function(e){function t(t,n,r){var i,o=t.getWrapperElement();return(i=o.appendChild(document.createElement("div"))).className=r?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof n?i.innerHTML=n:i.appendChild(n),e.addClass(o,"dialog-opened"),i}function n(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}e.defineExtension("openDialog",(function(r,i,o){o||(o={}),n(this,null);var a=t(this,r,o.bottom),s=!1,l=this;function c(t){if("string"==typeof t)d.value=t;else{if(s)return;s=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),l.focus(),o.onClose&&o.onClose(a)}}var u,d=a.getElementsByTagName("input")[0];return d?(d.focus(),o.value&&(d.value=o.value,!1!==o.selectValueOnOpen&&d.select()),o.onInput&&e.on(d,"input",(function(e){o.onInput(e,d.value,c)})),o.onKeyUp&&e.on(d,"keyup",(function(e){o.onKeyUp(e,d.value,c)})),e.on(d,"keydown",(function(t){o&&o.onKeyDown&&o.onKeyDown(t,d.value,c)||((27==t.keyCode||!1!==o.closeOnEnter&&13==t.keyCode)&&(d.blur(),e.e_stop(t),c()),13==t.keyCode&&i(d.value,t))})),!1!==o.closeOnBlur&&e.on(a,"focusout",(function(e){null!==e.relatedTarget&&c()}))):(u=a.getElementsByTagName("button")[0])&&(e.on(u,"click",(function(){c(),l.focus()})),!1!==o.closeOnBlur&&e.on(u,"blur",c),u.focus()),c})),e.defineExtension("openConfirm",(function(r,i,o){n(this,null);var a=t(this,r,o&&o.bottom),s=a.getElementsByTagName("button"),l=!1,c=this,u=1;function d(){l||(l=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),c.focus())}s[0].focus();for(var f=0;f<s.length;++f){var p=s[f];!function(t){e.on(p,"click",(function(n){e.e_preventDefault(n),d(),t&&t(c)}))}(i[f]),e.on(p,"blur",(function(){--u,setTimeout((function(){u<=0&&d()}),200)})),e.on(p,"focus",(function(){++u}))}})),e.defineExtension("openNotification",(function(r,i){n(this,c);var o,a=t(this,r,i&&i.bottom),s=!1,l=i&&void 0!==i.duration?i.duration:5e3;function c(){s||(s=!0,clearTimeout(o),e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a))}return e.on(a,"click",(function(t){e.e_preventDefault(t),c()})),l&&(o=setTimeout(c,l)),c}))}(CL())),WL}!function(e){function t(e,t,n,r,i){e.openDialog?e.openDialog(t,i,{value:r,selectValueOnOpen:!0,bottom:e.options.search.bottom}):i(prompt(n,r))}function n(e){return e.phrase("Jump to line:")+' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">'+e.phrase("(Use line:column or scroll% syntax)")+"</span>"}function r(e,t){var n=Number(t);return/^[-+]/.test(t)?e.getCursor().line+n:n-1}e.defineOption("search",{bottom:!1}),e.commands.jumpToLine=function(e){var i=e.getCursor();t(e,n(e),e.phrase("Jump to line:"),i.line+1+":"+i.ch,(function(t){var n;if(t)if(n=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(t))e.setCursor(r(e,n[1]),Number(n[2]));else if(n=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(t)){var o=Math.round(e.lineCount()*Number(n[1])/100);/^[-+]/.test(n[1])&&(o=i.line+o+1),e.setCursor(o-1,i.ch)}else(n=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(t))&&e.setCursor(r(e,n[1]),i.ch)}))},e.keyMap.default["Alt-G"]="jumpToLine"}(CL(),GL());var YL={};const KL=r({__proto__:null,default:a(YL)},[YL]);var QL=GL();const XL=r({__proto__:null,default:a(QL)},[QL]);!function(e){var t=e.commands,n=e.Pos;function r(t,r,i){if(i<0&&0==r.ch)return t.clipPos(n(r.line-1));var o=t.getLine(r.line);if(i>0&&r.ch>=o.length)return t.clipPos(n(r.line+1,0));for(var a,s="start",l=r.ch,c=l,u=i<0?0:o.length,d=0;c!=u;c+=i,d++){var f=o.charAt(i<0?c-1:c),p="_"!=f&&e.isWordChar(f)?"w":"o";if("w"==p&&f.toUpperCase()==f&&(p="W"),"start"==s)"o"!=p?(s="in",a=p):l=c+i;else if("in"==s&&a!=p){if("w"==a&&"W"==p&&i<0&&c--,"W"==a&&"w"==p&&i>0){if(c==l+1){a="w";continue}c--}break}}return n(r.line,c)}function i(e,t){e.extendSelectionsBy((function(n){return e.display.shift||e.doc.extend||n.empty()?r(e.doc,n.head,t):t<0?n.from():n.to()}))}function o(t,r){if(t.isReadOnly())return e.Pass;t.operation((function(){for(var e=t.listSelections().length,i=[],o=-1,a=0;a<e;a++){var s=t.listSelections()[a].head;if(!(s.line<=o)){var l=n(s.line+(r?0:1),0);t.replaceRange("\n",l,null,"+insertLine"),t.indentLine(l.line,null,!0),i.push({head:l,anchor:l}),o=s.line+1}}t.setSelections(i)})),t.execCommand("indentAuto")}function a(t,r){for(var i=r.ch,o=i,a=t.getLine(r.line);i&&e.isWordChar(a.charAt(i-1));)--i;for(;o<a.length&&e.isWordChar(a.charAt(o));)++o;return{from:n(r.line,i),to:n(r.line,o),word:a.slice(i,o)}}function s(e,t){for(var n=e.listSelections(),r=[],i=0;i<n.length;i++){var o=n[i],a=e.findPosV(o.anchor,t,"line",o.anchor.goalColumn),s=e.findPosV(o.head,t,"line",o.head.goalColumn);a.goalColumn=null!=o.anchor.goalColumn?o.anchor.goalColumn:e.cursorCoords(o.anchor,"div").left,s.goalColumn=null!=o.head.goalColumn?o.head.goalColumn:e.cursorCoords(o.head,"div").left;var l={anchor:a,head:s};r.push(o),r.push(l)}e.setSelections(r)}function l(t,n,r){for(var i=0;i<t.length;i++)if(0==e.cmpPos(t[i].from(),n)&&0==e.cmpPos(t[i].to(),r))return!0;return!1}t.goSubwordLeft=function(e){i(e,-1)},t.goSubwordRight=function(e){i(e,1)},t.scrollLineUp=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top+t.clientHeight,"local");e.getCursor().line>=n&&e.execCommand("goLineUp")}e.scrollTo(null,t.top-e.defaultTextHeight())},t.scrollLineDown=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top,"local")+1;e.getCursor().line<=n&&e.execCommand("goLineDown")}e.scrollTo(null,t.top+e.defaultTextHeight())},t.splitSelectionByLine=function(e){for(var t=e.listSelections(),r=[],i=0;i<t.length;i++)for(var o=t[i].from(),a=t[i].to(),s=o.line;s<=a.line;++s)a.line>o.line&&s==a.line&&0==a.ch||r.push({anchor:s==o.line?o:n(s,0),head:s==a.line?a:n(s)});e.setSelections(r,0)},t.singleSelectionTop=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},t.selectLine=function(e){for(var t=e.listSelections(),r=[],i=0;i<t.length;i++){var o=t[i];r.push({anchor:n(o.from().line,0),head:n(o.to().line+1,0)})}e.setSelections(r)},t.insertLineAfter=function(e){return o(e,!1)},t.insertLineBefore=function(e){return o(e,!0)},t.selectNextOccurrence=function(t){var r=t.getCursor("from"),i=t.getCursor("to"),o=t.state.sublimeFindFullWord==t.doc.sel;if(0==e.cmpPos(r,i)){var s=a(t,r);if(!s.word)return;t.setSelection(s.from,s.to),o=!0}else{var c=t.getRange(r,i),u=o?new RegExp("\\b"+c+"\\b"):c,d=t.getSearchCursor(u,i),f=d.findNext();if(f||(f=(d=t.getSearchCursor(u,n(t.firstLine(),0))).findNext()),!f||l(t.listSelections(),d.from(),d.to()))return;t.addSelection(d.from(),d.to())}o&&(t.state.sublimeFindFullWord=t.doc.sel)},t.skipAndSelectNextOccurrence=function(n){var r=n.getCursor("anchor"),i=n.getCursor("head");t.selectNextOccurrence(n),0!=e.cmpPos(r,i)&&n.doc.setSelections(n.doc.listSelections().filter((function(e){return e.anchor!=r||e.head!=i})))},t.addCursorToPrevLine=function(e){s(e,-1)},t.addCursorToNextLine=function(e){s(e,1)};var c="(){}[]";function u(t){for(var r=t.listSelections(),i=[],o=0;o<r.length;o++){var a=r[o],s=a.head,l=t.scanForBracket(s,-1);if(!l)return!1;for(;;){var u=t.scanForBracket(s,1);if(!u)return!1;if(u.ch==c.charAt(c.indexOf(l.ch)+1)){var d=n(l.pos.line,l.pos.ch+1);if(0!=e.cmpPos(d,a.from())||0!=e.cmpPos(u.pos,a.to())){i.push({anchor:d,head:u.pos});break}if(!(l=t.scanForBracket(l.pos,-1)))return!1}s=n(u.pos.line,u.pos.ch+1)}}return t.setSelections(i),!0}function d(e){return e?/\bpunctuation\b/.test(e)?e:void 0:null}function f(t,r,i){if(t.isReadOnly())return e.Pass;for(var o,a=t.listSelections(),s=[],l=0;l<a.length;l++){var c=a[l];if(!c.empty()){for(var u=c.from().line,d=c.to().line;l<a.length-1&&a[l+1].from().line==d;)d=a[++l].to().line;a[l].to().ch||d--,s.push(u,d)}}s.length?o=!0:s.push(t.firstLine(),t.lastLine()),t.operation((function(){for(var e=[],a=0;a<s.length;a+=2){var l=s[a],c=s[a+1],u=n(l,0),d=n(c),f=t.getRange(u,d,!1);r?f.sort((function(e,t){return e<t?-i:e==t?0:i})):f.sort((function(e,t){var n=e.toUpperCase(),r=t.toUpperCase();return n!=r&&(e=n,t=r),e<t?-i:e==t?0:i})),t.replaceRange(f,u,d),o&&e.push({anchor:u,head:n(c+1,0)})}o&&t.setSelections(e,0)}))}function p(t,n){t.operation((function(){for(var r=t.listSelections(),i=[],o=[],s=0;s<r.length;s++)(c=r[s]).empty()?(i.push(s),o.push("")):o.push(n(t.getRange(c.from(),c.to())));var l;for(t.replaceSelections(o,"around","case"),s=i.length-1;s>=0;s--){var c=r[i[s]];if(!(l&&e.cmpPos(c.head,l)>0)){var u=a(t,c.head);l=u.from,t.replaceRange(n(u.word),u.from,u.to)}}}))}function h(t){var n=t.getCursor("from"),r=t.getCursor("to");if(0==e.cmpPos(n,r)){var i=a(t,n);if(!i.word)return;n=i.from,r=i.to}return{from:n,to:r,query:t.getRange(n,r),word:i}}function m(e,t){var r=h(e);if(r){var i=r.query,o=e.getSearchCursor(i,t?r.to:r.from);(t?o.findNext():o.findPrevious())?e.setSelection(o.from(),o.to()):(o=e.getSearchCursor(i,t?n(e.firstLine(),0):e.clipPos(n(e.lastLine()))),(t?o.findNext():o.findPrevious())?e.setSelection(o.from(),o.to()):r.word&&e.setSelection(r.from,r.to))}}t.selectScope=function(e){u(e)||e.execCommand("selectAll")},t.selectBetweenBrackets=function(t){if(!u(t))return e.Pass},t.goToBracket=function(t){t.extendSelectionsBy((function(r){var i=t.scanForBracket(r.head,1,d(t.getTokenTypeAt(r.head)));if(i&&0!=e.cmpPos(i.pos,r.head))return i.pos;var o=t.scanForBracket(r.head,-1,d(t.getTokenTypeAt(n(r.head.line,r.head.ch+1))));return o&&n(o.pos.line,o.pos.ch+1)||r.head}))},t.swapLineUp=function(t){if(t.isReadOnly())return e.Pass;for(var r=t.listSelections(),i=[],o=t.firstLine()-1,a=[],s=0;s<r.length;s++){var l=r[s],c=l.from().line-1,u=l.to().line;a.push({anchor:n(l.anchor.line-1,l.anchor.ch),head:n(l.head.line-1,l.head.ch)}),0!=l.to().ch||l.empty()||--u,c>o?i.push(c,u):i.length&&(i[i.length-1]=u),o=u}t.operation((function(){for(var e=0;e<i.length;e+=2){var r=i[e],o=i[e+1],s=t.getLine(r);t.replaceRange("",n(r,0),n(r+1,0),"+swapLine"),o>t.lastLine()?t.replaceRange("\n"+s,n(t.lastLine()),null,"+swapLine"):t.replaceRange(s+"\n",n(o,0),null,"+swapLine")}t.setSelections(a),t.scrollIntoView()}))},t.swapLineDown=function(t){if(t.isReadOnly())return e.Pass;for(var r=t.listSelections(),i=[],o=t.lastLine()+1,a=r.length-1;a>=0;a--){var s=r[a],l=s.to().line+1,c=s.from().line;0!=s.to().ch||s.empty()||l--,l<o?i.push(l,c):i.length&&(i[i.length-1]=c),o=c}t.operation((function(){for(var e=i.length-2;e>=0;e-=2){var r=i[e],o=i[e+1],a=t.getLine(r);r==t.lastLine()?t.replaceRange("",n(r-1),n(r),"+swapLine"):t.replaceRange("",n(r,0),n(r+1,0),"+swapLine"),t.replaceRange(a+"\n",n(o,0),null,"+swapLine")}t.scrollIntoView()}))},t.toggleCommentIndented=function(e){e.toggleComment({indent:!0})},t.joinLines=function(e){for(var t=e.listSelections(),r=[],i=0;i<t.length;i++){for(var o=t[i],a=o.from(),s=a.line,l=o.to().line;i<t.length-1&&t[i+1].from().line==l;)l=t[++i].to().line;r.push({start:s,end:l,anchor:!o.empty()&&a})}e.operation((function(){for(var t=0,i=[],o=0;o<r.length;o++){for(var a,s=r[o],l=s.anchor&&n(s.anchor.line-t,s.anchor.ch),c=s.start;c<=s.end;c++){var u=c-t;c==s.end&&(a=n(u,e.getLine(u).length+1)),u<e.lastLine()&&(e.replaceRange(" ",n(u),n(u+1,/^\s*/.exec(e.getLine(u+1))[0].length)),++t)}i.push({anchor:l||a,head:a})}e.setSelections(i,0)}))},t.duplicateLine=function(e){e.operation((function(){for(var t=e.listSelections().length,r=0;r<t;r++){var i=e.listSelections()[r];i.empty()?e.replaceRange(e.getLine(i.head.line)+"\n",n(i.head.line,0)):e.replaceRange(e.getRange(i.from(),i.to()),i.from())}e.scrollIntoView()}))},t.sortLines=function(e){f(e,!0,1)},t.reverseSortLines=function(e){f(e,!0,-1)},t.sortLinesInsensitive=function(e){f(e,!1,1)},t.reverseSortLinesInsensitive=function(e){f(e,!1,-1)},t.nextBookmark=function(e){var t=e.state.sublimeBookmarks;if(t)for(;t.length;){var n=t.shift(),r=n.find();if(r)return t.push(n),e.setSelection(r.from,r.to)}},t.prevBookmark=function(e){var t=e.state.sublimeBookmarks;if(t)for(;t.length;){t.unshift(t.pop());var n=t[t.length-1].find();if(n)return e.setSelection(n.from,n.to);t.pop()}},t.toggleBookmark=function(e){for(var t=e.listSelections(),n=e.state.sublimeBookmarks||(e.state.sublimeBookmarks=[]),r=0;r<t.length;r++){for(var i=t[r].from(),o=t[r].to(),a=t[r].empty()?e.findMarksAt(i):e.findMarks(i,o),s=0;s<a.length;s++)if(a[s].sublimeBookmark){a[s].clear();for(var l=0;l<n.length;l++)n[l]==a[s]&&n.splice(l--,1);break}s==a.length&&n.push(e.markText(i,o,{sublimeBookmark:!0,clearWhenEmpty:!1}))}},t.clearBookmarks=function(e){var t=e.state.sublimeBookmarks;if(t)for(var n=0;n<t.length;n++)t[n].clear();t.length=0},t.selectBookmarks=function(e){var t=e.state.sublimeBookmarks,n=[];if(t)for(var r=0;r<t.length;r++){var i=t[r].find();i?n.push({anchor:i.from,head:i.to}):t.splice(r--,0)}n.length&&e.setSelections(n,0)},t.smartBackspace=function(t){if(t.somethingSelected())return e.Pass;t.operation((function(){for(var r=t.listSelections(),i=t.getOption("indentUnit"),o=r.length-1;o>=0;o--){var a=r[o].head,s=t.getRange({line:a.line,ch:0},a),l=e.countColumn(s,null,t.getOption("tabSize")),c=t.findPosH(a,-1,"char",!1);if(s&&!/\S/.test(s)&&l%i==0){var u=new n(a.line,e.findColumn(s,l-i,i));u.ch!=a.ch&&(c=u)}t.replaceRange("",c,a,"+delete")}}))},t.delLineRight=function(e){e.operation((function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange("",t[r].anchor,n(t[r].to().line),"+delete");e.scrollIntoView()}))},t.upcaseAtCursor=function(e){p(e,(function(e){return e.toUpperCase()}))},t.downcaseAtCursor=function(e){p(e,(function(e){return e.toLowerCase()}))},t.setSublimeMark=function(e){e.state.sublimeMark&&e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor())},t.selectToSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&e.setSelection(e.getCursor(),t)},t.deleteToSublimeMark=function(t){var n=t.state.sublimeMark&&t.state.sublimeMark.find();if(n){var r=t.getCursor(),i=n;if(e.cmpPos(r,i)>0){var o=i;i=r,r=o}t.state.sublimeKilled=t.getRange(r,i),t.replaceRange("",r,i)}},t.swapWithSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&(e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor()),e.setCursor(t))},t.sublimeYank=function(e){null!=e.state.sublimeKilled&&e.replaceSelection(e.state.sublimeKilled,null,"paste")},t.showInCenter=function(e){var t=e.cursorCoords(null,"local");e.scrollTo(null,(t.top+t.bottom)/2-e.getScrollInfo().clientHeight/2)},t.findUnder=function(e){m(e,!0)},t.findUnderPrevious=function(e){m(e,!1)},t.findAllUnder=function(e){var t=h(e);if(t){for(var n=e.getSearchCursor(t.query),r=[],i=-1;n.findNext();)r.push({anchor:n.from(),head:n.to()}),n.from().line<=t.from.line&&n.from().ch<=t.from.ch&&i++;e.setSelections(r,i)}};var v=e.keyMap;v.macSublime={"Cmd-Left":"goLineStartSmart","Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Ctrl-Alt-Up":"scrollLineUp","Ctrl-Alt-Down":"scrollLineDown","Cmd-L":"selectLine","Shift-Cmd-L":"splitSelectionByLine",Esc:"singleSelectionTop","Cmd-Enter":"insertLineAfter","Shift-Cmd-Enter":"insertLineBefore","Cmd-D":"selectNextOccurrence","Shift-Cmd-Space":"selectScope","Shift-Cmd-M":"selectBetweenBrackets","Cmd-M":"goToBracket","Cmd-Ctrl-Up":"swapLineUp","Cmd-Ctrl-Down":"swapLineDown","Cmd-/":"toggleCommentIndented","Cmd-J":"joinLines","Shift-Cmd-D":"duplicateLine",F5:"sortLines","Shift-F5":"reverseSortLines","Cmd-F5":"sortLinesInsensitive","Shift-Cmd-F5":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Cmd-F2":"toggleBookmark","Shift-Cmd-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Cmd-K Cmd-D":"skipAndSelectNextOccurrence","Cmd-K Cmd-K":"delLineRight","Cmd-K Cmd-U":"upcaseAtCursor","Cmd-K Cmd-L":"downcaseAtCursor","Cmd-K Cmd-Space":"setSublimeMark","Cmd-K Cmd-A":"selectToSublimeMark","Cmd-K Cmd-W":"deleteToSublimeMark","Cmd-K Cmd-X":"swapWithSublimeMark","Cmd-K Cmd-Y":"sublimeYank","Cmd-K Cmd-C":"showInCenter","Cmd-K Cmd-G":"clearBookmarks","Cmd-K Cmd-Backspace":"delLineLeft","Cmd-K Cmd-1":"foldAll","Cmd-K Cmd-0":"unfoldAll","Cmd-K Cmd-J":"unfoldAll","Ctrl-Shift-Up":"addCursorToPrevLine","Ctrl-Shift-Down":"addCursorToNextLine","Cmd-F3":"findUnder","Shift-Cmd-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Cmd-[":"fold","Shift-Cmd-]":"unfold","Cmd-I":"findIncremental","Shift-Cmd-I":"findIncrementalReverse","Cmd-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"macDefault"},e.normalizeKeyMap(v.macSublime),v.pcSublime={"Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-T":"transposeChars","Alt-Left":"goSubwordLeft","Alt-Right":"goSubwordRight","Ctrl-Up":"scrollLineUp","Ctrl-Down":"scrollLineDown","Ctrl-L":"selectLine","Shift-Ctrl-L":"splitSelectionByLine",Esc:"singleSelectionTop","Ctrl-Enter":"insertLineAfter","Shift-Ctrl-Enter":"insertLineBefore","Ctrl-D":"selectNextOccurrence","Shift-Ctrl-Space":"selectScope","Shift-Ctrl-M":"selectBetweenBrackets","Ctrl-M":"goToBracket","Shift-Ctrl-Up":"swapLineUp","Shift-Ctrl-Down":"swapLineDown","Ctrl-/":"toggleCommentIndented","Ctrl-J":"joinLines","Shift-Ctrl-D":"duplicateLine",F9:"sortLines","Shift-F9":"reverseSortLines","Ctrl-F9":"sortLinesInsensitive","Shift-Ctrl-F9":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Ctrl-F2":"toggleBookmark","Shift-Ctrl-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Ctrl-K Ctrl-D":"skipAndSelectNextOccurrence","Ctrl-K Ctrl-K":"delLineRight","Ctrl-K Ctrl-U":"upcaseAtCursor","Ctrl-K Ctrl-L":"downcaseAtCursor","Ctrl-K Ctrl-Space":"setSublimeMark","Ctrl-K Ctrl-A":"selectToSublimeMark","Ctrl-K Ctrl-W":"deleteToSublimeMark","Ctrl-K Ctrl-X":"swapWithSublimeMark","Ctrl-K Ctrl-Y":"sublimeYank","Ctrl-K Ctrl-C":"showInCenter","Ctrl-K Ctrl-G":"clearBookmarks","Ctrl-K Ctrl-Backspace":"delLineLeft","Ctrl-K Ctrl-1":"foldAll","Ctrl-K Ctrl-0":"unfoldAll","Ctrl-K Ctrl-J":"unfoldAll","Ctrl-Alt-Up":"addCursorToPrevLine","Ctrl-Alt-Down":"addCursorToNextLine","Ctrl-F3":"findUnder","Shift-Ctrl-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Ctrl-[":"fold","Shift-Ctrl-]":"unfold","Ctrl-I":"findIncremental","Shift-Ctrl-I":"findIncrementalReverse","Ctrl-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"pcDefault"},e.normalizeKeyMap(v.pcSublime);var g=v.default==v.macDefault;v.sublime=g?v.macSublime:v.pcSublime}(CL());var JL={};const ZL=r({__proto__:null,default:a(JL)},[JL]);var eF;(eF=CL()).defineMode("javascript",(function(e,t){var n,r,i=e.indentUnit,o=t.statementIndent,a=t.jsonld,s=t.json||a,l=!1!==t.trackScope,c=t.typescript,u=t.wordCharacters||/[\w$\xa1-\uffff]/,d=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),i=e("keyword d"),o=e("operator"),a={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:e("new"),delete:r,void:r,throw:r,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:o,typeof:o,instanceof:o,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:e("this"),class:e("class"),super:e("atom"),yield:r,export:e("export"),import:e("import"),extends:r,await:r}}(),f=/[+\-*&%=<>!?|~^@]/,p=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function h(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}function m(e,t,i){return n=e,r=i,t}function v(e,t){var n=e.next();if('"'==n||"'"==n)return t.tokenize=g(n),t.tokenize(e,t);if("."==n&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return m("number","number");if("."==n&&e.match(".."))return m("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return m(n);if("="==n&&e.eat(">"))return m("=>","operator");if("0"==n&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return m("number","number");if(/\d/.test(n))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),m("number","number");if("/"==n)return e.eat("*")?(t.tokenize=y,y(e,t)):e.eat("/")?(e.skipToEnd(),m("comment","comment")):rt(e,t,1)?(h(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),m("regexp","string-2")):(e.eat("="),m("operator","operator",e.current()));if("`"==n)return t.tokenize=b,b(e,t);if("#"==n&&"!"==e.peek())return e.skipToEnd(),m("meta","meta");if("#"==n&&e.eatWhile(u))return m("variable","property");if("<"==n&&e.match("!--")||"-"==n&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),m("comment","comment");if(f.test(n))return">"==n&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=n&&"="!=n||e.eat("="):/[<>*+\-|&?]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),"?"==n&&e.eat(".")?m("."):m("operator","operator",e.current());if(u.test(n)){e.eatWhile(u);var r=e.current();if("."!=t.lastType){if(d.propertyIsEnumerable(r)){var i=d[r];return m(i.type,i.style,r)}if("async"==r&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return m("async","keyword",r)}return m("variable","variable",r)}}function g(e){return function(t,n){var r,i=!1;if(a&&"@"==t.peek()&&t.match(p))return n.tokenize=v,m("jsonld-keyword","meta");for(;null!=(r=t.next())&&(r!=e||i);)i=!i&&"\\"==r;return i||(n.tokenize=v),m("string","string")}}function y(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=v;break}r="*"==n}return m("comment","comment")}function b(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=v;break}r=!r&&"\\"==n}return m("quasi","string-2",e.current())}var E="([{}])";function x(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){if(c){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var i=0,o=!1,a=n-1;a>=0;--a){var s=e.string.charAt(a),l=E.indexOf(s);if(l>=0&&l<3){if(!i){++a;break}if(0==--i){"("==s&&(o=!0);break}}else if(l>=3&&l<6)++i;else if(u.test(s))o=!0;else if(/["'\/`]/.test(s))for(;;--a){if(0==a)return;if(e.string.charAt(a-1)==s&&"\\"!=e.string.charAt(a-2)){a--;break}}else if(o&&!i){++a;break}}o&&!i&&(t.fatArrowAt=a)}}var w={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function T(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function C(e,t){if(!l)return!1;for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(n=r.vars;n;n=n.next)if(n.name==t)return!0}function k(e,t,n,r,i){var o=e.cc;for(S.state=e,S.stream=i,S.marked=null,S.cc=o,S.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():s?q:U)(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return S.marked?S.marked:"variable"==n&&C(e,r)?"variable-2":t}}var S={state:null,marked:null,cc:null};function _(){for(var e=arguments.length-1;e>=0;e--)S.cc.push(arguments[e])}function N(){return _.apply(null,arguments),!0}function A(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function D(e){var n=S.state;if(S.marked="def",l){if(n.context)if("var"==n.lexical.info&&n.context&&n.context.block){var r=I(e,n.context);if(null!=r)return void(n.context=r)}else if(!A(e,n.localVars))return void(n.localVars=new F(e,n.localVars));t.globalVars&&!A(e,n.globalVars)&&(n.globalVars=new F(e,n.globalVars))}}function I(e,t){if(t){if(t.block){var n=I(e,t.prev);return n?n==t.prev?t:new L(n,t.vars,!0):null}return A(e,t.vars)?t:new L(t.prev,new F(e,t.vars),!1)}return null}function O(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function L(e,t,n){this.prev=e,this.vars=t,this.block=n}function F(e,t){this.name=e,this.next=t}var R=new F("this",new F("arguments",null));function M(){S.state.context=new L(S.state.context,S.state.localVars,!1),S.state.localVars=R}function P(){S.state.context=new L(S.state.context,S.state.localVars,!0),S.state.localVars=null}function j(){S.state.localVars=S.state.context.vars,S.state.context=S.state.context.prev}function V(e,t){var n=function(){var n=S.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new T(r,S.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function B(){var e=S.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function $(e){function t(n){return n==e?N():";"==e||"}"==n||")"==n||"]"==n?_():N(t)}return t}function U(e,t){return"var"==e?N(V("vardef",t),_e,$(";"),B):"keyword a"==e?N(V("form"),W,U,B):"keyword b"==e?N(V("form"),U,B):"keyword d"==e?S.stream.match(/^\s*$/,!1)?N():N(V("stat"),Y,$(";"),B):"debugger"==e?N($(";")):"{"==e?N(V("}"),P,de,B,j):";"==e?N():"if"==e?("else"==S.state.lexical.info&&S.state.cc[S.state.cc.length-1]==B&&S.state.cc.pop()(),N(V("form"),W,U,B,Le)):"function"==e?N(Pe):"for"==e?N(V("form"),P,Fe,U,j,B):"class"==e||c&&"interface"==t?(S.marked="keyword",N(V("form","class"==e?e:t),Ue,B)):"variable"==e?c&&"declare"==t?(S.marked="keyword",N(U)):c&&("module"==t||"enum"==t||"type"==t)&&S.stream.match(/^\s*\w/,!1)?(S.marked="keyword","enum"==t?N(et):"type"==t?N(Ve,$("operator"),ve,$(";")):N(V("form"),Ne,$("{"),V("}"),de,B,B)):c&&"namespace"==t?(S.marked="keyword",N(V("form"),q,U,B)):c&&"abstract"==t?(S.marked="keyword",N(U)):N(V("stat"),ie):"switch"==e?N(V("form"),W,$("{"),V("}","switch"),P,de,B,B,j):"case"==e?N(q,$(":")):"default"==e?N($(":")):"catch"==e?N(V("form"),M,H,U,B,j):"export"==e?N(V("stat"),We,B):"import"==e?N(V("stat"),Ye,B):"async"==e?N(U):"@"==t?N(q,U):_(V("stat"),q,$(";"),B)}function H(e){if("("==e)return N(Be,$(")"))}function q(e,t){return G(e,t,!1)}function z(e,t){return G(e,t,!0)}function W(e){return"("!=e?_():N(V(")"),Y,$(")"),B)}function G(e,t,n){if(S.state.fatArrowAt==S.stream.start){var r=n?ee:Z;if("("==e)return N(M,V(")"),ce(Be,")"),B,$("=>"),r,j);if("variable"==e)return _(M,Ne,$("=>"),r,j)}var i=n?Q:K;return w.hasOwnProperty(e)?N(i):"function"==e?N(Pe,i):"class"==e||c&&"interface"==t?(S.marked="keyword",N(V("form"),$e,B)):"keyword c"==e||"async"==e?N(n?z:q):"("==e?N(V(")"),Y,$(")"),B,i):"operator"==e||"spread"==e?N(n?z:q):"["==e?N(V("]"),Ze,B,i):"{"==e?ue(ae,"}",null,i):"quasi"==e?_(X,i):"new"==e?N(te(n)):N()}function Y(e){return e.match(/[;\}\)\],]/)?_():_(q)}function K(e,t){return","==e?N(Y):Q(e,t,!1)}function Q(e,t,n){var r=0==n?K:Q,i=0==n?q:z;return"=>"==e?N(M,n?ee:Z,j):"operator"==e?/\+\+|--/.test(t)||c&&"!"==t?N(r):c&&"<"==t&&S.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?N(V(">"),ce(ve,">"),B,r):"?"==t?N(q,$(":"),i):N(i):"quasi"==e?_(X,r):";"!=e?"("==e?ue(z,")","call",r):"."==e?N(oe,r):"["==e?N(V("]"),Y,$("]"),B,r):c&&"as"==t?(S.marked="keyword",N(ve,r)):"regexp"==e?(S.state.lastType=S.marked="operator",S.stream.backUp(S.stream.pos-S.stream.start-1),N(i)):void 0:void 0}function X(e,t){return"quasi"!=e?_():"${"!=t.slice(t.length-2)?N(X):N(Y,J)}function J(e){if("}"==e)return S.marked="string-2",S.state.tokenize=b,N(X)}function Z(e){return x(S.stream,S.state),_("{"==e?U:q)}function ee(e){return x(S.stream,S.state),_("{"==e?U:z)}function te(e){return function(t){return"."==t?N(e?re:ne):"variable"==t&&c?N(Ce,e?Q:K):_(e?z:q)}}function ne(e,t){if("target"==t)return S.marked="keyword",N(K)}function re(e,t){if("target"==t)return S.marked="keyword",N(Q)}function ie(e){return":"==e?N(B,U):_(K,$(";"),B)}function oe(e){if("variable"==e)return S.marked="property",N()}function ae(e,t){return"async"==e?(S.marked="property",N(ae)):"variable"==e||"keyword"==S.style?(S.marked="property","get"==t||"set"==t?N(se):(c&&S.state.fatArrowAt==S.stream.start&&(n=S.stream.match(/^\s*:\s*/,!1))&&(S.state.fatArrowAt=S.stream.pos+n[0].length),N(le))):"number"==e||"string"==e?(S.marked=a?"property":S.style+" property",N(le)):"jsonld-keyword"==e?N(le):c&&O(t)?(S.marked="keyword",N(ae)):"["==e?N(q,fe,$("]"),le):"spread"==e?N(z,le):"*"==t?(S.marked="keyword",N(ae)):":"==e?_(le):void 0;var n}function se(e){return"variable"!=e?_(le):(S.marked="property",N(Pe))}function le(e){return":"==e?N(z):"("==e?_(Pe):void 0}function ce(e,t,n){function r(i,o){if(n?n.indexOf(i)>-1:","==i){var a=S.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),N((function(n,r){return n==t||r==t?_():_(e)}),r)}return i==t||o==t?N():n&&n.indexOf(";")>-1?_(e):N($(t))}return function(n,i){return n==t||i==t?N():_(e,r)}}function ue(e,t,n){for(var r=3;r<arguments.length;r++)S.cc.push(arguments[r]);return N(V(t,n),ce(e,t),B)}function de(e){return"}"==e?N():_(U,de)}function fe(e,t){if(c){if(":"==e)return N(ve);if("?"==t)return N(fe)}}function pe(e,t){if(c&&(":"==e||"in"==t))return N(ve)}function he(e){if(c&&":"==e)return S.stream.match(/^\s*\w+\s+is\b/,!1)?N(q,me,ve):N(ve)}function me(e,t){if("is"==t)return S.marked="keyword",N()}function ve(e,t){return"keyof"==t||"typeof"==t||"infer"==t||"readonly"==t?(S.marked="keyword",N("typeof"==t?z:ve)):"variable"==e||"void"==t?(S.marked="type",N(Te)):"|"==t||"&"==t?N(ve):"string"==e||"number"==e||"atom"==e?N(Te):"["==e?N(V("]"),ce(ve,"]",","),B,Te):"{"==e?N(V("}"),ye,B,Te):"("==e?N(ce(we,")"),ge,Te):"<"==e?N(ce(ve,">"),ve):"quasi"==e?_(Ee,Te):void 0}function ge(e){if("=>"==e)return N(ve)}function ye(e){return e.match(/[\}\)\]]/)?N():","==e||";"==e?N(ye):_(be,ye)}function be(e,t){return"variable"==e||"keyword"==S.style?(S.marked="property",N(be)):"?"==t||"number"==e||"string"==e?N(be):":"==e?N(ve):"["==e?N($("variable"),pe,$("]"),be):"("==e?_(je,be):e.match(/[;\}\)\],]/)?void 0:N()}function Ee(e,t){return"quasi"!=e?_():"${"!=t.slice(t.length-2)?N(Ee):N(ve,xe)}function xe(e){if("}"==e)return S.marked="string-2",S.state.tokenize=b,N(Ee)}function we(e,t){return"variable"==e&&S.stream.match(/^\s*[?:]/,!1)||"?"==t?N(we):":"==e?N(ve):"spread"==e?N(we):_(ve)}function Te(e,t){return"<"==t?N(V(">"),ce(ve,">"),B,Te):"|"==t||"."==e||"&"==t?N(ve):"["==e?N(ve,$("]"),Te):"extends"==t||"implements"==t?(S.marked="keyword",N(ve)):"?"==t?N(ve,$(":"),ve):void 0}function Ce(e,t){if("<"==t)return N(V(">"),ce(ve,">"),B,Te)}function ke(){return _(ve,Se)}function Se(e,t){if("="==t)return N(ve)}function _e(e,t){return"enum"==t?(S.marked="keyword",N(et)):_(Ne,fe,Ie,Oe)}function Ne(e,t){return c&&O(t)?(S.marked="keyword",N(Ne)):"variable"==e?(D(t),N()):"spread"==e?N(Ne):"["==e?ue(De,"]"):"{"==e?ue(Ae,"}"):void 0}function Ae(e,t){return"variable"!=e||S.stream.match(/^\s*:/,!1)?("variable"==e&&(S.marked="property"),"spread"==e?N(Ne):"}"==e?_():"["==e?N(q,$("]"),$(":"),Ae):N($(":"),Ne,Ie)):(D(t),N(Ie))}function De(){return _(Ne,Ie)}function Ie(e,t){if("="==t)return N(z)}function Oe(e){if(","==e)return N(_e)}function Le(e,t){if("keyword b"==e&&"else"==t)return N(V("form","else"),U,B)}function Fe(e,t){return"await"==t?N(Fe):"("==e?N(V(")"),Re,B):void 0}function Re(e){return"var"==e?N(_e,Me):"variable"==e?N(Me):_(Me)}function Me(e,t){return")"==e?N():";"==e?N(Me):"in"==t||"of"==t?(S.marked="keyword",N(q,Me)):_(q,Me)}function Pe(e,t){return"*"==t?(S.marked="keyword",N(Pe)):"variable"==e?(D(t),N(Pe)):"("==e?N(M,V(")"),ce(Be,")"),B,he,U,j):c&&"<"==t?N(V(">"),ce(ke,">"),B,Pe):void 0}function je(e,t){return"*"==t?(S.marked="keyword",N(je)):"variable"==e?(D(t),N(je)):"("==e?N(M,V(")"),ce(Be,")"),B,he,j):c&&"<"==t?N(V(">"),ce(ke,">"),B,je):void 0}function Ve(e,t){return"keyword"==e||"variable"==e?(S.marked="type",N(Ve)):"<"==t?N(V(">"),ce(ke,">"),B):void 0}function Be(e,t){return"@"==t&&N(q,Be),"spread"==e?N(Be):c&&O(t)?(S.marked="keyword",N(Be)):c&&"this"==e?N(fe,Ie):_(Ne,fe,Ie)}function $e(e,t){return"variable"==e?Ue(e,t):He(e,t)}function Ue(e,t){if("variable"==e)return D(t),N(He)}function He(e,t){return"<"==t?N(V(">"),ce(ke,">"),B,He):"extends"==t||"implements"==t||c&&","==e?("implements"==t&&(S.marked="keyword"),N(c?ve:q,He)):"{"==e?N(V("}"),qe,B):void 0}function qe(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||c&&O(t))&&S.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(S.marked="keyword",N(qe)):"variable"==e||"keyword"==S.style?(S.marked="property",N(ze,qe)):"number"==e||"string"==e?N(ze,qe):"["==e?N(q,fe,$("]"),ze,qe):"*"==t?(S.marked="keyword",N(qe)):c&&"("==e?_(je,qe):";"==e||","==e?N(qe):"}"==e?N():"@"==t?N(q,qe):void 0}function ze(e,t){if("!"==t)return N(ze);if("?"==t)return N(ze);if(":"==e)return N(ve,Ie);if("="==t)return N(z);var n=S.state.lexical.prev;return _(n&&"interface"==n.info?je:Pe)}function We(e,t){return"*"==t?(S.marked="keyword",N(Je,$(";"))):"default"==t?(S.marked="keyword",N(q,$(";"))):"{"==e?N(ce(Ge,"}"),Je,$(";")):_(U)}function Ge(e,t){return"as"==t?(S.marked="keyword",N($("variable"))):"variable"==e?_(z,Ge):void 0}function Ye(e){return"string"==e?N():"("==e?_(q):"."==e?_(K):_(Ke,Qe,Je)}function Ke(e,t){return"{"==e?ue(Ke,"}"):("variable"==e&&D(t),"*"==t&&(S.marked="keyword"),N(Xe))}function Qe(e){if(","==e)return N(Ke,Qe)}function Xe(e,t){if("as"==t)return S.marked="keyword",N(Ke)}function Je(e,t){if("from"==t)return S.marked="keyword",N(q)}function Ze(e){return"]"==e?N():_(ce(z,"]"))}function et(){return _(V("form"),Ne,$("{"),V("}"),ce(tt,"}"),B,B)}function tt(){return _(Ne,Ie)}function nt(e,t){return"operator"==e.lastType||","==e.lastType||f.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function rt(e,t,n){return t.tokenize==v&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}return M.lex=P.lex=!0,j.lex=!0,B.lex=!0,{startState:function(e){var n={tokenize:v,lastType:"sof",cc:[],lexical:new T((e||0)-i,0,"block",!1),localVars:t.localVars,context:t.localVars&&new L(null,null,!1),indented:e||0};return t.globalVars&&"object"==typeof t.globalVars&&(n.globalVars=t.globalVars),n},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),x(e,t)),t.tokenize!=y&&e.eatSpace())return null;var i=t.tokenize(e,t);return"comment"==n?i:(t.lastType="operator"!=n||"++"!=r&&"--"!=r?n:"incdec",k(t,i,n,r,e))},indent:function(e,n){if(e.tokenize==y||e.tokenize==b)return eF.Pass;if(e.tokenize!=v)return 0;var r,a=n&&n.charAt(0),s=e.lexical;if(!/^\s*else\b/.test(n))for(var l=e.cc.length-1;l>=0;--l){var c=e.cc[l];if(c==B)s=s.prev;else if(c!=Le&&c!=j)break}for(;("stat"==s.type||"form"==s.type)&&("}"==a||(r=e.cc[e.cc.length-1])&&(r==K||r==Q)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;o&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var u=s.type,d=a==u;return"vardef"==u?s.indented+("operator"==e.lastType||","==e.lastType?s.info.length+1:0):"form"==u&&"{"==a?s.indented:"form"==u?s.indented+i:"stat"==u?s.indented+(nt(e,n)?o||i:0):"switch"!=s.info||d||0==t.doubleIndentSwitch?s.align?s.column+(d?0:1):s.indented+(d?0:i):s.indented+(/^(?:case|default)\b/.test(n)?i:2*i)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:s?null:"/*",blockCommentEnd:s?null:"*/",blockCommentContinue:s?null:" * ",lineComment:s?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:s?"json":"javascript",jsonldMode:a,jsonMode:s,expressionAllowed:rt,skipExpression:function(e){k(e,"atom","atom","true",new eF.StringStream("",2,null))}}})),eF.registerHelper("wordChars","javascript",/[\w$]/),eF.defineMIME("text/javascript","javascript"),eF.defineMIME("text/ecmascript","javascript"),eF.defineMIME("application/javascript","javascript"),eF.defineMIME("application/x-javascript","javascript"),eF.defineMIME("application/ecmascript","javascript"),eF.defineMIME("application/json",{name:"javascript",json:!0}),eF.defineMIME("application/x-json",{name:"javascript",json:!0}),eF.defineMIME("application/manifest+json",{name:"javascript",json:!0}),eF.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),eF.defineMIME("text/typescript",{name:"javascript",typescript:!0}),eF.defineMIME("application/typescript",{name:"javascript",typescript:!0});var tF={};const nF=r({__proto__:null,default:a(tF)},[tF]);!function(e){var t={},n=/[^\s\u00a0]/,r=e.Pos,i=e.cmpPos;function o(e){var t=e.search(n);return-1==t?0:t}function a(e,t,n){return/\bstring\b/.test(e.getTokenTypeAt(r(t.line,0)))&&!/^[\'\"\`]/.test(n)}function s(e,t){var n=e.getMode();return!1!==n.useInnerComments&&n.innerMode?e.getModeAt(t):n}e.commands.toggleComment=function(e){e.toggleComment()},e.defineExtension("toggleComment",(function(e){e||(e=t);for(var n=this,i=1/0,o=this.listSelections(),a=null,s=o.length-1;s>=0;s--){var l=o[s].from(),c=o[s].to();l.line>=i||(c.line>=i&&(c=r(i,0)),i=l.line,null==a?n.uncomment(l,c,e)?a="un":(n.lineComment(l,c,e),a="line"):"un"==a?n.uncomment(l,c,e):n.lineComment(l,c,e))}})),e.defineExtension("lineComment",(function(e,i,l){l||(l=t);var c=this,u=s(c,e),d=c.getLine(e.line);if(null!=d&&!a(c,e,d)){var f=l.lineComment||u.lineComment;if(f){var p=Math.min(0!=i.ch||i.line==e.line?i.line+1:i.line,c.lastLine()+1),h=null==l.padding?" ":l.padding,m=l.commentBlankLines||e.line==i.line;c.operation((function(){if(l.indent){for(var t=null,i=e.line;i<p;++i){var a=(s=c.getLine(i)).slice(0,o(s));(null==t||t.length>a.length)&&(t=a)}for(i=e.line;i<p;++i){var s=c.getLine(i),u=t.length;(m||n.test(s))&&(s.slice(0,u)!=t&&(u=o(s)),c.replaceRange(t+f+h,r(i,0),r(i,u)))}}else for(i=e.line;i<p;++i)(m||n.test(c.getLine(i)))&&c.replaceRange(f+h,r(i,0))}))}else(l.blockCommentStart||u.blockCommentStart)&&(l.fullLines=!0,c.blockComment(e,i,l))}})),e.defineExtension("blockComment",(function(e,o,a){a||(a=t);var l=this,c=s(l,e),u=a.blockCommentStart||c.blockCommentStart,d=a.blockCommentEnd||c.blockCommentEnd;if(u&&d){if(!/\bcomment\b/.test(l.getTokenTypeAt(r(e.line,0)))){var f=Math.min(o.line,l.lastLine());f!=e.line&&0==o.ch&&n.test(l.getLine(f))&&--f;var p=null==a.padding?" ":a.padding;e.line>f||l.operation((function(){if(0!=a.fullLines){var t=n.test(l.getLine(f));l.replaceRange(p+d,r(f)),l.replaceRange(u+p,r(e.line,0));var s=a.blockCommentLead||c.blockCommentLead;if(null!=s)for(var h=e.line+1;h<=f;++h)(h!=f||t)&&l.replaceRange(s+p,r(h,0))}else{var m=0==i(l.getCursor("to"),o),v=!l.somethingSelected();l.replaceRange(d,o),m&&l.setSelection(v?o:l.getCursor("from"),o),l.replaceRange(u,e)}}))}}else(a.lineComment||c.lineComment)&&0!=a.fullLines&&l.lineComment(e,o,a)})),e.defineExtension("uncomment",(function(e,i,o){o||(o=t);var a,l=this,c=s(l,e),u=Math.min(0!=i.ch||i.line==e.line?i.line:i.line-1,l.lastLine()),d=Math.min(e.line,u),f=o.lineComment||c.lineComment,p=[],h=null==o.padding?" ":o.padding;e:if(f){for(var m=d;m<=u;++m){var v=l.getLine(m),g=v.indexOf(f);if(g>-1&&!/comment/.test(l.getTokenTypeAt(r(m,g+1)))&&(g=-1),-1==g&&n.test(v))break e;if(g>-1&&n.test(v.slice(0,g)))break e;p.push(v)}if(l.operation((function(){for(var e=d;e<=u;++e){var t=p[e-d],n=t.indexOf(f),i=n+f.length;n<0||(t.slice(i,i+h.length)==h&&(i+=h.length),a=!0,l.replaceRange("",r(e,n),r(e,i)))}})),a)return!0}var y=o.blockCommentStart||c.blockCommentStart,b=o.blockCommentEnd||c.blockCommentEnd;if(!y||!b)return!1;var E=o.blockCommentLead||c.blockCommentLead,x=l.getLine(d),w=x.indexOf(y);if(-1==w)return!1;var T=u==d?x:l.getLine(u),C=T.indexOf(b,u==d?w+y.length:0),k=r(d,w+1),S=r(u,C+1);if(-1==C||!/comment/.test(l.getTokenTypeAt(k))||!/comment/.test(l.getTokenTypeAt(S))||l.getRange(k,S,"\n").indexOf(b)>-1)return!1;var _=x.lastIndexOf(y,e.ch),N=-1==_?-1:x.slice(0,e.ch).indexOf(b,_+y.length);if(-1!=_&&-1!=N&&N+b.length!=e.ch)return!1;N=T.indexOf(b,i.ch);var A=T.slice(i.ch).lastIndexOf(y,N-i.ch);return _=-1==N||-1==A?-1:i.ch+A,(-1==N||-1==_||_==i.ch)&&(l.operation((function(){l.replaceRange("",r(u,C-(h&&T.slice(C-h.length,C)==h?h.length:0)),r(u,C+b.length));var e=w+y.length;if(h&&x.slice(e,e+h.length)==h&&(e+=h.length),l.replaceRange("",r(d,w),r(d,e)),E)for(var t=d+1;t<=u;++t){var i=l.getLine(t),o=i.indexOf(E);if(-1!=o&&!n.test(i.slice(0,o))){var a=o+E.length;h&&i.slice(a,a+h.length)==h&&(a+=h.length),l.replaceRange("",r(t,o),r(t,a))}}})),!0)}))}(CL());var rF={};const iF=r({__proto__:null,default:a(rF)},[rF]);!function(e){function t(e,t){return"string"==typeof e?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),t?"gi":"g"):e.global||(e=new RegExp(e.source,e.ignoreCase?"gi":"g")),{token:function(t){e.lastIndex=t.pos;var n=e.exec(t.string);if(n&&n.index==t.pos)return t.pos+=n[0].length||1,"searching";n?t.pos=n.index:t.skipToEnd()}}}function n(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function r(e){return e.state.search||(e.state.search=new n)}function i(e){return"string"==typeof e&&e==e.toLowerCase()}function o(e,t,n){return e.getSearchCursor(t,n,{caseFold:i(t),multiline:!0})}function a(e,t,n,r,i){e.openDialog(t,r,{value:n,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){h(e)},onKeyDown:i,bottom:e.options.search.bottom})}function s(e,t,n,r,i){e.openDialog?e.openDialog(t,i,{value:r,selectValueOnOpen:!0,bottom:e.options.search.bottom}):i(prompt(n,r))}function l(e,t,n,r){e.openConfirm?e.openConfirm(t,r):confirm(n)&&r[0]()}function c(e){return e.replace(/\\([nrt\\])/g,(function(e,t){return"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\"==t?"\\":e}))}function u(e){var t=e.match(/^\/(.*)\/([a-z]*)$/);if(t)try{e=new RegExp(t[1],-1==t[2].indexOf("i")?"":"i")}catch(aN){}else e=c(e);return("string"==typeof e?""==e:e.test(""))&&(e=/x^/),e}function d(e,n,r){n.queryText=r,n.query=u(r),e.removeOverlay(n.overlay,i(n.query)),n.overlay=t(n.query,i(n.query)),e.addOverlay(n.overlay),e.showMatchesOnScrollbar&&(n.annotate&&(n.annotate.clear(),n.annotate=null),n.annotate=e.showMatchesOnScrollbar(n.query,i(n.query)))}function f(t,n,i,o){var l=r(t);if(l.query)return p(t,n);var c=t.getSelection()||l.lastQuery;if(c instanceof RegExp&&"x^"==c.source&&(c=null),i&&t.openDialog){var u=null,f=function(n,r){e.e_stop(r),n&&(n!=l.queryText&&(d(t,l,n),l.posFrom=l.posTo=t.getCursor()),u&&(u.style.opacity=1),p(t,r.shiftKey,(function(e,n){var r;n.line<3&&document.querySelector&&(r=t.display.wrapper.querySelector(".CodeMirror-dialog"))&&r.getBoundingClientRect().bottom-4>t.cursorCoords(n,"window").top&&((u=r).style.opacity=.4)})))};a(t,v(t),c,f,(function(n,i){var o=e.keyName(n),a=t.getOption("extraKeys"),s=a&&a[o]||e.keyMap[t.getOption("keyMap")][o];"findNext"==s||"findPrev"==s||"findPersistentNext"==s||"findPersistentPrev"==s?(e.e_stop(n),d(t,r(t),i),t.execCommand(s)):"find"!=s&&"findPersistent"!=s||(e.e_stop(n),f(i,n))})),o&&c&&(d(t,l,c),p(t,n))}else s(t,v(t),"Search for:",c,(function(e){e&&!l.query&&t.operation((function(){d(t,l,e),l.posFrom=l.posTo=t.getCursor(),p(t,n)}))}))}function p(t,n,i){t.operation((function(){var a=r(t),s=o(t,a.query,n?a.posFrom:a.posTo);(s.find(n)||(s=o(t,a.query,n?e.Pos(t.lastLine()):e.Pos(t.firstLine(),0))).find(n))&&(t.setSelection(s.from(),s.to()),t.scrollIntoView({from:s.from(),to:s.to()},20),a.posFrom=s.from(),a.posTo=s.to(),i&&i(s.from(),s.to()))}))}function h(e){e.operation((function(){var t=r(e);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,e.removeOverlay(t.overlay),t.annotate&&(t.annotate.clear(),t.annotate=null))}))}function m(e,t){var n=e?document.createElement(e):document.createDocumentFragment();for(var r in t)n[r]=t[r];for(var i=2;i<arguments.length;i++){var o=arguments[i];n.appendChild("string"==typeof o?document.createTextNode(o):o)}return n}function v(e){return m("",null,m("span",{className:"CodeMirror-search-label"},e.phrase("Search:"))," ",m("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",m("span",{style:"color: #888",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}function g(e){return m("",null," ",m("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",m("span",{style:"color: #888",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}function y(e){return m("",null,m("span",{className:"CodeMirror-search-label"},e.phrase("With:"))," ",m("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"}))}function b(e){return m("",null,m("span",{className:"CodeMirror-search-label"},e.phrase("Replace?"))," ",m("button",{},e.phrase("Yes"))," ",m("button",{},e.phrase("No"))," ",m("button",{},e.phrase("All"))," ",m("button",{},e.phrase("Stop")))}function E(e,t,n){e.operation((function(){for(var r=o(e,t);r.findNext();)if("string"!=typeof t){var i=e.getRange(r.from(),r.to()).match(t);r.replace(n.replace(/\$(\d)/g,(function(e,t){return i[t]})))}else r.replace(n)}))}function x(e,t){if(!e.getOption("readOnly")){var n=e.getSelection()||r(e).lastQuery,i=t?e.phrase("Replace all:"):e.phrase("Replace:"),a=m("",null,m("span",{className:"CodeMirror-search-label"},i),g(e));s(e,a,i,n,(function(n){n&&(n=u(n),s(e,y(e),e.phrase("Replace with:"),"",(function(r){if(r=c(r),t)E(e,n,r);else{h(e);var i=o(e,n,e.getCursor("from")),a=function(){var t,c=i.from();!(t=i.findNext())&&(i=o(e,n),!(t=i.findNext())||c&&i.from().line==c.line&&i.from().ch==c.ch)||(e.setSelection(i.from(),i.to()),e.scrollIntoView({from:i.from(),to:i.to()}),l(e,b(e),e.phrase("Replace?"),[function(){s(t)},a,function(){E(e,n,r)}]))},s=function(e){i.replace("string"==typeof n?r:r.replace(/\$(\d)/g,(function(t,n){return e[n]}))),a()};a()}})))}))}}e.defineOption("search",{bottom:!1}),e.commands.find=function(e){h(e),f(e)},e.commands.findPersistent=function(e){h(e),f(e,!1,!0)},e.commands.findPersistentNext=function(e){f(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){f(e,!0,!0,!0)},e.commands.findNext=f,e.commands.findPrev=function(e){f(e,!0)},e.commands.clearSearch=h,e.commands.replace=x,e.commands.replaceAll=function(e){x(e,!0)}}(CL(),GL());var oF={};const aF=r({__proto__:null,default:a(oF)},[oF]);SL.registerHelper("hint","graphql",((e,t)=>{const{schema:n,externalFragments:r,autocompleteOptions:i}=t;if(!n)return;const o=e.getCursor(),a=e.getTokenAt(o),s=null!==a.type&&/"|\w/.test(a.string[0])?a.start:a.end,l=new Vu(o.line,s),c={list:Nu(n,e.getValue(),l,a,r,i).map((e=>{var t;return{text:null!==(t=null==e?void 0:e.rawInsert)&&void 0!==t?t:e.label,type:e.type,description:e.documentation,isDeprecated:e.isDeprecated,deprecationReason:e.deprecationReason}})),from:{line:o.line,ch:s},to:{line:o.line,ch:a.end}};return(null==c?void 0:c.list)&&c.list.length>0&&(c.from=SL.Pos(c.from.line,c.from.ch),c.to=SL.Pos(c.to.line,c.to.ch),SL.signal(e,"hasCompletion",e,c,a)),c}));const sF=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),lF=["error","warning","information","hint"],cF={"GraphQL: Validation":"validation","GraphQL: Deprecation":"deprecation","GraphQL: Syntax":"syntax"};SL.registerHelper("lint","graphql",((e,t)=>{const{schema:n,validationRules:r,externalFragments:i}=t;return Hu(e,n,r,0,i).map((e=>({message:e.message,severity:e.severity?lF[e.severity-1]:lF[0],type:e.source?cF[e.source]:void 0,from:SL.Pos(e.range.start.line,e.range.start.character),to:SL.Pos(e.range.end.line,e.range.end.character)})))}));const uF=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function dF(e,t){const n=[];let r=e;for(;null==r?void 0:r.kind;)n.push(r),r=r.prevState;for(let i=n.length-1;i>=0;i--)t(n[i])}function fF(e,t){const n={schema:e,type:null,parentType:null,inputType:null,directiveDef:null,fieldDef:null,argDef:null,argDefs:null,objectFieldDefs:null};return dF(t,(t=>{var r,i;switch(t.kind){case"Query":case"ShortQuery":n.type=e.getQueryType();break;case"Mutation":n.type=e.getMutationType();break;case"Subscription":n.type=e.getSubscriptionType();break;case"InlineFragment":case"FragmentDefinition":t.type&&(n.type=e.getType(t.type));break;case"Field":case"AliasedField":n.fieldDef=n.type&&t.name?pF(e,n.parentType,t.name):null,n.type=null===(r=n.fieldDef)||void 0===r?void 0:r.type;break;case"SelectionSet":n.parentType=n.type?dn(n.type):null;break;case"Directive":n.directiveDef=t.name?e.getDirective(t.name):null;break;case"Arguments":const o=t.prevState?"Field"===t.prevState.kind?n.fieldDef:"Directive"===t.prevState.kind?n.directiveDef:"AliasedField"===t.prevState.kind?t.prevState.name&&pF(e,n.parentType,t.prevState.name):null:null;n.argDefs=o?o.args:null;break;case"Argument":if(n.argDef=null,n.argDefs)for(let e=0;e<n.argDefs.length;e++)if(n.argDefs[e].name===t.name){n.argDef=n.argDefs[e];break}n.inputType=null===(i=n.argDef)||void 0===i?void 0:i.type;break;case"EnumValue":const a=n.inputType?dn(n.inputType):null;n.enumValue=a instanceof Sn?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return e[n]}(a.getValues(),(e=>e.value===t.name)):null;break;case"ListValue":const s=n.inputType?cn(n.inputType):null;n.inputType=s instanceof rn?s.ofType:null;break;case"ObjectValue":const l=n.inputType?dn(n.inputType):null;n.objectFieldDefs=l instanceof An?l.getFields():null;break;case"ObjectField":const c=t.name&&n.objectFieldDefs?n.objectFieldDefs[t.name]:null;n.inputType=null==c?void 0:c.type,n.fieldDef=c;break;case"NamedType":n.type=t.name?e.getType(t.name):null}})),n}function pF(e,t,n){return n===hr.name&&e.getQueryType()===t?hr:n===mr.name&&e.getQueryType()===t?mr:n===vr.name&&en(t)?vr:t&&t.getFields?t.getFields()[n]:void 0}function hF(e){return{kind:"Field",schema:e.schema,field:e.fieldDef,type:bF(e.fieldDef)?null:e.parentType}}function mF(e){return{kind:"Directive",schema:e.schema,directive:e.directiveDef}}function vF(e){return e.directiveDef?{kind:"Argument",schema:e.schema,argument:e.argDef,directive:e.directiveDef}:{kind:"Argument",schema:e.schema,argument:e.argDef,field:e.fieldDef,type:bF(e.fieldDef)?null:e.parentType}}function gF(e){return{kind:"EnumValue",value:e.enumValue||void 0,type:e.inputType?dn(e.inputType):void 0}}function yF(e,t){return{kind:"Type",schema:e.schema,type:t||e.type}}function bF(e){return"__"===e.name.slice(0,2)}function EF(e,t){const n=e.state.info,r=t.target||t.srcElement;if(!(r instanceof HTMLElement))return;if("SPAN"!==r.nodeName||void 0!==n.hoverTimeout)return;const i=r.getBoundingClientRect(),o=function(){clearTimeout(n.hoverTimeout),n.hoverTimeout=setTimeout(s,l)},a=function(){SL.off(document,"mousemove",o),SL.off(e.getWrapperElement(),"mouseout",a),clearTimeout(n.hoverTimeout),n.hoverTimeout=void 0},s=function(){SL.off(document,"mousemove",o),SL.off(e.getWrapperElement(),"mouseout",a),n.hoverTimeout=void 0,function(e,t){const n=e.coordsChar({left:(t.left+t.right)/2,top:(t.top+t.bottom)/2},"window"),r=e.state.info,{options:i}=r,o=i.render||e.getHelper(n,"info");if(o){const r=e.getTokenAt(n,!0);if(r){const a=o(r,i,e,n);a&&function(e,t,n){const r=document.createElement("div");r.className="CodeMirror-info",r.append(n),document.body.append(r);const i=r.getBoundingClientRect(),o=window.getComputedStyle(r),a=i.right-i.left+parseFloat(o.marginLeft)+parseFloat(o.marginRight),s=i.bottom-i.top+parseFloat(o.marginTop)+parseFloat(o.marginBottom);let l=t.bottom;s>window.innerHeight-t.bottom-15&&t.top>window.innerHeight-t.bottom&&(l=t.top-s);l<0&&(l=t.bottom);let c,u=Math.max(0,window.innerWidth-a-15);u>t.left&&(u=t.left);r.style.opacity="1",r.style.top=l+"px",r.style.left=u+"px";const d=function(){clearTimeout(c)},f=function(){clearTimeout(c),c=setTimeout(p,200)},p=function(){SL.off(r,"mouseover",d),SL.off(r,"mouseout",f),SL.off(e.getWrapperElement(),"mouseout",f),r.style.opacity?(r.style.opacity="0",setTimeout((()=>{r.parentNode&&r.remove()}),600)):r.parentNode&&r.remove()};SL.on(r,"mouseover",d),SL.on(r,"mouseout",f),SL.on(e.getWrapperElement(),"mouseout",f)}(e,t,a)}}}(e,i)},l=function(e){const{options:t}=e.state.info;return(null==t?void 0:t.hoverTime)||500}(e);n.hoverTimeout=setTimeout(s,l),SL.on(document,"mousemove",o),SL.on(e.getWrapperElement(),"mouseout",a)}SL.defineOption("info",!1,((e,t,n)=>{if(n&&n!==SL.Init){const t=e.state.info.onMouseOver;SL.off(e.getWrapperElement(),"mouseover",t),clearTimeout(e.state.info.hoverTimeout),delete e.state.info}if(t){const n=e.state.info=function(e){return{options:e instanceof Function?{render:e}:!0===e?{}:e}}(t);n.onMouseOver=EF.bind(null,e),SL.on(e.getWrapperElement(),"mouseover",n.onMouseOver)}}));const xF=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function wF(e,t,n,r){const i=document.createElement("span");i.className="type-name-pill",r instanceof on?(TF(i,t,n,r.ofType),kF(i,"!")):r instanceof rn?(kF(i,"["),TF(i,t,n,r.ofType),kF(i,"]")):kF(i,(null==r?void 0:r.name)||"","type-name",n,yF(t,r)),e.append(i)}function TF(e,t,n,r){r instanceof on?(TF(e,t,n,r.ofType),kF(e,"!")):r instanceof rn?(kF(e,"["),TF(e,t,n,r.ofType),kF(e,"]")):kF(e,(null==r?void 0:r.name)||"","type-name",n,yF(t,r))}function CF(e,t,n){const{description:r}=n;if(r){const n=document.createElement("div");n.className="info-description",t.renderDescription?n.innerHTML=t.renderDescription(r):n.append(document.createTextNode(r)),e.append(n)}!function(e,t,n){const r=n.deprecationReason;if(r){const n=document.createElement("div");n.className="info-deprecation",e.append(n);const i=document.createElement("span");i.className="info-deprecation-label",i.append(document.createTextNode("Deprecated")),n.append(i);const o=document.createElement("div");o.className="info-deprecation-reason",t.renderDescription?o.innerHTML=t.renderDescription(r):o.append(document.createTextNode(r)),n.append(o)}}(e,t,n)}function kF(e,t,n="",r={onClick:null},i=null){if(n){const{onClick:o}=r;let a;o?(a=document.createElement("a"),a.href="javascript:void 0",a.addEventListener("click",(e=>{e.preventDefault(),o(i,e)}))):a=document.createElement("span"),a.className=n,a.append(document.createTextNode(t)),e.append(a)}else e.append(document.createTextNode(t))}SL.registerHelper("info","graphql",((e,t)=>{var n;if(!t.schema||!e.state)return;const{kind:r,step:i}=e.state,o=fF(t.schema,e.state);if("Field"===r&&0===i&&o.fieldDef||"AliasedField"===r&&2===i&&o.fieldDef||"ObjectField"===r&&0===i&&o.fieldDef){const e=document.createElement("div");e.className="CodeMirror-info-header",function(e,t,n){(function(e,t,n){var r;const i=(null===(r=t.fieldDef)||void 0===r?void 0:r.name)||"";kF(e,i,"field-name",n,hF(t))})(e,t,n),wF(e,t,n,t.type)}(e,o,t);const n=document.createElement("div");return n.append(e),CF(n,t,o.fieldDef),n}if("Directive"===r&&1===i&&o.directiveDef){const e=document.createElement("div");e.className="CodeMirror-info-header",function(e,t,n){var r;const i="@"+((null===(r=t.directiveDef)||void 0===r?void 0:r.name)||"");kF(e,i,"directive-name",n,mF(t))}(e,o,t);const n=document.createElement("div");return n.append(e),CF(n,t,o.directiveDef),n}if("Argument"===r&&0===i&&o.argDef){const e=document.createElement("div");e.className="CodeMirror-info-header",function(e,t,n){var r;const i=(null===(r=t.argDef)||void 0===r?void 0:r.name)||"";kF(e,i,"arg-name",n,vF(t)),wF(e,t,n,t.inputType)}(e,o,t);const n=document.createElement("div");return n.append(e),CF(n,t,o.argDef),n}if("EnumValue"===r&&(null===(n=o.enumValue)||void 0===n?void 0:n.description)){const e=document.createElement("div");e.className="CodeMirror-info-header",function(e,t,n){var r;const i=(null===(r=t.enumValue)||void 0===r?void 0:r.name)||"";TF(e,t,n,t.inputType),kF(e,"."),kF(e,i,"enum-value",n,gF(t))}(e,o,t);const n=document.createElement("div");return n.append(e),CF(n,t,o.enumValue),n}if("NamedType"===r&&o.type&&o.type.description){const e=document.createElement("div");e.className="CodeMirror-info-header",TF(e,o,t,o.type);const n=document.createElement("div");return n.append(e),CF(n,t,o.type),n}}));const SF=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function _F(e,t){const n=t.target||t.srcElement;if(!(n instanceof HTMLElement))return;if("SPAN"!==(null==n?void 0:n.nodeName))return;const r=n.getBoundingClientRect(),i={left:(r.left+r.right)/2,top:(r.top+r.bottom)/2};e.state.jump.cursor=i,e.state.jump.isHoldingModifier&&IF(e)}function NF(e){e.state.jump.isHoldingModifier||!e.state.jump.cursor?e.state.jump.isHoldingModifier&&e.state.jump.marker&&OF(e):e.state.jump.cursor=null}function AF(e,t){if(e.state.jump.isHoldingModifier||t.key!==(DF?"Meta":"Control"))return;e.state.jump.isHoldingModifier=!0,e.state.jump.cursor&&IF(e);const n=o=>{o.code===t.code&&(e.state.jump.isHoldingModifier=!1,e.state.jump.marker&&OF(e),SL.off(document,"keyup",n),SL.off(document,"click",r),e.off("mousedown",i))},r=t=>{const{destination:n,options:r}=e.state.jump;n&&r.onClick(n,t)},i=(t,n)=>{e.state.jump.destination&&(n.codemirrorIgnore=!0)};SL.on(document,"keyup",n),SL.on(document,"click",r),e.on("mousedown",i)}SL.defineOption("jump",!1,((e,t,n)=>{if(n&&n!==SL.Init){const t=e.state.jump.onMouseOver;SL.off(e.getWrapperElement(),"mouseover",t);const n=e.state.jump.onMouseOut;SL.off(e.getWrapperElement(),"mouseout",n),SL.off(document,"keydown",e.state.jump.onKeyDown),delete e.state.jump}if(t){const n=e.state.jump={options:t,onMouseOver:_F.bind(null,e),onMouseOut:NF.bind(null,e),onKeyDown:AF.bind(null,e)};SL.on(e.getWrapperElement(),"mouseover",n.onMouseOver),SL.on(e.getWrapperElement(),"mouseout",n.onMouseOut),SL.on(document,"keydown",n.onKeyDown)}}));const DF="undefined"!=typeof navigator&&navigator.userAgent.includes("Mac");function IF(e){if(e.state.jump.marker)return;const{cursor:t,options:n}=e.state.jump,r=e.coordsChar(t),i=e.getTokenAt(r,!0),o=n.getDestination||e.getHelper(r,"jump");if(o){const t=o(i,n,e);if(t){const n=e.markText({line:r.line,ch:i.start},{line:r.line,ch:i.end},{className:"CodeMirror-jump-token"});e.state.jump.marker=n,e.state.jump.destination=t}}}function OF(e){const{marker:t}=e.state.jump;e.state.jump.marker=null,e.state.jump.destination=null,t.clear()}SL.registerHelper("jump","graphql",((e,t)=>{if(!t.schema||!t.onClick||!e.state)return;const{state:n}=e,{kind:r,step:i}=n,o=fF(t.schema,n);return"Field"===r&&0===i&&o.fieldDef||"AliasedField"===r&&2===i&&o.fieldDef?hF(o):"Directive"===r&&1===i&&o.directiveDef?mF(o):"Argument"===r&&0===i&&o.argDef?vF(o):"EnumValue"===r&&o.enumValue?gF(o):"NamedType"===r&&o.type?yF(o):void 0}));const LF=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function FF(e,t){var n,r;const{levels:i,indentLevel:o}=e;return((i&&0!==i.length?i.at(-1)-((null===(n=this.electricInput)||void 0===n?void 0:n.test(t))?1:0):o)||0)*((null===(r=this.config)||void 0===r?void 0:r.indentUnit)||0)}SL.defineMode("graphql",(e=>{const t=cu({eatWhitespace:e=>e.eatWhile(ru),lexRules:iu,parseRules:ou,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:t.startState,token:t.token,indent:FF,electricInput:/^\s*[})\]]/,fold:"brace",lineComment:"#",closeBrackets:{pairs:'()[]{}""',explode:"()[]{}"}}}));const RF=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function MF(e,t,n){const r=function(e,t){if(!t)return PF(e,(e=>!e.isDeprecated));const n=e.map((e=>({proximity:VF(jF(e.text),t),entry:e}))),r=PF(PF(n,(e=>e.proximity<=2)),(e=>!e.entry.isDeprecated)).sort(((e,t)=>(e.entry.isDeprecated?1:0)-(t.entry.isDeprecated?1:0)||e.proximity-t.proximity||e.entry.text.length-t.entry.text.length));return r.map((e=>e.entry))}(n,jF(t.string));if(!r)return;const i=null!==t.type&&/"|\w/.test(t.string[0])?t.start:t.end;return{list:r,from:{line:e.line,ch:i},to:{line:e.line,ch:t.end}}}function PF(e,t){const n=e.filter(t);return 0===n.length?e:n}function jF(e){return e.toLowerCase().replaceAll(/\W/g,"")}function VF(e,t){let n=function(e,t){let n,r;const i=[],o=e.length,a=t.length;for(n=0;n<=o;n++)i[n]=[n];for(r=1;r<=a;r++)i[0][r]=r;for(n=1;n<=o;n++)for(r=1;r<=a;r++){const o=e[n-1]===t[r-1]?0:1;i[n][r]=Math.min(i[n-1][r]+1,i[n][r-1]+1,i[n-1][r-1]+o),n>1&&r>1&&e[n-1]===t[r-2]&&e[n-2]===t[r-1]&&(i[n][r]=Math.min(i[n][r],i[n-2][r-2]+o))}return i[o][a]}(t,e);return e.length>t.length&&(n-=e.length-t.length-1,n+=0===e.indexOf(t)?0:.5),n}SL.registerHelper("hint","graphql-variables",((e,t)=>{const n=e.getCursor(),r=e.getTokenAt(n),i=function(e,t,n){const r="Invalid"===t.state.kind?t.state.prevState:t.state,{kind:i,step:o}=r;if("Document"===i&&0===o)return MF(e,t,[{text:"{"}]);const{variableToType:a}=n;if(!a)return;const s=function(e,t){const n={type:null,fields:null};return dF(t,(t=>{switch(t.kind){case"Variable":n.type=e[t.name];break;case"ListValue":{const e=n.type?cn(n.type):void 0;n.type=e instanceof rn?e.ofType:null;break}case"ObjectValue":{const e=n.type?dn(n.type):void 0;n.fields=e instanceof An?e.getFields():null;break}case"ObjectField":{const e=t.name&&n.fields?n.fields[t.name]:null;n.type=null==e?void 0:e.type;break}}})),n}(a,t.state);if("Document"===i||"Variable"===i&&0===o){return MF(e,t,Object.keys(a).map((e=>({text:`"${e}": `,type:a[e]}))))}if(("ObjectValue"===i||"ObjectField"===i&&0===o)&&s.fields){return MF(e,t,Object.keys(s.fields).map((e=>s.fields[e])).map((e=>({text:`"${e.name}": `,type:e.type,description:e.description}))))}if("StringValue"===i||"NumberValue"===i||"BooleanValue"===i||"NullValue"===i||"ListValue"===i&&1===o||"ObjectField"===i&&2===o||"Variable"===i&&2===o){const n=s.type?dn(s.type):void 0;if(n instanceof An)return MF(e,t,[{text:"{"}]);if(n instanceof Sn){return MF(e,t,n.getValues().map((e=>({text:`"${e.name}"`,type:n,description:e.description}))))}if(n===Bn)return MF(e,t,[{text:"true",type:Bn,description:"Not false."},{text:"false",type:Bn,description:"Not true."}])}}(n,r,t);return(null==i?void 0:i.list)&&i.list.length>0&&(i.from=SL.Pos(i.from.line,i.from.ch),i.to=SL.Pos(i.to.line,i.to.ch),SL.signal(e,"hasCompletion",e,i,r)),i}));const BF=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));let $F,UF,HF,qF,zF,WF,GF;function YF(){const e=HF,t=[];if(JF("{"),!tR("}")){do{t.push(KF())}while(tR(","));JF("}")}return{kind:"Object",start:e,end:zF,members:t}}function KF(){const e=HF,t="String"===GF?XF():null;JF("String"),JF(":");const n=QF();return{kind:"Member",start:e,end:zF,key:t,value:n}}function QF(){switch(GF){case"[":return function(){const e=HF,t=[];if(JF("["),!tR("]")){do{t.push(QF())}while(tR(","));JF("]")}return{kind:"Array",start:e,end:zF,values:t}}();case"{":return YF();case"String":case"Number":case"Boolean":case"Null":const e=XF();return rR(),e}JF("Value")}function XF(){return{kind:GF,start:HF,end:qF,value:JSON.parse($F.slice(HF,qF))}}function JF(e){if(GF===e)return void rR();let t;if("EOF"===GF)t="[end of file]";else if(qF-HF>1)t="`"+$F.slice(HF,qF)+"`";else{const e=$F.slice(HF).match(/^.+?\b/);t="`"+(e?e[0]:$F[HF])+"`"}throw eR(`Expected ${e} but found ${t}.`)}class ZF extends Error{constructor(e,t){super(e),this.position=t}}function eR(e){return new ZF(e,{start:HF,end:qF})}function tR(e){if(GF===e)return rR(),!0}function nR(){return qF<UF&&(qF++,WF=qF===UF?0:$F.charCodeAt(qF)),WF}function rR(){for(zF=qF;9===WF||10===WF||13===WF||32===WF;)nR();if(0!==WF){switch(HF=qF,WF){case 34:return GF="String",function(){nR();for(;34!==WF&&WF>31;)if(92===WF)switch(WF=nR(),WF){case 34:case 47:case 92:case 98:case 102:case 110:case 114:case 116:nR();break;case 117:nR(),iR(),iR(),iR(),iR();break;default:throw eR("Bad character escape sequence.")}else{if(qF===UF)throw eR("Unterminated string.");nR()}if(34===WF)return void nR();throw eR("Unterminated string.")}();case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return GF="Number",function(){45===WF&&nR();48===WF?nR():oR();46===WF&&(nR(),oR());69!==WF&&101!==WF||(WF=nR(),43!==WF&&45!==WF||nR(),oR())}();case 102:if("false"!==$F.slice(HF,HF+5))break;return qF+=4,nR(),void(GF="Boolean");case 110:if("null"!==$F.slice(HF,HF+4))break;return qF+=3,nR(),void(GF="Null");case 116:if("true"!==$F.slice(HF,HF+4))break;return qF+=3,nR(),void(GF="Boolean")}GF=$F[HF],nR()}else GF="EOF"}function iR(){if(WF>=48&&WF<=57||WF>=65&&WF<=70||WF>=97&&WF<=102)return nR();throw eR("Expected hexadecimal digit.")}function oR(){if(WF<48||WF>57)throw eR("Expected decimal digit.");do{nR()}while(WF>=48&&WF<=57)}function aR(e,t){if(!e||!t)return[];if(e instanceof on)return"Null"===t.kind?[[t,`Type "${e}" is non-nullable and cannot be null.`]]:aR(e.ofType,t);if("Null"===t.kind)return[];if(e instanceof rn){const n=e.ofType;if("Array"===t.kind){return lR(t.values||[],(e=>aR(n,e)))}return aR(n,t)}if(e instanceof An){if("Object"!==t.kind)return[[t,`Type "${e}" must be an Object.`]];const n=Object.create(null),r=lR(t.members,(t=>{var r;const i=null===(r=null==t?void 0:t.key)||void 0===r?void 0:r.value;n[i]=!0;const o=e.getFields()[i];if(!o)return[[t.key,`Type "${e}" does not have a field "${i}".`]];return aR(o?o.type:void 0,t.value)}));for(const i of Object.keys(e.getFields())){const o=e.getFields()[i];!n[i]&&o.type instanceof on&&!o.defaultValue&&r.push([t,`Object of type "${e}" is missing required field "${i}".`])}return r}return"Boolean"===e.name&&"Boolean"!==t.kind||"String"===e.name&&"String"!==t.kind||"ID"===e.name&&"Number"!==t.kind&&"String"!==t.kind||"Float"===e.name&&"Number"!==t.kind||"Int"===e.name&&("Number"!==t.kind||(0|t.value)!==t.value)||(e instanceof Sn||e instanceof hn)&&("String"!==t.kind&&"Number"!==t.kind&&"Boolean"!==t.kind&&"Null"!==t.kind||(null==(n=e.parseValue(t.value))||n!=n))?[[t,`Expected value of type "${e}".`]]:[];var n}function sR(e,t,n){return{message:n,severity:"error",type:"validation",from:e.posFromIndex(t.start),to:e.posFromIndex(t.end)}}function lR(e,t){return Array.prototype.concat.apply([],e.map(t))}SL.registerHelper("lint","graphql-variables",((e,t,n)=>{if(!e)return[];let r;try{r=function(e){$F=e,UF=e.length,HF=qF=zF=-1,nR(),rR();const t=YF();return JF("EOF"),t}(e)}catch(o){if(o instanceof ZF)return[sR(n,o.position,o.message)];throw o}const{variableToType:i}=t;return i?function(e,t,n){var r;const i=[];for(const o of n.members)if(o){const n=null===(r=o.key)||void 0===r?void 0:r.value,a=t[n];if(a)for(const[t,r]of aR(a,o.value))i.push(sR(e,t,r));else i.push(sR(e,o.key,`Variable "$${n}" does not appear in any GraphQL query.`))}return i}(n,i,r):[]}));const cR=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));SL.defineMode("graphql-variables",(e=>{const t=cu({eatWhitespace:e=>e.eatSpace(),lexRules:uR,parseRules:dR,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:t.startState,token:t.token,indent:FF,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}}));const uR={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},dR={Document:[nu("{"),eu("Variable",Zc(nu(","))),nu("}")],Variable:[fR("variable"),nu(":"),"Value"],Value(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(e.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[tu("Number","number")],StringValue:[tu("String","string")],BooleanValue:[tu("Keyword","builtin")],NullValue:[tu("Keyword","keyword")],ListValue:[nu("["),eu("Value",Zc(nu(","))),nu("]")],ObjectValue:[nu("{"),eu("ObjectField",Zc(nu(","))),nu("}")],ObjectField:[fR("attribute"),nu(":"),"Value"]};function fR(e){return{style:e,match:e=>"String"===e.kind,update(e,t){e.name=t.value.slice(1,-1)}}}const pR=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));SL.defineMode("graphql-results",(e=>{const t=cu({eatWhitespace:e=>e.eatSpace(),lexRules:hR,parseRules:mR,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:t.startState,token:t.token,indent:FF,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}}));const hR={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},mR={Document:[nu("{"),eu("Entry",nu(",")),nu("}")],Entry:[tu("String","def"),nu(":"),"Value"],Value(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(e.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[tu("Number","number")],StringValue:[tu("String","string")],BooleanValue:[tu("Keyword","builtin")],NullValue:[tu("Keyword","keyword")],ListValue:[nu("["),eu("Value",nu(",")),nu("]")],ObjectValue:[nu("{"),eu("ObjectField",nu(",")),nu("}")],ObjectField:[tu("String","property"),nu(":"),"Value"]},vR=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));return zO}));
|
|
46
|
+
//# sourceMappingURL=index.umd.js.map
|